1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  6. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  7. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  8. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Thunderwrath [GUI]

Submitted by Mainy
This bundle is marked as approved. It works and satisfies the submission rules.
Changelog

23:38, 17th Oct 2010
* Destroy TW_Point[2] & TW_Point[3] in Thunderwrath Loop.

23:38, 17th Oct 2010
* Place RemoveLocation(udg_TW_Point[2&3]) outside of the if condition.


Thuenderwrath

Lauches a magnetic lightning, damaging all enemies in front, and when he returns again causing damage.

Level 1 - Deal 100 damage, round trip.
Level 2 - Deal 200 damage, round trip.
Level 3 - Deal 300 damage, round trip.
Level 4 - Deal 400 damage, round trip.

Cooldown: 65 segundos.


Codes

  • Thunderwrath Hashtable
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set TW_Hashtable = (Last created hashtable)

  • Thunderwrath
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunderwrath
    • Actions
      • If ((Thunderwrath Loop <gen> is on) Equal to False) then do (Trigger - Turn on Thunderwrath Loop <gen>) else do (Custom script: //!)
      • Set TW_Int = (TW_Int + 1)
      • Set TW_Caster = (Triggering unit)
      • Set TW_Point[0] = (Position of TW_Caster)
      • Set TW_Point[1] = (Target point of ability being cast)
      • Set TW_Angle = (Angle from TW_Point[0] to TW_Point[1])
      • Set TW_Point[2] = (TW_Point[0] offset by 100.00 towards TW_Angle degrees)
      • Set TW_Spell_Distance = 1100.00
      • Set TW_Damage = (100.00 x (Real((Level of Thunderwrath for TW_Caster))))
      • Set TW_MissileSpeed = 25.00
      • Set TW_Return = False
      • Unit - Create 1 Dummy for (Owner of TW_Caster) at TW_Point[0] facing TW_Angle degrees
      • Set TW_Dummy = (Last created unit)
      • Set TW_Handle = (Last created unit)
      • Unit Group - Add TW_Dummy to TW_Group
      • Special Effect - Create a special effect at TW_Point[2] using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the origin of TW_Dummy using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Set TW_SFX = (Last created special effect)
      • -------- save values --------
      • Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save TW_Damage as (Key damage) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save TW_MissileSpeed as (Key speed) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save TW_Int as (Key int) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save TW_Return as (Key retornar) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save Handle OfTW_Caster as (Key caster) of (Key TW_Handle) in TW_Hashtable
      • Hashtable - Save Handle OfTW_SFX as (Key sfx) of (Key TW_Handle) in TW_Hashtable
      • -------- unit group --------
      • Custom script: set udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))] = CreateGroup()
      • -------- clean --------
      • Custom script: call RemoveLocation(udg_TW_Point[0])
      • Custom script: call RemoveLocation(udg_TW_Point[1])
      • Custom script: call RemoveLocation(udg_TW_Point[2])

  • Thunderwrath Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in TW_Group and do (Actions)
        • Loop - Actions
          • Set TW_Handle = (Picked unit)
          • Set TW_Dummy = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • TW_Dummy Not equal to No unit
            • Then - Actions
              • Set TW_Return = (Load (Key retornar) of (Key TW_Handle) from TW_Hashtable)
              • Set TW_MissileSpeed = (Load (Key speed) of (Key TW_Handle) from TW_Hashtable)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TW_Return Equal to False
                • Then - Actions
                  • Set TW_Angle = (Load (Key angle) of (Key TW_Handle) from TW_Hashtable)
                  • Set TW_Spell_Distance = (Load (Key distance) of (Key TW_Handle) from TW_Hashtable)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TW_Spell_Distance Greater than or equal to 0.00
                    • Then - Actions
                      • Set TW_Damage = (Load (Key damage) of (Key TW_Handle) from TW_Hashtable)
                      • Set TW_Caster = (Load (Key caster) of (Key TW_Handle) in TW_Hashtable)
                      • Set TW_Spell_Distance = (TW_Spell_Distance - TW_MissileSpeed)
                      • Set TW_Point[0] = (Position of TW_Dummy)
                      • Set TW_Point[1] = (TW_Point[0] offset by TW_MissileSpeed towards TW_Angle degrees)
                      • Unit - Move TW_Dummy instantly to TW_Point[1]
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 200.00 of TW_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TW_DamagedUnits[(Load (Key int and do (Actions)
                        • Loop - Actions
                          • Unit Group - Add (Picked unit) to TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]
                          • Unit - Cause TW_Caster to damage (Picked unit), dealing TW_Damage 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\Other\Monsoon\MonsoonBoltTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_TW_Point[0])
                      • Custom script: call RemoveLocation(udg_TW_Point[1])
                    • Else - Actions
                      • Set TW_Return = True
                      • Set TW_Angle = (TW_Angle - 180.00)
                      • Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable
                      • Hashtable - Save TW_Return as (Key retornar) of (Key TW_Handle) in TW_Hashtable
                      • Unit Group - Remove all units from TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]
                  • Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable
                • Else - Actions
                  • Set TW_Point[2] = (Position of TW_Dummy)
                  • Set TW_Point[3] = (Position of TW_Caster)
                  • Set TW_Angle = (Angle from TW_Point[2] to TW_Point[3])
                  • Set TW_Spell_Distance = (Distance between TW_Point[2] and TW_Point[3])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TW_Spell_Distance Greater than or equal to 72.00
                    • Then - Actions
                      • Set TW_Damage = (Load (Key damage) of (Key TW_Handle) from TW_Hashtable)
                      • Set TW_Caster = (Load (Key caster) of (Key TW_Handle) in TW_Hashtable)
                      • Set TW_Spell_Distance = (TW_Spell_Distance - TW_MissileSpeed)
                      • Set TW_Point[0] = (Position of TW_Dummy)
                      • Set TW_Point[1] = (TW_Point[0] offset by TW_MissileSpeed towards TW_Angle degrees)
                      • Unit - Move TW_Dummy instantly to TW_Point[1], facing TW_Angle degrees
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 200.00 of TW_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is in TW_DamagedUnits[(Load (Key int and do (Actions)
                        • Loop - Actions
                          • Unit Group - Add (Picked unit) to TW_DamagedUnits[(Load (Key int) of (Key TW_Handle) from TW_Hashtable)]
                          • Unit - Cause TW_Caster to damage (Picked unit), dealing TW_Damage 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\Other\Monsoon\MonsoonBoltTarget.mdl
                          • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation(udg_TW_Point[0])
                      • Custom script: call RemoveLocation(udg_TW_Point[1])
                    • Else - Actions
                      • Set TW_SFX = (Load (Key sfx) of (Key TW_Handle) in TW_Hashtable)
                      • Special Effect - Destroy TW_SFX
                      • Unit Group - Remove TW_Dummy from TW_Group
                      • Unit - Remove TW_Dummy from the game
                      • Set TW_Dummy = No unit
                      • Custom script: call DestroyGroup(udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))])
                      • Hashtable - Clear all child hashtables of child (Key TW_Handle) in TW_Hashtable
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (TW_Group is empty) Equal to True
                        • Then - Actions
                          • Trigger - Turn off Thunderwrath Loop <gen>
                          • Set TW_Int = 0
                        • Else - Actions
                  • Hashtable - Save TW_Angle as (Key angle) of (Key TW_Handle) in TW_Hashtable
                  • Hashtable - Save TW_Spell_Distance as (Key distance) of (Key TW_Handle) in TW_Hashtable
                  • Custom script: call RemoveLocation(udg_TW_Point[2])
                  • Custom script: call RemoveLocation(udg_TW_Point[3])
            • Else - Actions



Keywords:
Thuender, Ray, Bolt, Lightning, Wrath, Fury, Sky, Blue, Eletric, Mastery, Shock, Magnetic, Boomerang, Bounds, Eletric.
Contents

Thunderwrath (Map)

Reviews
Moderator
23:38, 17th Oct 2010 TriggerHappy: Thanks for updating your spell.
  1. 23:38, 17th Oct 2010
    TriggerHappy:

    Thanks for updating your spell.
     
  2. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    Enjoy.
     
  3. Darkzealot_128

    Darkzealot_128

    Joined:
    Jun 29, 2010
    Messages:
    737
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Gonna check.

    Edit: Improve documentation, but other then that, I thought it was a good spell. Triggering and stuff was fine. You'd get a 4/5 from me.
     
  4. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    I think CreateGroup when group is empty is bad... cause it will create a new group whenever the group becomes empty so the former groups will stay in memory...

    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (TW_Group is empty) Equal to True
      • Then - Actions
        • Custom script: set udg_TW_Group = CreateGroup()
      • Else - Action


    and you dont even need to create the group since its a udg variable so its already initialized on start...
     
  5. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,181
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    You don't really need TW_Int, do you?

    • Custom script: set udg_TW_DamagedUnits[LoadIntegerBJ(StringHashBJ("int"), GetHandleIdBJ(udg_TW_Handle), udg_TW_Hashtable)] = CreateGroup()

    ->
    • Custom script: set udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))] = CreateGroup()


    • Custom script: call DestroyGroup(udg_TW_DamagedUnits[LoadIntegerBJ(StringHashBJ("int"), GetHandleIdBJ(udg_TW_Handle), udg_TW_Hashtable)])

    ->
    • Custom script: call DestroyGroup(udg_TW_DamagedUnits[LoadInteger(udg_TW_Hashtable , GetHandleId(udg_TW_Handle) , StringHash("int"))])
     
  6. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    I will update.

    Edit: Updated
     
    Last edited: Oct 8, 2010
  7. Thunderwrath

    Thunderwrath

    Joined:
    Feb 26, 2007
    Messages:
    11
    Resources:
    0
    Resources:
    0
    oh look my name on it :D definitively a plus
     
  8. Guishiu

    Guishiu

    Joined:
    Apr 7, 2008
    Messages:
    160
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Guishiu says HI :) Remaining birds are... "speechless"... You're always hearing something, until silence interrupts it, like dinosaur burps.

    Hola new people to spells and doing good. Love it =D