- Joined
- Jul 20, 2012
- Messages
- 83
So I've read over the tutorial about leaks and finally got myself into reworking my leaky triggers...
As the tutorial stated there are black-listed functions that should be avoided at all costs, what I mean is storing the group of units of type.
As the tutorial stated there are black-listed functions that should be avoided at all costs, what I mean is storing the group of units of type.
-
UnitGroup
-

Events
-

Conditions
-

Actions
-


Set TempUnitGroup = (Units of type Wandering Merchants)
-


Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-



Loop - Actions
-




Neutral Building - Add |c00959697Ring of |cffff0000Strength|r to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add |c00959697Ring of |cff18be00Agility|r to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add |c00959697Ring of |cff0000ffIntelligence|r to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add |c00959697Ring of |cffffcc00Power|r to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_Recipe_Common[(Random integer number between 1 and 8)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_Recipe_Epic[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_Recipe_Legendary[(Random integer number between 1 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_Orb[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_LQ_Armor_Weapon[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_LQ_Armor_Weapon[(Random integer number between 6 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-




Neutral Building - Add Random_HQ_Armor_Weapon[(Random integer number between 1 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-
-
-


Custom script: call DestroyGroup(udg_TempUnitGroup)
-
-
-
UnitGroup
-

Events
-

Conditions
-

Actions
-


Set TempUnitGroup = (Units owned by Neutral Passive)
-


Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Unit-type of (Picked unit)) Equal to Wandering Merchants
-
-





Then - Actions
-






Neutral Building - Add |c00959697Ring of |cffff0000Strength|r to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add |c00959697Ring of |cff18be00Agility|r to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add |c00959697Ring of |cff0000ffIntelligence|r to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add |c00959697Ring of |cffffcc00Power|r to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_Recipe_Common[(Random integer number between 1 and 8)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_Recipe_Epic[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_Recipe_Legendary[(Random integer number between 1 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_Orb[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_LQ_Armor_Weapon[(Random integer number between 1 and 5)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_LQ_Armor_Weapon[(Random integer number between 6 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-






Neutral Building - Add Random_HQ_Armor_Weapon[(Random integer number between 1 and 10)] to (Picked unit) with 1 in stock and a max stock of 1
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_TempUnitGroup)
-
-