1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  3. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  4. 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
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.

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

Life Power Spell v1.2 (Map)

Reviews
Moderator
00:19, 1st Dec 2009 TriggerHappy: This spell is far to simple. It looks really cheap and could have definitely been done a lot easier. It also leaks. But that doesn't matter since the simplicity of this spell is just too much.
  1. 00:19, 1st Dec 2009
    TriggerHappy:

    This spell is far to simple. It looks really cheap and could have definitely been done a lot easier.

    It also leaks. But that doesn't matter since the simplicity of this spell is just too much.
     
  2. Santa_Claus.

    Santa_Claus.

    Joined:
    Jun 22, 2009
    Messages:
    21
    Resources:
    0
    Resources:
    0
    eh. can you post trigger in description please?

    dota's spell , cmon make something more original then this ^^
     
  3. real138

    real138

    Joined:
    Sep 3, 2009
    Messages:
    1,447
    Resources:
    3
    Icons:
    3
    Resources:
    3
    uh you do know this isnt going to be approved right? :D its wayyy too simple add some special things to it and you might have a chance.
    try making it flashier and things like that.
    o and like santa said post triggers in description.
    2/5 right now
     
  4. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    New version is coming - I added more things. If a unit dies whilke under the effect - itwill either damage or heal.

    Tell me, how to improve the visual of my spell ?
     
  5. real138

    real138

    Joined:
    Sep 3, 2009
    Messages:
    1,447
    Resources:
    3
    Icons:
    3
    Resources:
    3
    idk havent seen the spell.
     
  6. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Here you go ->
    More complicated spell effect. More eye candy. More changeable things. Codes added in description.

    Hope it is better that way!
     
  7. real138

    real138

    Joined:
    Sep 3, 2009
    Messages:
    1,447
    Resources:
    3
    Icons:
    3
    Resources:
    3
    ill take a look in about an hour. be back then with a full review.
    hmm i see you did not fix any of the memory leaks. wherever there is a postion of a unit you have to clear it.
    teres 1 in the first trigger.
    2 in the third trigger.
    thats all i saw from looking over it.
     
    Last edited: Nov 22, 2009
  8. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Ok, fixed them.
    Any other problems ?
     
    Last edited: Nov 23, 2009
  9. real138

    real138

    Joined:
    Sep 3, 2009
    Messages:
    1,447
    Resources:
    3
    Icons:
    3
    Resources:
    3
    hmm seems good to me. 4/5 right now as its a quite simple spell but codely nicely
     
  10. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Come on, please. If somebody has downloaded it - you can rate it. I would appreciate it.
    Also report any problems you find and perhaps suggestions for improvement?


    real138 -> +rep for helping me.
     
  11. M_Vegeta

    M_Vegeta

    Joined:
    Feb 20, 2008
    Messages:
    439
    Resources:
    1
    Spells:
    1
    Resources:
    1
    first Change Casting Unit by Triggering UNit & Thx for brining this MUI but i think when some1 make hashtable he should add GUI MUI version for poeple that are not using 1.23 more chance from seeing people using ur spell :p
     
  12. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    So,
    1. Can you please explain what the is difference between casting unit and triggering unit in this case?

    2. I didn't understand that very well... Hashtables are avaliable in 1.24+, right ? But what can I do... I made this spell, because I saw how hashtables are used ...
     
  13. real138

    real138

    Joined:
    Sep 3, 2009
    Messages:
    1,447
    Resources:
    3
    Icons:
    3
    Resources:
    3
    triggering unit takes less time to retrieve info.
    its a small difference but since your using GUI every bit helps.