Moderator
M
Moderator
20:04, 30th Nov 2009
TriggerHappy:
Still can't approve without that last leak fix.
TriggerHappy:
Still can't approve without that last leak fix.
Purification

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Purification

Actions


Set P_tmppoint = (Target point of ability being cast)


Set P_Group = (Units within (150.00 + ((Real((Level of (Ability being cast) for (Triggering unit)))) x 50.00)) of P_tmppoint matching (((Matching unit) is alive) Equal to True))


Set P_ManaBurn = ((Level of (Ability being cast) for (Triggering unit)) x 50)


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



Loop - Actions




Unit - Remove All except expiration timer buffs from (Picked unit)




Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - (Real(P_ManaBurn)))




Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real(P_ManaBurn)) damage of attack type Spells and damage type Normal




Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Items\AIre\AIreTarget.mdl




Special Effect - Destroy (Last created special effect)


Custom script: call RemoveLocation( udg_P_tmppoint )
HR

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Holy Recovery

Actions


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



If - Conditions




HR_Index_Size Equal to 0



Then - Actions




Trigger - Turn on HR Loop <gen>



Else - Actions


Set HR_Index_Size = (HR_Index_Size + 1)


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



If - Conditions




HR_Index_Size Greater than HR_Index_maxSize



Then - Actions




Set HR_Index[HR_Index_Size] = HR_Index_Size




Set HR_Index_maxSize = HR_Index_Size



Else - Actions


Set HR_Int = HR_Index[HR_Index_Size]


Set HR_CASTER[HR_Int] = (Triggering unit)


Set HR_Target[HR_Int] = (Target unit of ability being cast)


Set HR_Time[HR_Int] = 10


Set HR_Heal[HR_Int] = ((Real((Level of (Ability being cast) for HR_CASTER[HR_Int]))) 5.00)
HR Loop

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


For each (Integer HR_LOOP) from 1 to HR_Index_Size, do (Actions)



Loop - Actions




Set HR_Int = HR_Index[HR_LOOP]




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





If - Conditions






(Real(HR_Time[HR_Int])) Greater than 0.00





Then - Actions






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







If - Conditions








(HR_CASTER[HR_Int] belongs to an enemy of (Owner of HR_Target[HR_Int])) Equal to False







Then - Actions








Set HR_Heal[HR_Int] = (HR_Heal[HR_Int] x 1.10)








Set HR_Time[HR_Int] = (HR_Time[HR_Int] - 1)








Special Effect - Create a special effect attached to the origin of HR_Target[HR_Int] using Abilities\Spells\Items\ResourceItems\ResourceEffectTarget.mdl








Special Effect - Destroy (Last created special effect)








Unit - Set life of HR_Target[HR_Int] to ((Life of HR_Target[HR_Int]) + HR_Heal[HR_Int])







Else - Actions





Else - Actions






-------- RecycleIndex --------






Set HR_Index[HR_LOOP] = HR_Index[HR_Index_Size]






Set HR_Index[HR_Index_Size] = HR_Int






Set HR_Index_Size = (HR_Index_Size - 1)






Set HR_LOOP = (HR_LOOP - 1)






-------- Turn the trigger again off if the index_size is below 0... --------






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







If - Conditions








HR_Index_Size Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions
HT Init

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Holy Tranquility

Actions


Set HT_point = (Position of (Triggering unit))


Set HT_time = (((Level of (Ability being cast) for (Triggering unit)) x 5) + 5)


Unit Group - Pick every unit in (Units within (500.00 + (100.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) of HT_point matching (((Matching unit) is alive) Equal to True)) and do (Actions)



Loop - Actions




Unit Group - Add (Picked unit) to HT_units




Hashtable - Save HT_time as 0 of (Key (Picked unit)) in HT_hashtable




Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Picked unit)) in HT_hashtable


Custom script: call RemoveLocation (udg_HT_point)
HT Loop

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


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



Loop - Actions




Set HT_point = (Position of (Load 1 of (Key (Picked unit)) in HT_hashtable))




Set HT_time = (Load 0 of (Key (Picked unit)) from HT_hashtable)




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





If - Conditions






HT_time Greater than 0






((Picked unit) is alive) Equal to True





Then - Actions






Special Effect - Create a special effect at (Random point in (Region centered at HT_point with size (700.00, 700.00))) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl






Special Effect - Destroy (Last created special effect)






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







If - Conditions








((Picked unit) belongs to an ally of (Owner of (Load 1 of (Key (Picked unit)) in HT_hashtable))) Equal to True








((Picked unit) is Undead) Equal to False







Then - Actions








Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Level of Purification for (Load 1 of (Key (Picked unit)) in HT_hashtable)))) x 10.00))







Else - Actions








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









If - Conditions










((Picked unit) is Undead) Equal to True









Then - Actions










Unit - Cause (Load 1 of (Key (Picked unit)) in HT_hashtable) to damage (Picked unit), dealing ((Real((Level of Purification for (Load 1 of (Key (Picked unit)) in HT_hashtable)))) x 5.00) damage of attack type Spells and damage type Normal










Special Effect - Create a special effect attached to the origin of (Picked unit) using Environment\UndeadBuildingFire\UndeadSmallBuildingFire2.mdl










Special Effect - Destroy (Last created special effect)









Else - Actions






Hashtable - Save (HT_time - 1) as 0 of (Key (Picked unit)) in HT_hashtable





Else - Actions






Unit Group - Remove (Picked unit) from HT_units






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in HT_hashtable
HT Turnoff

Events


Unit - A unit Stops casting an ability

Conditions


(Ability being cast) Equal to Purification

Actions


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



Loop - Actions




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





If - Conditions






(Triggering unit) Equal to (Load 1 of (Key (Picked unit)) in HT_hashtable)





Then - Actions






Unit Group - Remove (Picked unit) from HT_units





Else - Actions
Last Stand

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Last Stand

Actions


Set LS_tmppoint = (Position of (Target unit of ability being cast))


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



If - Conditions




((Target unit of ability being cast) is dead) Equal to False



Then - Actions




Set LS_Unit_In_Area = (Number of units in (Units within (300.00 + (100.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) of LS_tmppoint matching (((Matching unit) belongs to an enemy of (Owner of (Target unit of ability being cast))) Equal to True)))




Unit - Set life of (Target unit of ability being cast) to ((Life of (Target unit of ability being cast)) + ((Real(LS_Unit_In_Area)) x (15.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))))




Special Effect - Create a special effect attached to the origin of (Target unit of ability being cast) using Abilities\Spells\Items\AIem\AIemTarget.mdl




Special Effect - Destroy (Last created special effect)



Else - Actions


Custom script: call RemoveLocation( udg_LS_tmppoint )
Haunt

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Haunt

Actions


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



If - Conditions




H_Index_Size Equal to 0



Then - Actions




Trigger - Turn on Haunt Loop <gen>



Else - Actions


-------- Increase the index size --------


Set H_Index_Size = (H_Index_Size + 1)


-------- Dynamic Index --------


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



If - Conditions




H_Index_Size Greater than H_Index_maxSize



Then - Actions




Set H_Index[H_Index_Size] = H_Index_Size




Set H_Index_maxSize = H_Index_Size



Else - Actions


-------- Dynamic Index End --------


Set H_Int = H_Index[H_Index_Size]


-------- Setup those arrays --------


Set H_CASTER[H_Int] = (Triggering unit)


Set H_Time[H_Int] = ((Level of (Ability being cast) for (Triggering unit)) + 9)


Set H_Target[H_Int] = (Target unit of ability being cast)


Unit - Set life of H_CASTER[H_Int] to ((Life of H_CASTER[H_Int]) x 0.90)


Special Effect - Create a special effect attached to the origin of H_Target[H_Int] using abilities\Spells\Other\Doom\DoomTarget.mdl


Special Effect - Destroy (Last created special effect)
Haunt Loop

Events


Time - Every 1.00 seconds of game time

Conditions

Actions


For each (Integer H_LOOP) from 1 to H_Index_Size, do (Actions)



Loop - Actions




-------- This let look everything cleaner. --------




Set H_Int = H_Index[H_LOOP]




-------- Condition... --------




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





If - Conditions






(Real(H_Time[H_Int])) Greater than 0.00






(H_Target[H_Int] is dead) Equal to False





Then - Actions






-------- Actions --------






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







If - Conditions








(H_CASTER[H_Int] belongs to an enemy of (Owner of H_Target[H_Int])) Equal to True







Then - Actions








Unit - Set H_Target[H_Int] movement speed to ((Current movement speed of H_Target[H_Int]) x 0.95)








Unit - Cause H_CASTER[H_Int] to damage H_Target[H_Int], dealing ((Real((Level of Haunt for H_CASTER[H_Int]))) x 12.00) damage of attack type Spells and damage type Normal








Special Effect - Create a special effect attached to the origin of H_Target[H_Int] using Abilities\Spells\Undead\DeathandDecay\DeathandDecayDamage.mdl








Special Effect - Destroy (Last created special effect)








Set H_Time[H_Int] = (H_Time[H_Int] - 1)








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









If - Conditions










H_Time[H_Int] Less than or equal to 0









Then - Actions










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











If - Conditions












(H_Target[H_Int] is dead) Equal to False











Then - Actions












Unit - Cause H_CASTER[H_Int] to damage H_Target[H_Int], dealing ((Real((Level of Haunt for H_CASTER[H_Int]))) x 50.00) damage of attack type Spells and damage type Normal












Special Effect - Create a special effect attached to the origin of H_Target[H_Int] using Abilities\Spells\Other\Doom\DoomDeath.mdl












Special Effect - Destroy (Last created special effect)












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













If - Conditions














(H_Target[H_Int] is dead) Equal to False













Then - Actions














Unit - Set H_Target[H_Int] movement speed to (Default movement speed of H_Target[H_Int])













Else - Actions














Unit - Set life of H_CASTER[H_Int] to ((Life of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 100.00))














Unit - Set mana of H_CASTER[H_Int] to ((Mana of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 75.00))











Else - Actions












Unit - Set life of H_CASTER[H_Int] to ((Life of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 100.00))












Unit - Set mana of H_CASTER[H_Int] to ((Mana of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 75.00))









Else - Actions







Else - Actions





Else - Actions






Special Effect - Create a special effect attached to the origin of H_Target[H_Int] using Abilities\Spells\Other\Doom\DoomDeath.mdl






Special Effect - Destroy (Last created special effect)






Unit - Set life of H_CASTER[H_Int] to ((Life of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 100.00))






Unit - Set mana of H_CASTER[H_Int] to ((Mana of H_CASTER[H_Int]) + ((Real((Level of Haunt for H_CASTER[H_Int]))) x 75.00))






-------- RecycleIndex --------






Set H_Index[H_LOOP] = H_Index[H_Index_Size]






Set H_Index[H_Index_Size] = H_Int






Set H_Index_Size = (H_Index_Size - 1)






Set H_LOOP = (H_LOOP - 1)






-------- Turn the trigger again off if the index_size is below 0... --------






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







If - Conditions








H_Index_Size Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions
Dark Strike

Events


Unit - A unit Is attacked

Conditions


((Attacking unit) has buff Dark Strike ) Equal to True

Actions


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



If - Conditions




(Random integer number between 1 and 5) Not equal to 3



Then - Actions




Set DS_tmppoint = (Position of (Triggering unit))




Set DS_Group = (Units within (150.00 + ((Real((Level of Dark Strike for (Attacking unit)))) x 50.00)) of (Position of (Triggering unit)) matching ((((Matching unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True) and (((Matching unit) is alive) Equal to




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





Loop - Actions






Set DS_Target = (Picked unit)






Unit - Cause (Attacking unit) to damage (Picked unit), dealing ((Real((Level of Dark Strike for (Attacking unit)))) x 10.00) damage of attack type Spells and damage type Normal






Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmDamage.mdl






Special Effect - Destroy (Last created special effect)






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







If - Conditions








((Picked unit) is dead) Equal to True







Then - Actions








Set DS_tmppoint = (Position of (Picked unit))








Unit Group - Remove (Picked unit) from DS_Group








Unit - Create 1 DS_Summon[(Level of Dark Strike for (Attacking unit))] for (Owner of (Attacking unit)) at DS_tmppoint facing Default building facing degrees








Unit - Add a ((Real((Level of Dark Strike for (Attacking unit)))) x 8.00) second Generic expiration timer to (Last created unit)








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









If - Conditions










(Unit-type of (Last created unit)) Equal to DS_Summon[3]









Then - Actions










Unit - Add Dark Strike to (Last created unit)









Else - Actions







Else - Actions




Custom script: call RemoveLocation( udg_DS_tmppoint )



Else - Actions