-
Are you planning to upload your awesome spell or system to Hive? Please review the rules here.Dismiss Notice
-
Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.Dismiss Notice
-
A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!Dismiss Notice
-
Check out the Staff job openings thread.Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.
Life Power Spell v.1.2
Submitted by
Windu
- Tags:
- Target Object, GUI / Triggers
- Filesize:
- 30.41 KB
- Rating:
-
(1 vote)
- Downloads:
- 61
- Uploaded:
- Nov 22, 2009
- Updated:
- Dec 1, 2009
- Resources:
- 1
- Author(s):
- Windu
- State:
- Substandard

This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
This is a spell I made, inspired by wyrmlord's hashtable tutorial! (Thank you, for the great tut!)
[Though I must say I haven't 'stolen' anything, just made a spell, similar to the examples.]
This is a fairly simple, 3 level spell.
If cast on allies it heals for 10 secs. (Formula: [(Level of ability) x 10] + 30)
If cast on enemies it damages for 10 secs. (Formula: [(Level of ability) x 10] + 3)
Update v1.1: It slows the unit by 30%. If an enemy dies with this effect it will damage all enemies around him. If an ally dies with this effect - it will heal all allies.
Update v1.2: Fixed leaky positions.
Keywords:
Life, Power, dota, shadow, wold, word, warlock, wizard, spell, heal, damage, over, time
[Though I must say I haven't 'stolen' anything, just made a spell, similar to the examples.]
This is a fairly simple, 3 level spell.
If cast on allies it heals for 10 secs. (Formula: [(Level of ability) x 10] + 30)
If cast on enemies it damages for 10 secs. (Formula: [(Level of ability) x 10] + 3)
Update v1.1: It slows the unit by 30%. If an enemy dies with this effect it will damage all enemies around him. If an ally dies with this effect - it will heal all allies.
Update v1.2: Fixed leaky positions.
Init
-
Init Copy
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
-------- --> Creates the hashtable for the spell. --------
-
Hashtable - Create a hashtable
-
Set Hasttable_LP = (Last created hashtable)
-
-
First Trigger
-
LP Start
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Life Power
-
-
Actions
-
-------- --> Checks whether unit is already under the effect of Life Power. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Target unit of ability being cast) is in LifePower_units) Equal to False
-
-
Then - Actions
-
-------- --> This is the special effect and Slow effect. --------
-
Set Slow_Posit = (Position of (Target unit of ability being cast))
-
Unit - Create 1 Slow_Dummy for (Owner of (Casting unit)) at Slow_Posit facing Default building facing degrees
-
Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)
-
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-
Special Effect - Create a special effect attached to the overhead of (Target unit of ability being cast) using Abilities\Spells\Orc\Voodoo\VoodooAuraTarget.mdl
-
-------- -->Sets all the data we need for later use. --------
-
Hashtable - Save 10.00 as 0 of (Key (Target unit of ability being cast)) in Hasttable_LP
-
Hashtable - Save Handle Of(Last created special effect) as 1 of (Key (Target unit of ability being cast)) in Hasttable_LP
-
Hashtable - Save Handle Of(Casting unit) as 2 of (Key (Target unit of ability being cast)) in Hasttable_LP
-
Unit Group - Add (Target unit of ability being cast) to LifePower_units
-
Custom script: call RemoveLocation( udg_Slow_Posit )
-
-
Else - Actions
-
-------- --> Orders caster to stop if unit already has the effect of Life Power. --------
-
Unit - Order (Casting unit) to Stop
-
Game - Display to (Player group((Owner of (Casting unit)))) the text: That unit ais alrea...
-
-
-
-
Second Trigger
-
Life Power Spell
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in LifePower_units and do (Actions)
-
Loop - Actions
-
-------- --> Setting all we saved in the previous trigger. --------
-
Set LP_Remaining_Time = (Load 0 of (Key (Picked unit)) from Hasttable_LP)
-
Set Effect_LP = (Load 1 of (Key (Picked unit)) in Hasttable_LP)
-
Set LP_Caster = (Load 2 of (Key (Picked unit)) in Hasttable_LP)
-
-------- --> Checks how many seconds are left. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LP_Remaining_Time Greater than 0.00
-
-
Then - Actions
-
-------- --> Checks whether the target is allied or enemy. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Owner of (Picked unit)) is an enemy of (Owner of LP_Caster)) Equal to True
-
-
Then - Actions
-
-------- --> Damages the unit. Formula: ([Level of Life Power] x 10) + 20 {You can always change that to suit your needs.} --------
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (((Real((Level of Life Power for LP_Caster))) x 10.00) + 30.00))
-
Hashtable - Save (LP_Remaining_Time - 1.00) as 0 of (Key (Picked unit)) in Hasttable_LP
-
-
Else - Actions
-
-------- --> Heals the unit. Formula: ([Level of Life Power] x 10) + 20 {You can always change that to suit your needs.} --------
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + (((Real((Level of Life Power for LP_Caster))) x 10.00) + 30.00))
-
Hashtable - Save (LP_Remaining_Time - 1.00) as 0 of (Key (Picked unit)) in Hasttable_LP
-
-
-
-
Else - Actions
-
-------- Clears the unit from the unit group. --------
-
Special Effect - Destroy Effect_LP
-
Unit Group - Remove (Picked unit) from LifePower_units
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Hasttable_LP
-
-
-
-
-
-
Third Trigger
-
LP OnDeath Trigger
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Dying unit) is in LifePower_units) Equal to True
-
-
Actions
-
Set Dying_Posit = (Position of (Dying unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Dying unit) belongs to an enemy of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True
-
-
Then - Actions
-
Unit Group - Pick every unit in (Units within 350.00 of Dying_Posit matching ((((Matching unit) belongs to an enemy of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to Fal and do (Actions)
-
Loop - Actions
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
-
Unit - Cause (Load 2 of (Key (Dying unit)) in Hasttable_LP) to damage (Picked unit), dealing ((Real((Level of Life Power for (Load 2 of (Key (Dying unit)) in Hasttable_LP)))) x 25.00) damage of attack type Chaos and damage type Divine
-
-
-
-
Else - Actions
-
Unit Group - Pick every unit in (Units within 350.00 of Dying_Posit matching ((((Matching unit) belongs to an ally of (Owner of (Load 2 of (Key (Dying unit)) in Hasttable_LP))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is dead) Equal to Fals and do (Actions)
-
Loop - Actions
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIre\AIreTarget.mdl
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Level of Life Power for (Load 2 of (Key (Dying unit)) in Hasttable_LP)))) x 25.00))
-
-
-
-
-
Custom script: call RemoveLocation( udg_Dying_Posit )
-
Special Effect - Destroy (Load 1 of (Key (Dying unit)) in Hasttable_LP)
-
Unit Group - Remove (Dying unit) from LifePower_units
-
-
Keywords:
Life, Power, dota, shadow, wold, word, warlock, wizard, spell, heal, damage, over, time
Contents