• 🏆 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!

Rolling Stone and Sand Storm Spell v1.1

This is my 2nd spell I made

Rolling Stone :

Roll a giant rock toward deals damage , stun last 2 second and knock back enemy nearby .
Level 1 - 100 damage.
Level 2 - 150 damage.
Level 3 - 200 damage.
Level 4 - 250 damage.



  • RollingStonePrepare
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to RollingStone
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RS_Integer[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on RollingStoneRoll <gen>
        • Else - Actions
      • Set RS_Integer[1] = (RS_Integer[1] + 1)
      • Set RS_Integer[2] = (RS_Integer[2] + 1)
      • Set RS_Caster[RS_Integer[2]] = (Triggering unit)
      • Set RS_Location[RS_Integer[2]] = (Position of RS_Caster[RS_Integer[2]])
      • Set RS_Location2[RS_Integer[2]] = (Target point of ability being cast)
      • Set RS_Angle[RS_Integer[2]] = (Angle from RS_Location[RS_Integer[2]] to RS_Location2[RS_Integer[2]])
      • Set RS_Tick[RS_Integer[2]] = 42
      • Unit - Create 1 Rolling Stone Dummy for (Owner of RS_Caster[RS_Integer[2]]) at RS_Location[RS_Integer[2]] facing Default building facing degrees
      • Set RS_Dummy[RS_Integer[2]] = (Last created unit)
      • Unit Group - Add (Last created unit) to RS_DummyGroup[RS_Integer[2]]
      • Custom script: call RemoveLocation(udg_RS_Location2[udg_RS_Integer[2]])


  • RollingStoneRoll
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer RS_Integer[3]) from 1 to RS_Integer[2], do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in RS_DummyGroup[RS_Integer[3]] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RS_Tick[RS_Integer[3]] Greater than 0
                • Then - Actions
                  • Set RS_DummyPoint[RS_Integer[3]] = (Position of (Picked unit))
                  • Set RS_Location2[RS_Integer[3]] = (RS_DummyPoint[RS_Integer[3]] offset by 30.00 towards RS_Angle[RS_Integer[3]] degrees)
                  • Special Effect - Create a special effect at RS_Location2[RS_Integer[3]] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Move RS_Dummy[RS_Integer[3]] instantly to RS_Location2[RS_Integer[3]]
                  • Set RS_Strike[RS_Integer[3]] = (Units within 150.00 of RS_Location2[RS_Integer[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy
                  • Unit Group - Pick every unit in RS_Strike[RS_Integer[3]] and do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 Rolling Stone Stunner for (Owner of RS_Caster[RS_Integer[3]]) at RS_Location2[RS_Integer[3]] facing RS_Angle[RS_Integer[3]] degrees
                      • Unit - Hide (Last created unit)
                      • Unit - Set level of Rolling Stone Stun for (Last created unit) to (Level of RollingStone for RS_Caster[RS_Integer[3]])
                      • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit Group - Add (Picked unit) to RS_NonStrike[RS_Integer[3]]
                  • Destructible - Pick every destructible within 200.00 of RS_DummyPoint[RS_Integer[3]] and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                  • Custom script: call RemoveLocation(udg_RS_DummyPoint[udg_RS_Integer[3]])
                  • Custom script: call RemoveLocation(udg_RS_Location2[udg_RS_Integer[3]])
                  • Custom script: call DestroyGroup(udg_RS_Strike[udg_RS_Integer[3]])
                  • Set RS_Tick[RS_Integer[3]] = (RS_Tick[RS_Integer[3]] - 1)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • RS_Tick[RS_Integer[3]] Equal to 0
                • Then - Actions
                  • Unit Group - Remove RS_Dummy[RS_Integer[3]] from RS_DummyGroup[RS_Integer[3]]
                  • Unit - Kill RS_Dummy[RS_Integer[3]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (RS_DummyGroup[RS_Integer[3]] is empty) Equal to True
                    • Then - Actions
                      • Set RS_Integer[1] = (RS_Integer[1] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • RS_Integer[1] Equal to 0
                        • Then - Actions
                          • Set RS_Integer[2] = 0
                          • Unit Group - Remove all units from RS_NonStrike[RS_Integer[3]]
                          • Custom script: call RemoveLocation(udg_RS_Location[udg_RS_Integer[2]])
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                • Else - Actions


  • RollingStoneKnockBack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Rolling Stone Stun
    • Actions
      • Set RS_KnockBack = (Position of (Target unit of ability being cast))
      • Set RS_KnockBackUnit = (Position of (Triggering unit))
      • Set RS_KnockBackAngle = (Angle from RS_KnockBack to RS_KnockBackUnit)
      • Set RS_KnockBackPoint = (RS_KnockBack offset by -100.00 towards RS_KnockBackAngle degrees)
      • Unit - Move (Target unit of ability being cast) instantly to RS_KnockBackPoint
      • Custom script: call RemoveLocation(udg_RS_KnockBackPoint)
      • Custom script: call RemoveLocation(udg_RS_KnockBack)


Sand Storm :

Summons a line of sand storm that move towards deals damage and slow enemy for 40% movementspeed and 20% attackspeed last 3 second and pull enemy inside of sand storm.

Level 1 - deals 75 damage.
Level 2 - deals 125 damage.
Level 3 - deals 175 damage.
Level 4 - deals 225 damage.



  • SandStormPrepare
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to SandStorm
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SS_Integer[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on SandStormRoll <gen>
        • Else - Actions
      • Set SS_Integer[1] = (SS_Integer[1] + 1)
      • Set SS_Integer[2] = (SS_Integer[2] + 1)
      • Set SS_Caster[SS_Integer[2]] = (Triggering unit)
      • Set SS_Location[SS_Integer[2]] = (Position of SS_Caster[SS_Integer[2]])
      • Set SS_Location2[SS_Integer[2]] = (Target point of ability being cast)
      • Set SS_Angle[SS_Integer[2]] = (Angle from SS_Location[SS_Integer[2]] to SS_Location2[SS_Integer[2]])
      • Set SS_Tick[SS_Integer[2]] = 42
      • Unit - Create 1 Sand Storm Dummy for (Owner of SS_Caster[SS_Integer[2]]) at SS_Location[SS_Integer[2]] facing Default building facing degrees
      • Unit - Hide (Last created unit)
      • Set SS_Dummy[SS_Integer[2]] = (Last created unit)
      • Unit Group - Add (Last created unit) to SS_DummyGroup[SS_Integer[2]]
      • Custom script: call RemoveLocation(udg_SS_Location2[udg_SS_Integer[2]])


  • SandStormRoll
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SS_Integer[3]) from 1 to SS_Integer[2], do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in SS_DummyGroup[SS_Integer[3]] and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SS_Tick[SS_Integer[3]] Greater than 0
                • Then - Actions
                  • Set SS_DummyPoint[SS_Integer[3]] = (Position of (Picked unit))
                  • Set SS_Location2[SS_Integer[3]] = (SS_DummyPoint[SS_Integer[3]] offset by 30.00 towards SS_Angle[SS_Integer[3]] degrees)
                  • For each (Integer A) from 1 to 3, do (Actions)
                    • Loop - Actions
                      • Special Effect - Create a special effect at SS_DummyPoint[SS_Integer[3]] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
                      • Special Effect - Destroy (Last created special effect)
                  • Unit - Move SS_Dummy[SS_Integer[3]] instantly to SS_Location2[SS_Integer[3]]
                  • Set SS_Strike[SS_Integer[3]] = (Units within 150.00 of SS_DummyPoint[SS_Integer[3]] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy
                  • Unit Group - Pick every unit in SS_Strike[SS_Integer[3]] and do (Actions)
                    • Loop - Actions
                      • Unit - Create 1 Sand Storm Slower for (Owner of SS_Caster[SS_Integer[3]]) at (Position of (Picked unit)) facing SS_Angle[SS_Integer[3]] degrees
                      • Unit - Hide (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                      • Unit - Move (Picked unit) instantly to (Position of SS_Dummy[SS_Integer[3]])
                      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                      • Unit - Cause SS_Caster[SS_Integer[3]] to damage (Picked unit), dealing (25.00 + (50.00 x (Real((Level of SandStorm for SS_Caster[SS_Integer[3]]))))) damage of attack type Spells and damage type Normal
                      • Unit Group - Add (Picked unit) to SS_NonStrike[SS_Integer[3]]
                  • Destructible - Pick every destructible within 200.00 of SS_DummyPoint[SS_Integer[3]] and do (Actions)
                    • Loop - Actions
                      • Destructible - Kill (Picked destructible)
                  • Custom script: call RemoveLocation(udg_SS_DummyPoint[udg_SS_Integer[3]])
                  • Custom script: call RemoveLocation(udg_SS_Location2[udg_SS_Integer[3]])
                  • Custom script: call DestroyGroup(udg_SS_Strike[udg_SS_Integer[3]])
                  • Set SS_Tick[SS_Integer[3]] = (SS_Tick[SS_Integer[3]] - 1)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SS_Tick[SS_Integer[3]] Equal to 0
                • Then - Actions
                  • Unit Group - Remove SS_Dummy[SS_Integer[3]] from SS_DummyGroup[SS_Integer[3]]
                  • Unit - Kill SS_Dummy[SS_Integer[3]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (SS_DummyGroup[SS_Integer[3]] is empty) Equal to True
                    • Then - Actions
                      • Set SS_Integer[1] = (SS_Integer[1] - 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • SS_Integer[1] Equal to 0
                        • Then - Actions
                          • Set SS_Integer[2] = 0
                          • Unit Group - Remove all units from SS_NonStrike[SS_Integer[3]]
                          • Custom script: call RemoveLocation(udg_SS_Location[udg_SS_Integer[2]])
                          • Trigger - Turn off (This trigger)
                        • Else - Actions
                    • Else - Actions
                • Else - Actions


v1.0 Released
v1.1 Fix the custom script and remove useless trigger

Keywords:
Roll , Stone , Rolling , Rolling Stone , Dirt , Earth , Land , Sand , Storm , Sand Storm
Contents

Rolling Stone and Sand Storm v1.0 (Map)

Reviews
19:19, 12th Jul 2010 TriggerHappy: You've updated everything I've asked and the code and spell were fine.

Moderator

M

Moderator

19:19, 12th Jul 2010
TriggerHappy:

You've updated everything I've asked and the code and spell were fine.
 
Level 12
Joined
Oct 16, 2008
Messages
514
  • Set RS_DummyPoint[RS_Integer[2]] = (Position of RS_Dummy[RS_Integer[2]])
  • Unit Group - Add (Last created unit) to RS_DummyGroup[RS_Integer[2]]
  • Custom script: call RemoveLocation(udg_RS_DummyPoint[udg_RS_Integer[2]])
You're setting that point to remove it rightaway. Unused.
This is in "prepare" part of rolling stone.
 
Top