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

Spin version 1.1

SPIN
SPIN

Ingame Description

The caster fires up lasers at the targeted location. The lasers will spin in a circle and then fire outwards, stunning and harming all those near the lasers.


  • SpinInt
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- DONUT TUCH --------
      • Hashtable - Create a hashtable
      • Set Hash_Spin = (Last created hashtable)
      • -------- TOUCHABLE --------
      • -------- THIS IS YOUR DUMMY UNIT'S ID. --------
      • -------- IT WILL HAVE TO BE CHANGED. --------
      • Custom script: set udg_SpinDummyId = 'h000'
      • -------- THE LONG STUN ABILITY --------
      • Custom script: set udg_Spin_LongStun = 'A002'
      • -------- THE SHORT STUN ABILITY --------
      • Custom script: set udg_Spin_LongStun = 'A001'
      • -------- THIS IS THE DISTANCE BETWEEN THE LIGHTNING AND THE CIRCLE'S CENTER. --------
      • Set Spin_Lighting_Distance = 45.00
      • -------- THIS IS THE LIGHTNING TYPE. --------
      • Set SLT = Chain Lightning - Primary
      • -------- THIS IS THE LIGHTNING'S HEIGHT. --------
      • Set SPH = 120.00
      • -------- THIS IS WHAT THE AoE STARTS AT --------
      • Set Spin_StartingAoE = 10.00
      • -------- THIS IS WHAT THE AoE GROWS TO --------
      • Set Spin_MaxAoE = 175.00
      • -------- DAMAGE PER ROTATION (THIS IS MULTIPLIED BY EACH LEVEL) --------
      • Set Spin_RotationDamage = 10.00
      • -------- DAMAGE TO UNITS WHEN THE LASER FIRES (THIS IS MULTIPLIED BY EACH LEVEL) --------
      • -------- UNDERSTAND THAT THE DAMAGE CAN CRITICAL HIT --------
      • -------- THE CHANCE OF IT HAPPENING IS QUITE FREAKWENT. --------
      • Set Spin_FireDamage = 60.00
      • -------- THE ORDER STRING OF THE LONG STUN ABILITY SO IT WILL CAST IT --------
      • Set SpinAbilityString = thunderbolt
      • -------- THE ORDER STRING OF THE SHORT STUN ABILITY SO IT WILL CAST IT --------
      • -------- WE USE TWO FOR THOSE THAT WANT A SUPER COOL SPELL --------
      • Set SpinAbilityString2 = thunderbolt
      • -------- THIS IS WHERE WE MAKE THE LIGHTNING BEAUTIFUL --------
      • -------- LIKE A BEAUTIFUL BUTTERFLY --------
      • -------- IT GOES RED = 1/5/6 GREEN = 2/10/12 BLUE = 3/15/18 --------
      • Set SLB[1] = 1.00
      • Set SLB[2] = 0.00
      • Set SLB[3] = 1.00
      • Set SLB[5] = 0.00
      • Set SLB[10] = 1.00
      • Set SLB[15] = 1.00
      • Set SLB[6] = 1.00
      • Set SLB[12] = 1.00
      • Set SLB[18] = 0.00
  • SpinCastdurr
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spin
    • Actions
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- THIS IS YOUR CASTER. --------
      • Set SPU = (Triggering unit)
      • -------- THIS IS THE TARGETING POINT --------
      • Set SP1 = (Target point of ability being cast)
      • -------- THIS IS YOUR DUMMY --------
      • Custom script: set udg_SPU2 = CreateUnitAtLoc(GetTriggerPlayer(), udg_SpinDummyId, udg_SP1, 270)
      • -------- THIS IS YOUR HANDLE --------
      • Custom script: set udg_Handle_Spin = GetHandleId(udg_SPU2)
      • -------- THESE ARE YOUR LIGHTNINGS --------
      • Set SPI3 = (Random integer number between 1 and 3)
      • For each (Integer SPI2) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set SP2 = (SP1 offset by Spin_Lighting_Distance towards ((Real(SPI2)) x 45.00) degrees)
          • -------- LIGHTNING RAWR --------
          • Custom script: set udg_SL = AddLightningEx(udg_SLT, true , GetLocationX(udg_SP2), GetLocationY(udg_SP2), GetLocationZ(udg_SP2) + (udg_SPH), GetLocationX(udg_SP2), GetLocationY(udg_SP2), GetLocationZ(udg_SP2) + (udg_SPH) )
          • -------- LIGHTNING COLOR --------
          • -------- RED, GREEN, BLUE, GHOST --------
          • -------- LOOK BLUE! A PAINTBRUSH! --------
          • Custom script: call SetLightningColor(udg_SL, udg_SLB[udg_SPI3], udg_SLB[udg_SPI3*6], udg_SLB[udg_SPI3*5], 1)
          • -------- SAVE YOUR LIGHTNING --------
          • Custom script: call SaveLightningHandle(udg_Hash_Spin, udg_Handle_Spin, udg_SPI2, udg_SL)
          • -------- KILL BAD THINGS --------
          • Custom script: call RemoveLocation(udg_SP2)
      • -------- --------
      • -------- THIS IS YOUR ABILITY LEVEL --------
      • Set SPI = (Level of Spin for SPU)
      • -------- --------
      • -------- --------
      • -------- --------
      • -------- THIS IS YOUR DAMAGE --------
      • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 9, udg_Spin_RotationDamage * udg_SPI)
      • -------- THIS IS YOUR LAUNCH DAMAGE --------
      • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 10, udg_Spin_FireDamage * udg_SPI)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 2) Equal to 1
        • Then - Actions
          • -------- THIS IS THE STARTING SPEED OF THE ROTATION --------
          • -------- THIS VALUE MUST EQUAL UP TO 360 AT SOME POINT --------
          • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 11, 4)
          • -------- THIS IS THE SPEED OF WHICH THE ROTATION INCREASES BY --------
          • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 12, 1)
        • Else - Actions
          • -------- NEGATIVE VALUES! --------
          • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 11, -4)
          • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 12, -1)
      • -------- THIS IS THE VALUE WHICH THE LASER'S DISTANCE INCREASES BY PER MOVEMENT UNTIL IT REACHES THE MAXIMUM AoE --------
      • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 14, udg_Spin_MaxAoE / (udg_Spin_StartingAoE*4))
      • -------- THIS IS THE LIGHTNING'S STARTING DISTANCE. --------
      • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 16, udg_Spin_StartingAoE)
      • -------- THIS IS WHERE WE SAVE THE HERO FOR THOSE NITPICKERS. --------
      • Custom script: call SaveUnitHandle(udg_Hash_Spin, udg_Handle_Spin, 15, udg_SPU)
      • -------- THIS IS WHERE WE SAVE THE LEVEL OF THE ABILITY. --------
      • Custom script: call SaveInteger(udg_Hash_Spin, udg_Handle_Spin, 0, udg_SPI)
      • -------- THIS IS WHERE WE SET THE DURATION OF THE LAUNCH. --------
      • Custom script: call SaveInteger(udg_Hash_Spin, udg_Handle_Spin, 23, 60)
      • -------- --------
      • -------- --------
      • -------- ADD THE DUMMY UNIT TO THE UNIT GROUP --------
      • Custom script: call GroupAddUnit(udg_Spin_Group, udg_SPU2)
      • -------- INCREASE THE TRIGGER RAWEGJLHAWE;LRGHAL;EGHEJLARGAER --------
      • Set Spin_Integur = (Spin_Integur + 1)
      • -------- START THE SPELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL --------
      • Trigger - Turn on SpinSpinSPIN <gen>
      • -------- THIS IS YOUR BOOMSTICK --------
      • Custom script: call RemoveLocation(udg_SP1)
  • SpinSpinSPIN
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Spin_Group and do (Actions)
        • Loop - Actions
          • Set SPU = (Picked unit)
          • Custom script: set udg_Handle_Spin = GetHandleId(udg_SPU)
          • Set SP1 = (Position of SPU)
          • -------- LOAD VARIABLES --------
          • Custom script: set udg_SR1 = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 16)
          • Custom script: set udg_SR3 = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 11)
          • Custom script: set udg_Spin_LaunchBool = LoadBoolean(udg_Hash_Spin, udg_Handle_Spin, 21)
          • -------- MOVE LIGHTNING --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Spin_LaunchBool Equal to False
            • Then - Actions
              • Custom script: set udg_SPI4 = 0
              • Custom script: set udg_SR2 = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 17) + udg_SR3
            • Else - Actions
              • Custom script: set udg_SPU4 = LoadUnitHandle(udg_Hash_Spin, udg_Handle_Spin, 15)
              • Custom script: set udg_Spin_EffeciencyReal = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 10)
              • Custom script: set udg_SPI3 = LoadInteger(udg_Hash_Spin, udg_Handle_Spin, 0)
              • Custom script: set udg_SPI4 = LoadInteger(udg_Hash_Spin, udg_Handle_Spin, 23) - 1
              • Custom script: call SaveInteger(udg_Hash_Spin, udg_Handle_Spin, 23, udg_SPI4)
              • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 16, udg_SR1 + LoadReal(udg_Hash_Spin, udg_Handle_Spin, 14) * 2.6)
              • Custom script: set udg_SR2 = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 17) + (udg_SR3 / 5)
              • Set Spin_Player = (Owner of SPU)
          • For each (Integer SPI) from 1 to 8, do (Actions)
            • Loop - Actions
              • Set Spin_EffeciencyReal = (SR2 + (45.00 x (Real(SPI))))
              • Custom script: set udg_SL = LoadLightningHandle(udg_Hash_Spin, udg_Handle_Spin, udg_SPI)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SPI4 Equal to 1
                • Then - Actions
                  • Lightning - Destroy SL
                  • Set SP3 = (SP1 offset by (SR1 + Spin_StartingAoE) towards Spin_EffeciencyReal degrees)
                  • Special Effect - Create a special effect at SP3 using Abilities\Weapons\SpiritOfVengeanceMissile\SpiritOfVengeanceMissile.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Spin_LaunchBool Equal to False
                    • Then - Actions
                      • Set SP2 = (SP1 offset by Spin_Lighting_Distance towards Spin_EffeciencyReal degrees)
                      • Set SP3 = (SP2 offset by SR1 towards Spin_EffeciencyReal degrees)
                    • Else - Actions
                      • Set SP2 = (SP1 offset by (((SR1 x 1.20) + Spin_StartingAoE) - Spin_MaxAoE) towards Spin_EffeciencyReal degrees)
                      • Set SP3 = (SP1 offset by (SR1 + Spin_StartingAoE) towards Spin_EffeciencyReal degrees)
                      • -------- JIMMY MATHS. --------
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within (Spin_MaxAoE x (0.01 x (60.00 - (Real(SPI4))))) of SP2 matching (((Owner of (Matching unit)) Not equal to Spin_Player) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit and do (Actions)
                        • Loop - Actions
                          • Set SPU2 = (Picked unit)
                          • Custom script: call UnitDamageTarget(udg_SPU4, udg_SPU2, udg_Spin_EffeciencyReal, true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
                          • Custom script: set udg_SPU3 = CreateUnitAtLoc(udg_Spin_Player, udg_SpinDummyId, udg_SP1, 270)
                          • Unit - Add SHORT STUN (THIS IS YOUR STUN) to SPU3
                          • Custom script: call SetUnitAbilityLevel(udg_SPU3, udg_Spin_ShortStun, udg_SPI3)
                          • Custom script: call IssueTargetOrder( udg_SPU3, udg_SpinAbilityString2, udg_SPU2 )
                          • Custom script: call UnitApplyTimedLife( udg_SPU3, 'BTLF', 1 )
                          • Custom script: call SetUnitExploded( udg_SPU3, true )
                          • Custom script: call GroupAddUnit(udg_Spin_DamageGroup, udg_SPU2)
                          • Set Spin_Integur = (Spin_Integur + 1)
                          • Custom script: set udg_SPI3 = GetHandleId(udg_SPU2)
                          • Custom script: call SaveInteger(udg_Hash_Spin, udg_SPI3, 22, 33)
                  • Custom script: call MoveLightningEx(udg_SL, true , GetLocationX(udg_SP2), GetLocationY(udg_SP2), GetLocationZ(udg_SP2) + (udg_SPH), GetLocationX(udg_SP3), GetLocationY(udg_SP3), GetLocationZ(udg_SP3) + (udg_SPH) )
              • Custom script: call RemoveLocation(udg_SP2)
              • Custom script: call RemoveLocation(udg_SP3)
          • -------- ADJUST VARIABLES, INFLICT DAMAGE --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Spin_LaunchBool Equal to False
            • Then - Actions
              • -------- SARGE, WE'RE GOING TO NEED A BUCKET --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SR1 Less than Spin_MaxAoE
                • Then - Actions
                  • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 16, udg_SR1 + LoadReal(udg_Hash_Spin, udg_Handle_Spin, 14))
                • Else - Actions
                  • Custom script: call SaveBoolean(udg_Hash_Spin, udg_Handle_Spin, 20, true)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • SR2 Greater than or equal to 360.00
                      • SR2 Less than or equal to -360.00
                • Then - Actions
                  • Custom script: set udg_SR2 = 0
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SR3 Less than 6.00
                      • SR3 Greater than -6.00
                    • Then - Actions
                      • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 11, udg_SR3 + LoadReal(udg_Hash_Spin, udg_Handle_Spin, 12))
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Or - Any (Conditions) are true
                        • Conditions
                          • SR3 Equal to 6.00
                          • SR3 Equal to -6.00
                    • Then - Actions
                      • Custom script: call SaveBoolean(udg_Hash_Spin, udg_Handle_Spin, 19, true)
                    • Else - Actions
                  • Custom script: set udg_SPU4 = LoadUnitHandle(udg_Hash_Spin, udg_Handle_Spin, 15)
                  • Custom script: set udg_Spin_EffeciencyReal = LoadReal(udg_Hash_Spin, udg_Handle_Spin, 9)
                  • Set Spin_Player = (Owner of SPU)
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within (Spin_StartingAoE + SR1) of SP1 matching (((Owner of (Matching unit)) Not equal to Spin_Player) and ((((Matching unit) is dead) Equal to False) and ((((Matching unit) is A flying unit) Equal to False) and ((((Matching unit) is Magic Immune) Equa and do (Actions)
                    • Loop - Actions
                      • Set SPU2 = (Picked unit)
                      • Custom script: call UnitDamageTarget(udg_SPU4, udg_SPU2, udg_Spin_EffeciencyReal, true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (SPU2 is in Spin_DamageGroup) Equal to False
                        • Then - Actions
                          • Custom script: set udg_SPU3 = CreateUnitAtLoc(udg_Spin_Player, udg_SpinDummyId, udg_SP1, 270)
                          • Unit - Add LONG STUN (THIS IS YOUR STUN) to SPU3
                          • Custom script: call IssueTargetOrder( udg_SPU3, udg_SpinAbilityString, udg_SPU2 )
                          • Custom script: call UnitApplyTimedLife( udg_SPU3, 'BTLF', 1 )
                          • Custom script: call SetUnitExploded( udg_SPU3, true )
                          • Custom script: call GroupAddUnit(udg_Spin_DamageGroup, udg_SPU2)
                          • Set Spin_Integur = (Spin_Integur + 1)
                          • Custom script: set udg_SPI3 = GetHandleId(udg_SPU2)
                          • Custom script: call SaveInteger(udg_Hash_Spin, udg_SPI3, 22, 33)
                        • Else - Actions
                • Else - Actions
            • Else - Actions
          • Custom script: call SaveReal(udg_Hash_Spin, udg_Handle_Spin, 17, udg_SR2)
          • -------- LAUNCH --------
          • -------- IT'S SUPER EFFECTIVE --------
          • Custom script: if udg_Spin_LaunchBool == false and LoadBoolean(udg_Hash_Spin, udg_Handle_Spin, 19) and LoadBoolean(udg_Hash_Spin, udg_Handle_Spin, 20) then
          • Custom script: call SaveBoolean(udg_Hash_Spin, udg_Handle_Spin, 21, true)
          • Custom script: endif
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SPI4 Equal to 1
            • Then - Actions
              • Hashtable - Clear all child hashtables of child Handle_Spin in Hash_Spin
              • Unit - Explode SPU
              • Set Spin_Integur = (Spin_Integur - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Spin_Integur Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_SP1)
      • Unit Group - Pick every unit in Spin_DamageGroup and do (Actions)
        • Loop - Actions
          • Set SPU = (Picked unit)
          • Custom script: set udg_SPI3 = GetHandleId(udg_SPU)
          • Custom script: set udg_SPI2 = LoadInteger(udg_Hash_Spin, udg_SPI3, 22)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • SPI2 Greater than 0
                  • (SPU is dead) Equal to False
                  • (SPU is Polymorphed) Equal to False
                  • (SPU is hidden) Equal to False
            • Then - Actions
              • Custom script: call SaveInteger(udg_Hash_Spin, udg_SPI3, 22, udg_SPI2 - 1)
            • Else - Actions
              • Custom script: call GroupRemoveUnit(udg_Spin_DamageGroup, udg_SPU)
              • Hashtable - Clear all child hashtables of child SPI3 in Hash_Spin
              • Set Spin_Integur = (Spin_Integur - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Spin_Integur Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions

Zp5xC.jpg

6J4J3.jpg



Update Log

v1.0 Uploaded
v1.1 Efficiency supreme
Keywords:
Spin, Lightning, Spiral, Comments, Herp, THE SPELL SPINS LIKE A CHAIR, SPIN IT TO WIN IT, SPIN ME BABY ONE MORE TIME, DERP, -, GUI, JASS, Capslock
Contents

Spin (Map)

Reviews
07:53, 22nd Jul 2012 Magtheridon96: Approved. THIS IS YOUR REVIEW http://www.hiveworkshop.com/forums/2187672-post3.html This spell is very well-written and readable :> It just needs a few minor enhancements.

Moderator

M

Moderator

07:53, 22nd Jul 2012
Magtheridon96: Approved.

THIS IS YOUR REVIEW
http://www.hiveworkshop.com/forums/2187672-post3.html

This spell is very well-written and readable :>
It just needs a few minor enhancements.
 
In JASS, == true is the most useless thing ever because you could remove it and be unaffected ^_^

edit
So much win xD

Tips:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • SPI3 Equal to 1
    • Then - Actions
      • Custom script: call SetLightningColor(udg_SL, 1, 1, 1, 1)
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SPI3 Equal to 2
        • Then - Actions
          • Custom script: call SetLightningColor(udg_SL, 0, 1, 1, 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SPI3 Equal to 3
            • Then - Actions
              • Custom script: call SetLightningColor(udg_SL, 1, 0, 1, 1)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SPI3 Equal to 4
                • Then - Actions
                  • Custom script: call SetLightningColor(udg_SL, 1, 1, 0, 1)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • SPI3 Equal to 5
                    • Then - Actions
                      • Custom script: call SetLightningColor(udg_SL, .75, .75, .75, 1)
                    • Else - Actions
What if I told you,
this could all be optimized to ONE line O: :O O:
(You need 3 arrays to set on map init)

edit
Since I know you're an exceptional GUIer and decent JASS-scripter, I'm going to be a bit stricter here ;D

Since you're using custom scripts, you might as well use coordinates instead of locations :p
Instead of the target point, use GetSpellTargetX() and GetSpellTargetY().

edit
This also means that CreateUnitAtLoc has got to go. Use CreateUnit.

edit
A better screenshot would be nice :C
 
Last edited:
Top