• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Super Spell Pack v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: light bolt30
x3GlikE Presents;
Super Spell Pack v1.0

  • Settings
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ----------------------------- --------
      • Hashtable - Create a hashtable
      • Set WE_Hashtable = (Last created hashtable)
      • -------- ----------------------------- --------
      • -------- Energy Bolt --------
      • -------- ----------------------------- --------
      • Set WE_Spell = Energy Bolt
      • Set WE_Dummy_Spell = Stun
      • -------- ----------------------------- --------
      • Set WE_Speed = 25.00
      • Set WE_Damage[1] = 50.00
      • Set WE_Damage[2] = 100.00
      • Set WE_Damage[3] = 150.00
      • -------- ----------------------------- --------
      • Set WE_Bonus_Chance[1] = 10.00
      • Set WE_Bonus_Chance[2] = 15.00
      • Set WE_Bonus_Chance[3] = 20.00
      • -------- ----------------------------- --------
      • Set WE_Bonus_Damage[1] = 20.00
      • Set WE_Bonus_Damage[2] = 40.00
      • Set WE_Bonus_Damage[3] = 60.00
      • -------- ----------------------------- --------
      • Set WE_Range[1] = 100.00
      • Set WE_Range[1] = 120.00
      • Set WE_Range[1] = 130.00
      • -------- ----------------------------- --------
      • Set WE_All = True
      • Set WE_Heros = False
      • -------- ----------------------------- --------
      • Set WE_Show_Damage = True
      • Set WE_Damage_Color = |cffff0000
      • -------- ----------------------------- --------
      • Set WE_Effect_Move = Abilities\Spells\Items\AIma\AImaTarget.mdl
      • Set WE_Effect_Hit = Abilities\Spells\Items\SpellShieldAmulet\SpellShieldCaster.mdl
      • Set WE_Effect_Explode = <Empty String>
      • -------- ----------------------------- --------
      • -------- Holy Energy --------
      • -------- ----------------------------- --------
      • Set WH_Spell = Holy Energy
      • -------- ----------------------------- --------
      • Set WH_Chance[1] = 10.00
      • Set WH_Chance[2] = 15.00
      • Set WH_Chance[3] = 20.00
      • -------- ----------------------------- --------
      • Set WH_Heal[1] = 50.00
      • Set WH_Heal[2] = 100.00
      • Set WH_Heal[3] = 150.00
      • -------- ----------------------------- --------
      • Set WH_AoE[1] = 100.00
      • Set WH_AoE[2] = 150.00
      • Set WH_AoE[3] = 200.00
      • -------- ----------------------------- --------
      • Set WH_Show_Heal = True
      • Set WH_Heal_Color = |cff32cd32
      • -------- ----------------------------- --------
      • Set WH_Effect_Place = overhead
      • Set WH_Effect_Place_Friend = overhead
      • Set WH_Effect_Self = Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
      • Set WH_Effect_Friend = Abilities\Spells\Undead\ReplenishMana\ReplenishManaCasterOverhead.mdl
      • -------- ----------------------------- --------

Energy Bolt

Creates a bolt made from pure energy, The energy bolt travels to the targeted location and explodes and stuns all nearby enemies for a few seconds. Has a chance to also deal bonus damage to nearby enemies.

Level 1 - 100 AoE, 50 Damage, 10% Chance and 20 Bonus Damage.
Level 2 - 120 AoE, 50 Damage, 15% Chance and 40 Bonus Damage.
Level 3 - 130 AoE, 150 Damage, 20% Chance and 60 Bonus Damage.

  • Energy Bolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to WE_Spell
        • Then - Actions
          • Set WE_Caster = (Triggering unit)
          • Set WE_Cast = (Position of WE_Caster)
          • Set WE_Target = (Target point of ability being cast)
          • Set WE_Rect = (Region centered at WE_Target with size (50.00, 50.00))
          • Set WE_Angle = (Angle from WE_Cast to WE_Target)
          • Set WE_Create = (WE_Cast offset by 100.00 towards WE_Angle degrees)
          • -------- ----------------------------------- --------
          • Unit - Create 1 Energy_Bolt_Missle for (Owner of WE_Caster) at WE_Create facing WE_Angle degrees
          • -------- ----------------------------------- --------
          • Set WE_Handle = (Last created unit)
          • Hashtable - Save Handle OfWE_Cast as (Key Cast) of (Key WE_Handle) in WE_Hashtable
          • Hashtable - Save Handle OfWE_Caster as (Key Caster) of (Key WE_Handle) in WE_Hashtable
          • Hashtable - Save Handle OfWE_Target as (Key Target) of (Key WE_Handle) in WE_Hashtable
          • Hashtable - Save Handle OfWE_Rect as (Key Rect) of (Key WE_Handle) in WE_Hashtable
          • Hashtable - Save WE_Angle as (Key Angle) of (Key WE_Handle) in WE_Hashtable
          • Unit Group - Add (Last created unit) to WE_Dummy
          • Trigger - Turn on Energy Bolt Loop <gen>
          • Set WE_Caster = No unit
          • Custom script: call RemoveLocation(udg_WE_Cast)
          • Custom script: call RemoveLocation(udg_WE_Target)
          • Custom script: call RemoveLocation(udg_WE_Create)
        • Else - Actions
  • Energy Bolt Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in WE_Dummy and do (Actions)
        • Loop - Actions
          • Set WE_Handle = (Picked unit)
          • Set WE_DummyPick = (Picked unit)
          • Set WE_Caster = (Load (Key Caster) of (Key WE_Handle) in WE_Hashtable)
          • Set WE_Cast = (Load (Key Cast) of (Key WE_Handle) in WE_Hashtable)
          • Set WE_Target = (Load (Key Target) of (Key WE_Handle) in WE_Hashtable)
          • Set WE_Angle = (Load (Key Angle) of (Key WE_Handle) from WE_Hashtable)
          • Set WE_Rect = (Load (Key Rect) of (Key WE_Handle) in WE_Hashtable)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (WE_Rect contains WE_DummyPick) Equal to False
                • Then - Actions
                  • Set WE_Picked = (Position of WE_DummyPick)
                  • Set WE_Move = (WE_Picked offset by WE_Speed towards WE_Angle degrees)
                  • Unit - Move WE_DummyPick instantly to WE_Move
                  • Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Move
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation(udg_WE_Picked)
                  • Custom script: call RemoveLocation(udg_WE_Move)
                • Else - Actions
                  • Unit - Kill WE_DummyPick
                  • Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Explode
                  • Special Effect - Destroy (Last created special effect)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • WE_All Equal to True
                    • Then - Actions
                      • Set WE_Loc = (Position of WE_DummyPick)
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 100.00 of WE_Loc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WE_DummyPick)) Equal to True))) and do (Actions)
                        • Loop - Actions
                          • Set WE_Loc2 = (Position of (Picked unit))
                          • -------- ----------------------------------- --------
                          • Unit - Create 1 Dummy for (Owner of WE_DummyPick) at WE_Loc2 facing Default building facing degrees
                          • -------- ----------------------------------- --------
                          • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                          • Unit - Add WE_Dummy_Spell to (Last created unit)
                          • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                          • Set WE_Int = (Random real number between 1.00 and 100.00)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • WE_Int Less than or equal to WE_Bonus_Chance[(Level of WE_Spell for WE_Caster)]
                            • Then - Actions
                              • Unit - Cause (Last created unit) to damage (Picked unit), dealing (WE_Damage[(Level of WE_Spell for WE_Caster)] + WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)]) damage of attack type Spells and damage type Normal
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • WE_Show_Damage Equal to True
                                • Then - Actions
                                  • Set WE_Damage_Unit = (Last created unit)
                                  • Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)])) + (Integer(WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)])))
                                  • Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                                  • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
                                  • Floating Text - Change (Last created floating text): Disable permanence
                                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                  • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
                                  • Set WE_Damage_Unit = No unit
                                • Else - Actions
                            • Else - Actions
                              • Unit - Cause (Last created unit) to damage (Picked unit), dealing WE_Damage[(Level of WE_Spell for WE_Caster)] damage of attack type Spells and damage type Normal
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • WE_Show_Damage Equal to True
                                • Then - Actions
                                  • Set WE_Damage_Unit = (Last created unit)
                                  • Set WE_Damage_Text = (Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))
                                  • Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                                  • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
                                  • Floating Text - Change (Last created floating text): Disable permanence
                                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                  • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
                                  • Set WE_Damage_Unit = No unit
                                • Else - Actions
                          • Special Effect - Create a special effect at WE_Loc2 using WE_Effect_Hit
                          • Special Effect - Destroy (Last created special effect)
                          • Custom script: call RemoveLocation(udg_WE_Loc2)
                      • Custom script: call RemoveLocation(udg_WE_Loc)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • WE_Heros Equal to True
                        • Then - Actions
                          • Set WE_Loc = (Position of WE_DummyPick)
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in (Units within 100.00 of WE_Loc matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WE_DummyPick)) Equal to True)))) and do (Actions)
                            • Loop - Actions
                              • Set WE_Loc2 = (Position of (Picked unit))
                              • -------- ----------------------------------- --------
                              • Unit - Create 1 Dummy for (Owner of WE_DummyPick) at WE_Loc2 facing Default building facing degrees
                              • -------- ----------------------------------- --------
                              • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                              • Unit - Add WE_Dummy_Spell to (Last created unit)
                              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • WE_Int Less than or equal to WE_Bonus_Chance[(Level of WE_Spell for WE_Caster)]
                                • Then - Actions
                                  • Unit - Cause (Last created unit) to damage (Picked unit), dealing (WE_Damage[(Level of WE_Spell for WE_Caster)] + WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)]) damage of attack type Spells and damage type Normal
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • WE_Show_Damage Equal to True
                                    • Then - Actions
                                      • Set WE_Damage_Unit = (Last created unit)
                                      • Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)])) + (Integer(WE_Bonus_Damage[(Level of WE_Spell for WE_Caster)])))
                                      • Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                                      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
                                      • Floating Text - Change (Last created floating text): Disable permanence
                                      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
                                      • Set WE_Damage_Unit = No unit
                                    • Else - Actions
                                • Else - Actions
                                  • Unit - Cause (Last created unit) to damage (Picked unit), dealing WE_Damage[(Level of WE_Spell for WE_Caster)] damage of attack type Spells and damage type Normal
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • WE_Show_Damage Equal to True
                                    • Then - Actions
                                      • Set WE_Damage_Unit = (Last created unit)
                                      • Set WE_Damage_Text = (Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))
                                      • Floating Text - Create floating text that reads (WE_Damage_Color + ((String(WE_Damage_Text)) + |r)) above WE_Damage_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                                      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
                                      • Floating Text - Change (Last created floating text): Disable permanence
                                      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
                                      • Set WE_Damage_Unit = No unit
                                    • Else - Actions
                              • Special Effect - Create a special effect at WE_Loc2 using WE_Effect_Hit
                              • Special Effect - Destroy (Last created special effect)
                              • Custom script: call RemoveLocation(udg_WE_Loc2)
                          • Custom script: call RemoveLocation(udg_WE_Loc)
                        • Else - Actions
            • Else - Actions
              • Hashtable - Clear all child hashtables of child (Key WE_Handle) in WE_Hashtable
              • Set WE_DummyPick = No unit
              • Custom script: call RemoveLocation(udg_WE_Target)
              • Custom script: call RemoveLocation(udg_WE_Cast)
              • Custom script: call RemoveLocation(udg_WE_Create)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (WE_Dummy is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

Holy Energy

Has a chance to change energy to holy energy which heals all nearby friendly units. Everytime a spell is cast.

Level 1 - 10% Chance, 50 Heal, 100 AoE.
Level 2 - 15% Chance, 100 Heal, 150 AoE.
Level 3 - 20% Chance, 150 Heal, 200 AoE.

  • Holy Energy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Level of WH_Spell for (Triggering unit)) Greater than 0
    • Actions
      • Set WH_Caster = (Triggering unit)
      • Set WH_Int = (Random real number between 1.00 and 100.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WH_Int Less than or equal to WH_Chance[(Level of WH_Spell for (Triggering unit))]
        • Then - Actions
          • Special Effect - Create a special effect attached to the WH_Effect_Place of WH_Caster using WH_Effect_Self
          • Special Effect - Destroy (Last created special effect)
          • Unit - Set life of WE_Caster to ((Life of WE_Caster) + WH_Heal[(Level of WH_Spell for WE_Caster)])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • WH_Show_Heal Equal to True
            • Then - Actions
              • Set WH_Heal_Unit = WH_Caster
              • Set WH_Heal_Text = (Integer(WH_Heal[(Level of WH_Spell for WH_Caster)]))
              • Floating Text - Create floating text that reads (WH_Heal_Color + ((String(WH_Heal_Text)) + |r)) above WH_Heal_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
              • Set WH_Heal_Unit = No unit
            • Else - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within WH_AoE[(Level of WH_Spell for WH_Caster)] of (Position of WH_Caster) matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of WH_Caster)) Equal to True))) and do (Actions)
            • Loop - Actions
              • Special Effect - Create a special effect attached to the WH_Effect_Friend of (Picked unit) using WH_Effect_Friend
              • Special Effect - Destroy (Last created special effect)
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + WH_Heal[(Level of WH_Spell for WE_Caster)])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • WH_Show_Heal Equal to True
                • Then - Actions
                  • Set WH_Heal_Unit = (Picked unit)
                  • Set WH_Heal_Text = (Integer(WH_Heal[(Level of WH_Spell for WH_Caster)]))
                  • Floating Text - Create floating text that reads (WH_Heal_Color + ((String(WH_Heal_Text)) + |r)) above WH_Heal_Unit with Z offset 0.00, using font size 7.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                  • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
                  • Set WH_Heal_Unit = No unit
                • Else - Actions
        • Else - Actions
      • Set WH_Caster = No unit

Log

v1.0 First upload.
Keywords:
Super Spell Pack x3GlikE
Contents

Super Spell Pack v1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 11:33, 3rd Jun 2011 Maker: The handle should be an integer. You don't have to null globals, like you set WE_caster = null. Store the ability level inot the hashtable, and load the...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

11:33, 3rd Jun 2011
Maker:
The handle should be an integer.
You don't have to null globals, like you set WE_caster = null.
Store the ability level inot the hashtable, and load the value and use it here:
  • Set WE_Damage_Text = ((Integer(WE_Damage[(Level of WE_Spell for WE_Caster)]))...
Leak:
  • Special Effect - Create a special effect at (Position of WE_DummyPick) using WE_Effect_Move
The dummies do not need invulnerability ability, they have locust.
 
Level 7
Joined
Apr 1, 2010
Messages
289
cool spells, but you might want change
  • Set WE_Handle = (Picked unit)
  • Set WE_Caster = (Load (Key Caster) of (Key WE_Handle) in WE_Hashtable)
you should change WE_Handle to an Integer

  • Custom script: Set udg_WE_HandleInt = key(udg_WE_DummyPick)
and use it instead of (key WE_Handle) it will improve performance.
  • CondEnergy Bolt
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Ability being cast) Equal to WE_Spell
  • Then - Actions
you should get rid of the if then else, because you don't need it.

love the holy energy spell.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
That has two syntax errors. JASS is case-sensitive, so it must be "set" not "Set" and there is no "key" function (unless someone defines it, but that's not going to happen in most maps), the function is GetHandleId.

  • Custom script: set udg_WE_HandleInt = GetHandleId(udg_WE_DummyPick)
The custom script doesn't change much of the efficiency as it saves one function call: GetHandleId vs GetHandleIdBJ (which is a wrapper function for GetHandleId). I don't advise doing such custom script in a GUI map because at that point you might as well be coding the whole thing in JASS.

This is why I have much higher standards from JASS scripts than I do GUI triggers, because you just can't get the same results out of GUI as you can by editing the script directly.
 
Top