THE_X
New Member
- Reaction score
- 49
Troll War Chief
MPI/MUI? - MUI
Leakless - Think so
Lagless - For me yes
Fun - Totaly
Please comment, helps a spell maker like myself get better, so we can make better spells for you!
Abilities:
Tree Huger:
- Throws a spear twards a targeted location connected to a rope latching onto the first tree it comes into contact with pulling the caster twards the tree, enemy units that come into contact with the caster after the spear has hooked will become stunned.
Code:
Learn Tree Hugger
Events
Unit - A unit Learns a skill
Conditions
(Learned Hero Skill) Equal to Tree Hugger
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Tree Hugger for (Triggering unit)) Less than or equal to 1
Then - Actions
Trigger - Add to Stun Tree Hugger <gen> the event (Unit - A unit comes within 140.00 of (Learning Hero))
Else - Actions
Code:
Start Tree Hugger
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Tree Hugger
Actions
Set MUI = (MUI + 1)
Set Point[1] = (Position of (Triggering unit))
Set Point[2] = (Target point of ability being cast)
Unit - Create 1 Tree Hugger Dummy for (Owner of (Triggering unit)) at Point[1] facing (Angle from Point[1] to Point[2]) degrees
Unit - Set the custom value of (Last created unit) to MUI
Set Tree_Hugger_Caster[(Custom value of (Last created unit))] = (Triggering unit)
Lightning - Create a Drain Mana lightning effect from source Point[1] to target Point[1]
Set Tree_Hugger_Lightning[(Custom value of (Last created unit))] = (Last created lightning effect)
Set Tree_Hugger_Range[(Custom value of (Last created unit))] = (1000.00 + (500.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Code:
Move Tree Hugger
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Tree Hugger Dummy)
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Tree_Hugger_Hooked[(Custom value of (Picked unit))] Equal to False
Then - Actions
Unit - Turn collision for Tree_Hugger_Caster[(Custom value of (Picked unit))] On
Set Point[1] = (Position of (Picked unit))
Set Point[2] = (Point[1] offset by 24.00 towards (Facing of (Picked unit)) degrees)
Set Point[3] = (Position of Tree_Hugger_Caster[(Custom value of (Picked unit))])
Unit - Move (Picked unit) instantly to Point[2]
Set Tree_Hugger_Range[(Custom value of (Picked unit))] = (Tree_Hugger_Range[(Custom value of (Picked unit))] - 24.00)
Lightning - Move Tree_Hugger_Lightning[(Custom value of (Picked unit))] to source Point[2] and target Point[3]
Destructible - Pick every destructible within 80.00 of Point[2] and do (Actions)
Loop - Actions
Set Tree_Hugger_Hooked_Range[(Custom value of (Picked unit))] = (Distance between Point[2] and Point[3])
Set Tree_Hugger_Hooked[(Custom value of (Picked unit))] = True
Set Tree_Hugger_Hooked[(Custom value of Tree_Hugger_Caster[(Custom value of (Picked unit))])] = True
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Tree_Hugger_Range[(Custom value of (Picked unit))] Less than or equal to 0.00
Then - Actions
Lightning - Destroy Tree_Hugger_Lightning[(Custom value of (Picked unit))]
Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove (Picked unit) from the game
Set Group[2] = (Units owned by (Owner of (Picked unit)) of type Troll War Chief)
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Unit - Turn collision for (Picked unit) On
Set Tree_Hugger_Hooked[(Custom value of (Picked unit))] = False
Custom script: call DestroyGroup (udg_Group[2])
Else - Actions
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call RemoveLocation (udg_Point[3])
Else - Actions
Unit - Turn collision for Tree_Hugger_Caster[(Custom value of (Picked unit))] Off
Set Point[1] = (Position of Tree_Hugger_Caster[(Custom value of (Picked unit))])
Set Point[2] = (Point[1] offset by 24.00 towards (Facing of (Picked unit)) degrees)
Set Point[3] = (Position of (Picked unit))
Unit - Move Tree_Hugger_Caster[(Custom value of (Picked unit))] instantly to Point[2]
Lightning - Move Tree_Hugger_Lightning[(Custom value of (Picked unit))] to source Point[2] and target Point[3]
Set Tree_Hugger_Hooked_Range[(Custom value of (Picked unit))] = (Tree_Hugger_Hooked_Range[(Custom value of (Picked unit))] - 24.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Tree_Hugger_Hooked_Range[(Custom value of (Picked unit))] Less than or equal to 0.00
Then - Actions
Lightning - Destroy Tree_Hugger_Lightning[(Custom value of (Picked unit))]
Special Effect - Create a special effect at Point[3] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Remove (Picked unit) from the game
Set Group[2] = (Units owned by (Owner of (Picked unit)) of type Troll War Chief)
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Unit - Turn collision for (Picked unit) On
Set Tree_Hugger_Hooked[(Custom value of (Picked unit))] = False
Custom script: call DestroyGroup (udg_Group[2])
Else - Actions
Custom script: call RemoveLocation (udg_Point[3])
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call DestroyGroup (udg_Group[1])
Code:
Stun Tree Hugger
Events
Conditions
Actions
Set Point[1] = (Position of (Triggering unit))
Set Group[1] = (Units within 160.00 of Point[1] matching ((Unit-type of (Matching unit)) Equal to Troll War Chief))
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Tree_Hugger_Hooked[(Custom value of (Picked unit))] Equal to True
((Triggering unit) is A structure) Equal to False
((Triggering unit) is Magic Immune) Equal to False
((Triggering unit) is alive) Equal to True
((Triggering unit) is A ground unit) Equal to True
((Triggering unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True
Then - Actions
Unit - Create 1 Dummy for (Owner of (Picked unit)) at Point[1] facing Default building facing degrees
Unit - Add Tree Hugger Stun to (Last created unit)
Unit - Set level of Tree Hugger Stun for (Last created unit) to (Level of Tree Hugger for (Picked unit))
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Triggering unit)
Custom script: call RemoveLocation (udg_Point[1])
Else - Actions
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call DestroyGroup (udg_Group[1])
[COLOR="Dark] OliveGreen"]Ambush:[/COLOR]
- Mo'ock disguises as a tree and waits for an enemy unit to come by, as soon as an enemy comes by Mo'ock will ambush them blinking to the positon of the unit and stunning them.
Code:
Finish Ambush
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Ambush Dummy
Actions
Set Ambush_On[(Custom value of (Triggering unit))] = False
Unit - Unhide Ambush_Dummy[(Custom value of (Triggering unit))]
Destructible - Remove Ambush_Tree[(Custom value of (Triggering unit))]
Code:
Start Ambush
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Ambush
Actions
Unit - Hide (Triggering unit)
Set Ambush_On[(Custom value of (Triggering unit))] = True
Set Point[1] = (Position of (Triggering unit))
Destructible - Create a Summer Tree Wall at Point[1] facing (Random angle) with scale 1.00 and variation 0
Set Ambush_Tree[(Custom value of (Triggering unit))] = (Last created destructible)
Trigger - Add to Ambush Tree Death <gen> the event (Destructible - (Last created destructible) dies)
Unit - Create 1 Ambush Dummy for (Owner of (Triggering unit)) at Point[1] facing Default building facing degrees
Unit - Set the custom value of (Last created unit) to (Custom value of (Triggering unit))
Trigger - Add to Ambush Activate <gen> the event (Unit - A unit comes within 700.00 of (Last created unit))
Set Ambush_Dummy[(Custom value of (Triggering unit))] = (Triggering unit)
Unit - Add a 15.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation (udg_Point[1])
Wait 0.10 seconds
Unit - Order (Triggering unit) to Stop
Code:
Ambush Activate
Events
Conditions
Actions
Set Point[1] = (Position of (Triggering unit))
Set Group[1] = (Units within 560.00 of Point[1] matching ((Unit-type of (Matching unit)) Equal to Ambush Dummy))
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ambush_On[(Custom value of (Picked unit))] Equal to True
((Triggering unit) is A structure) Equal to False
((Triggering unit) is Magic Immune) Equal to False
((Triggering unit) is alive) Equal to True
((Triggering unit) is A ground unit) Equal to True
((Triggering unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True
Then - Actions
Unit - Unhide Ambush_Dummy[(Custom value of (Picked unit))]
Destructible - Remove Ambush_Tree[(Custom value of (Picked unit))]
Set Ambush_On[(Custom value of (Picked unit))] = False
Unit - Create 1 Dummy for (Owner of (Picked unit)) at Point[1] facing Default building facing degrees
Unit - Add Ambush Stun to (Last created unit)
Unit - Set level of Ambush Stun for (Last created unit) to (Level of Ambush for Ambush_Dummy[(Custom value of (Picked unit))])
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Triggering unit)
Set Point[2] = (Position of (Picked unit))
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Special Effect - Create a special effect at Point[2] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Unit - Move Ambush_Dummy[(Custom value of (Picked unit))] instantly to Point[1]
Unit - Order Ambush_Dummy[(Custom value of (Picked unit))] to Attack (Triggering unit)
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Else - Actions
Custom script: call DestroyGroup (udg_Group[1])
Code:
Ambush Tree Death
Events
Conditions
Actions
Destructible - Resurrect (Dying destructible) with 100000000.00 life and Hide birth animation
[COLOR="Dark] OliveGreen"]Critical Aura:[/COLOR]
- Gives a percentage on every attack for allies around you to deal 1.5 times the damage they give.
[/SPOILER]
Code:
Add Critcal Aura
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Trigger - Add to Critcal Aura <gen> the event (Unit - (Triggering unit) Takes damage)
Code:
Critcal Aura
Events
Conditions
((Damage source) is in Attacking_Damage) Equal to True
Or - Any (Conditions) are true
Conditions
((Damage source) has buff Critcal Aura [1] ) Equal to True
((Damage source) has buff Critcal Aura [2] ) Equal to True
((Damage source) has buff Critcal Aura [3] ) Equal to True
((Damage source) has buff Critcal Aura [4] ) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Damage source) has buff Critcal Aura [1] ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 5
Then - Actions
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
Unit - Cause (Damage source) to damage (Triggering unit), dealing (0.50 x (Damage taken)) damage of attack type Hero and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Damage source) has buff Critcal Aura [2] ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 8
Then - Actions
Floating Text - Create floating text that reads (String((Integer(((Damage taken) x 1.80))))) above (Damage source) with Z offset 5.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
Unit - Cause (Damage source) to damage (Triggering unit), dealing (0.50 x (Damage taken)) damage of attack type Hero and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Damage source) has buff Critcal Aura [3] ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 11
Then - Actions
Floating Text - Create floating text that reads (String((Integer(((Damage taken) x 1.80))))) above (Damage source) with Z offset 5.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
Unit - Cause (Damage source) to damage (Triggering unit), dealing (0.50 x (Damage taken)) damage of attack type Hero and damage type Normal
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Damage source) has buff Critcal Aura [4] ) Equal to True
(Random integer number between 1 and 100) Less than or equal to 14
Then - Actions
Floating Text - Create floating text that reads (String((Integer(((Damage taken) x 1.80))))) above (Damage source) with Z offset 5.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
Unit - Cause (Damage source) to damage (Triggering unit), dealing (0.50 x (Damage taken)) damage of attack type Hero and damage type Normal
Else - Actions
[COLOR="Dark] OliveGreen"]Impaling Spear:[/COLOR]
- Throws a spear twards a targeted point that when coming into contact with enemy units will drag them with the spear until it hits a non unit object, dealing damage upon impact with the spear.
Code:
Remove Impaling Spear
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Imapling Spear Dummy
Actions
Unit - Remove (Triggering unit) from the game
Set Point[1] = (Position of (Triggering unit))
Special Effect - Create a special effect at Point[1] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
Special Effect - Destroy (Last created special effect)
Set Group[2] = (Units within 250.00 of Point[1] matching (((Matching unit) is in Implaing_Spear_Group) Equal to True))
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Unit - Turn collision for (Picked unit) Off
Custom script: call DestroyGroup (udg_Group[2])
Custom script: call RemoveLocation (udg_Point[1])
Code:
Impaling Spear Actiave
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Impaling Spear
Actions
Set Point[1] = (Position of (Triggering unit))
Set Point[2] = (Target point of ability being cast)
Unit - Create 1 Imapling Spear Dummy for (Owner of (Triggering unit)) at Point[1] facing (Angle from Point[1] to Point[2]) degrees
Set MUI = (MUI + 1)
Unit - Set the custom value of (Last created unit) to MUI
Set Impaling_Spear_Caster[(Custom value of (Last created unit))] = (Triggering unit)
Trigger - Add to Impaling Spear Damage <gen> the event (Unit - A unit comes within 140.00 of (Last created unit))
Code:
Impaling Spear Damage
Events
Conditions
Actions
Set Point[1] = (Position of (Triggering unit))
Set Group[1] = (Units within 150.00 of Point[1] matching ((Unit-type of (Matching unit)) Equal to Imapling Spear Dummy))
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A structure) Equal to False
((Triggering unit) is A ground unit) Equal to True
((Triggering unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True
Then - Actions
Unit - Turn collision for (Triggering unit) Off
Unit Group - Add (Triggering unit) to Implaing_Spear_Group
Unit - Cause Impaling_Spear_Caster[(Custom value of (Picked unit))] to damage (Triggering unit), dealing (40.00 + (120.00 x (Real((Level of Impaling Spear for Impaling_Spear_Caster[(Custom value of (Picked unit))]))))) damage of attack type Normal and damage type Normal
Special Effect - Create a special effect attached to the origin of (Triggering unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Special Effect - Destroy (Last created special effect)
Else - Actions
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call DestroyGroup (udg_Group[1])
Code:
Impaling Spear Move
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Set Group[1] = (Units of type Imapling Spear Dummy)
Unit Group - Pick every unit in Group[1] and do (Actions)
Loop - Actions
Set Point[1] = (Position of (Picked unit))
Set Point[2] = (Point[1] offset by 26.00 towards (Facing of (Picked unit)) degrees)
Unit - Move (Picked unit) instantly to Point[2]
Set Group[2] = (Units within 140.00 of Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True) and (((Matching unit) i
Unit Group - Pick every unit in Group[2] and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to Point[2]
Custom script: call DestroyGroup (udg_Group[2])
Set Implaing_Spear_Range[(Custom value of (Picked unit))] = (Implaing_Spear_Range[(Custom value of (Picked unit))] + 26.00)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Implaing_Spear_Range[(Custom value of (Picked unit))] Greater than or equal to 3000.00
Then - Actions
Unit - Kill (Picked unit)
Else - Actions
Destructible - Pick every destructible within 80.00 of Point[2] and do (Actions)
Loop - Actions
Unit - Kill (Picked unit)
Custom script: call RemoveLocation (udg_Point[1])
Custom script: call RemoveLocation (udg_Point[2])
Custom script: call DestroyGroup (udg_Group[1])
Edit: Updated spellpack, Ambush no longer gives crit errors :thup: