- Joined
- Apr 24, 2012
- Messages
- 9,842
I adore Vel'Koz and this spell.
Good work!
Necrotic Beam Config

Events


Map initialization

Conditions

Actions


-------- ========================= --------


-------- --------


-------- Ability that will be used to cast the spell --------


Set VariableSet EyBe_Config_Ability[0] = Necrotic Beam


-------- --------


-------- Dummy's slow spell --------


Set VariableSet EyBe_Config_Ability[1] = Slow [EyBe]


-------- --------


-------- Dummy used to cast the slow spell --------


Set VariableSet EyBe_Config_D_Type = Universal Dummy Unit [EyBe]


-------- --------


-------- order id of the spell, if the caster is not channeling with this specifc order ID the spell will fail --------


-------- check object editor and the spell itself to see "DATA - BASE ORDER ID" to see what this spell currently has, by default it will have "starfall" --------


Set VariableSet EyBe_Config_Ability_Order_ID = starfall


-------- --------


-------- Damage is calculated ( Dam * Tick) I.e. the Default 180 will deal a total of 45 damage per (default) 0.25 seconds --------


-------- Base damage --------


Set VariableSet EyBe_Config_Damage[0] = 110.00


-------- Damage Per Level --------


Set VariableSet EyBe_Config_Damage_Bonus[1] = 70.00


Set VariableSet EyBe_Config_Damage_Bonus[2] = 140.00


Set VariableSet EyBe_Config_Damage_Bonus[3] = 210.00


-------- --------


-------- Duration of the spell --------


Set VariableSet EyBe_Config_Duration[1] = 2.50


Set VariableSet EyBe_Config_Duration[2] = 2.50


Set VariableSet EyBe_Config_Duration[3] = 2.50


-------- --------


-------- Duration of the slow --------


Set VariableSet EyBe_Config_Duration_Slow[1] = 1.00


Set VariableSet EyBe_Config_Duration_Slow[2] = 1.00


Set VariableSet EyBe_Config_Duration_Slow[3] = 1.00


-------- --------


-------- Slow Percentage --------


Set VariableSet EyBe_Config_Slow[1] = 0.20


Set VariableSet EyBe_Config_Slow[2] = 0.20


Set VariableSet EyBe_Config_Slow[3] = 0.20


-------- --------


-------- Laser Butt Effect --------


Set VariableSet EyBe_Config_Effect_Path[0] = Abilities\Spells\Other\Parasite\ParasiteMissile.mdl


-------- --------


-------- Laser Hit Effect --------


Set VariableSet EyBe_Config_Effect_Path[1] = Abilities\Weapons\DemonHunterMissile\DemonHunterMissile.mdl


-------- --------


-------- Height Value --------


-------- Of Lightning --------


Set VariableSet EyBe_Config_Height[0] = 80.00


-------- On hit effect --------


Set VariableSet EyBe_Config_Height[1] = 15.00


-------- --------


-------- What Flavor of annihilation --------


Set VariableSet EyBe_Config_Lightning_Type = Mana Burn


-------- --------


-------- Increase this if you find the End point jitterying too much, or negate from it if you find it's not accurate enough --------


Set VariableSet EyBe_Config_Margin = 25.00


-------- --------


-------- How fast does periodic timer run --------


Set VariableSet EyBe_Config_Periodic = 0.03


Trigger - Add to Necrotic Beam Periodic <gen> the event (Time - Every EyBe_Config_Periodic seconds of game time)


-------- --------


-------- Range of Spell --------


Set VariableSet EyBe_Config_Range = 1000.00


-------- --------


-------- Width of laser --------


Set VariableSet EyBe_Config_Width[1] = 72.00


Set VariableSet EyBe_Config_Width[2] = 72.00


Set VariableSet EyBe_Config_Width[3] = 72.00


-------- --------


-------- how fast the caster can reposition the laser --------


Set VariableSet EyBe_Config_Speed[1] = 1.05


Set VariableSet EyBe_Config_Speed[2] = 1.05


Set VariableSet EyBe_Config_Speed[3] = 1.05


-------- --------


-------- This value visiually negates from the total length of the laser --------


-------- I.e. Default range is 1000, witth this value the visual laser will sit at 950. --------


Set VariableSet EyBe_Config_End_P_Offset = 65.00


-------- --------


-------- how often damage & dummy slow occurs --------


-------- Warning, changing this value to be --------


Set VariableSet EyBe_Config_Tick = 0.25


-------- --------


-------- create our dummy for for future hocus pocus stuff. --------


Set VariableSet EyBe_Point[9] = (Center of (Playable map area))


Unit - Create 1 EyBe_Config_D_Type for Neutral Passive at EyBe_Point[9] facing Default building facing degrees


Set VariableSet EyBe_Unit_Dummy = (Last created unit)


Unit - Add EyBe_Config_Ability[1] to EyBe_Unit_Dummy


Custom script: call RemoveLocation(udg_EyBe_Point[9])


-------- create our dummy for for future hocus pocus stuff. --------


-------- ========================= --------
Necrotic Beam Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to EyBe_Config_Ability[0]

Actions


-------- ========================= --------


-------- --------


-------- Get the lay of the land --------


Set VariableSet EyBe_Unit[1] = (Triggering unit)


Set VariableSet EyBe_Point[0] = (Position of EyBe_Unit[1])


Set VariableSet EyBe_Point[1] = (Target point of ability being cast)


Set VariableSet EyBe_Point[2] = (EyBe_Point[0] offset by (EyBe_Config_Range - EyBe_Config_End_P_Offset) towards (Angle from EyBe_Point[0] to EyBe_Point[1]) degrees.)


Set VariableSet EyBe_LvL = (Level of EyBe_Config_Ability[0] for EyBe_Unit[1])


-------- Get the lay of the land --------


-------- --------


-------- Rev up them Indexes --------


Set VariableSet EyBe_Index = (EyBe_Index + 1)


-------- --------


-------- Negotiate with the triggers about where the lightning will be created --------


Custom script: set udg_EyBe_Point_Z_Height[0] = GetLocationZ(udg_EyBe_Point[0])


Set VariableSet EyBe_XYZ[1] = (X of EyBe_Point[0])


Set VariableSet EyBe_XYZ[2] = (Y of EyBe_Point[0])


Set VariableSet EyBe_XYZ[3] = ((Current flying height of EyBe_Unit_Caster[EyBe_Loop]) + (EyBe_Config_Height[0] + EyBe_Point_Z_Height[0]))


Custom script: set udg_EyBe_Point_Z_Height[1] = GetLocationZ(udg_EyBe_Point[2])


Set VariableSet EyBe_XYZ2[1] = (X of EyBe_Point[2])


Set VariableSet EyBe_XYZ2[2] = (Y of EyBe_Point[2])


Set VariableSet EyBe_XYZ2[3] = (EyBe_Config_Height[0] + EyBe_Point_Z_Height[1])


-------- --------


-------- Create some lighning like some rad 90's wizard on some dad's van --------


Custom script: set udg_EyBe_Lightning[(udg_EyBe_Index)] = AddLightningEx(udg_EyBe_Config_Lightning_Type, true, udg_EyBe_XYZ[1], udg_EyBe_XYZ[2], udg_EyBe_XYZ[3], udg_EyBe_XYZ2[1], udg_EyBe_XYZ2[2], udg_EyBe_XYZ2[3])


-------- --------


-------- Store some values in our index for later use --------


Set VariableSet EyBe_Unit_Caster[EyBe_Index] = EyBe_Unit[1]


Set VariableSet EyBe_UnitC_Angle[EyBe_Index] = (Angle from EyBe_Point[0] to EyBe_Point[2])


Set VariableSet EyBe_Damage[EyBe_Index] = (EyBe_Config_Damage[0] + EyBe_Config_Damage_Bonus[EyBe_LvL])


Set VariableSet EyBe_Duration[EyBe_Index] = EyBe_Config_Duration[EyBe_LvL]


Set VariableSet EyBe_Duration_Slow[EyBe_Index] = EyBe_Config_Duration_Slow[EyBe_LvL]


Set VariableSet EyBe_Owner[EyBe_Index] = (Owner of EyBe_Unit[1])


Set VariableSet EyBe_Slow[EyBe_Index] = EyBe_Config_Slow[EyBe_LvL]


Set VariableSet EyBe_Tick[EyBe_Index] = 0.00


Set VariableSet EyBe_Width[EyBe_Index] = EyBe_Config_Width[EyBe_LvL]


-------- --------


-------- Rip the attention of our wizard to our wishes instead of truly asking how he feels --------


Unit - Make EyBe_Unit_Caster[EyBe_Loop] face EyBe_Point[2] over 0.00 seconds


-------- --------


-------- Create a shapely bottom for our laser, don't stare too long, it's rude --------


Special Effect - Create a special effect at EyBe_Point[2] using EyBe_Config_Effect_Path[0]


Special Effect - Set Scale of (Last created special effect) to 4.50


Set VariableSet EyBe_Point_Node[EyBe_Index] = (Last created special effect)


-------- --------


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




EyBe_Index Equal to 1



Then - Actions




Trigger - Turn on Necrotic Beam Periodic <gen>



Else - Actions


-------- --------


-------- Remove Locations we don't need any more --------


-------- This is a crucial step to ensure the map that uses this spell doesn't lag --------


-------- if you are curious and wish to know more about "Leaks" visit https://www.hiveworkshop.com/threads/things-that-leak.35124/ to learn more --------


Custom script: call RemoveLocation(udg_EyBe_Point[0])


Custom script: call RemoveLocation(udg_EyBe_Point[1])


Custom script: call RemoveLocation(udg_EyBe_Point[2])


-------- --------


-------- ========================= --------
Necrotic Beam Periodic

Events

Conditions

Actions


For each (Integer EyBe_Loop) from 1 to EyBe_Index, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






Or - Any (Conditions) are true







Conditions








(Current order of EyBe_Unit_Caster[EyBe_Loop]) Not equal to (Order(EyBe_Config_Ability_Order_ID))








EyBe_Duration[EyBe_Loop] Less than EyBe_Config_Periodic








(EyBe_Unit_Caster[EyBe_Loop] is alive) Equal to False





Then - Actions






-------- ========================= --------






-------- --------






-------- End, The laser is over, go home --------






-------- Destroy stuff we ain't using --------






Lightning - Destroy EyBe_Lightning[EyBe_Loop]






Special Effect - Destroy EyBe_Point_Node[EyBe_Loop]






-------- --------






-------- De-index the variables we used --------






Set VariableSet EyBe_Damage[EyBe_Loop] = EyBe_Damage[EyBe_Index]






Set VariableSet EyBe_Duration[EyBe_Loop] = EyBe_Duration[EyBe_Index]






Set VariableSet EyBe_Duration_Slow[EyBe_Loop] = EyBe_Config_Duration_Slow[EyBe_Index]






Set VariableSet EyBe_Lightning[EyBe_Loop] = EyBe_Lightning[EyBe_Index]






Set VariableSet EyBe_Owner[EyBe_Loop] = EyBe_Owner[EyBe_Index]






Set VariableSet EyBe_MouseX_Prev[EyBe_Loop] = EyBe_MouseX_Prev[EyBe_Index]






Set VariableSet EyBe_MouseY_Prev[EyBe_Loop] = EyBe_MouseY_Prev[EyBe_Index]






Set VariableSet EyBe_Point_Node[EyBe_Loop] = EyBe_Point_Node[EyBe_Index]






Set VariableSet EyBe_Slow[EyBe_Loop] = EyBe_Slow[EyBe_Index]






Set VariableSet EyBe_Tick[EyBe_Loop] = EyBe_Tick[EyBe_Index]






Set VariableSet EyBe_UnitC_Angle[EyBe_Loop] = EyBe_UnitC_Angle[EyBe_Index]






Set VariableSet EyBe_Unit_Caster[EyBe_Loop] = EyBe_Unit_Caster[EyBe_Index]






Set VariableSet EyBe_Width[EyBe_Loop] = EyBe_Width[EyBe_Index]






Set VariableSet EyBe_Loop = (EyBe_Loop - 1)






Set VariableSet EyBe_Index = (EyBe_Index - 1)






-------- If no more lasers are running, turn off the trigger, much like you turn off the lights when you leave the room --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








EyBe_Index Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions






-------- --------






-------- ========================= --------





Else - Actions






-------- ========================= --------






-------- --------






-------- Remove some of the time left on the spell --------






Set VariableSet EyBe_Duration[EyBe_Loop] = (EyBe_Duration[EyBe_Loop] - EyBe_Config_Periodic)






-------- Remove some of the time left on the spell --------






-------- --------






-------- Get our Bearings --------






Set VariableSet EyBe_Point[3] = (Position of EyBe_Unit_Caster[EyBe_Loop])






Set VariableSet EyBe_Point[4] = (Point((Position - X of EyBe_Point_Node[EyBe_Loop].), (Position - Y of EyBe_Point_Node[EyBe_Loop].)))






-------- --------






Custom script: set udg_EyBe_MouseX = GetPlayerMouseX(GetOwningPlayer(udg_EyBe_Unit_Caster[udg_EyBe_Loop]))






Custom script: set udg_EyBe_MouseY = GetPlayerMouseY(GetOwningPlayer(udg_EyBe_Unit_Caster[udg_EyBe_Loop]))






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








EyBe_MouseX Equal to 0.00








EyBe_MouseY Equal to 0.00







Then - Actions








Set VariableSet EyBe_Point[5] = (Point(EyBe_MouseX_Prev[EyBe_Loop], EyBe_MouseY_Prev[EyBe_Loop]))







Else - Actions








Set VariableSet EyBe_Point[5] = (Point(EyBe_MouseX, EyBe_MouseY))








Set VariableSet EyBe_MouseX_Prev[EyBe_Loop] = (X of EyBe_Point[5])








Set VariableSet EyBe_MouseY_Prev[EyBe_Loop] = (Y of EyBe_Point[5])






-------- --------






Set VariableSet EyBe_Point[6] = (EyBe_Point[3] offset by (EyBe_Config_Range - EyBe_Config_End_P_Offset) towards (Angle from EyBe_Point[3] to EyBe_Point[5]) degrees.)






-------- --------






Set VariableSet EyBe_Tar_Angle = (Angle from EyBe_Point[3] to EyBe_Point[6])






-------- Get our Bearings --------






-------- --------






-------- Magne- err Mathematics how do they work? --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(Distance between EyBe_Point[4] and EyBe_Point[6]) Greater than EyBe_Config_Margin







Then - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










EyBe_Tar_Angle Greater than 180.00









Then - Actions










Set VariableSet EyBe_Tar_Angle = (EyBe_Tar_Angle - 360.00)









Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










EyBe_UnitC_Angle[EyBe_Loop] Greater than 180.00









Then - Actions










Set VariableSet EyBe_UnitC_Angle[EyBe_Loop] = (EyBe_UnitC_Angle[EyBe_Loop] - 360.00)









Else - Actions








Set VariableSet EyBe_Real[0] = (EyBe_Tar_Angle - EyBe_UnitC_Angle[EyBe_Loop])








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










EyBe_Real[0] Less than -180.00









Then - Actions










Set VariableSet EyBe_Real[0] = (EyBe_Real[0] + 360.00)









Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










EyBe_Real[0] Greater than 180.00









Then - Actions










Set VariableSet EyBe_Real[0] = (EyBe_Real[0] - 360.00)









Else - Actions








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










EyBe_Real[0] Greater than 0.00









Then - Actions










Set VariableSet EyBe_UnitC_Angle[EyBe_Loop] = (EyBe_UnitC_Angle[EyBe_Loop] + EyBe_Config_Speed[(Level of EyBe_Config_Ability[0] for EyBe_Unit_Caster[EyBe_Loop])])









Else - Actions










Set VariableSet EyBe_UnitC_Angle[EyBe_Loop] = (EyBe_UnitC_Angle[EyBe_Loop] - EyBe_Config_Speed[(Level of EyBe_Config_Ability[0] for EyBe_Unit_Caster[EyBe_Loop])])








Set VariableSet EyBe_Point[7] = (EyBe_Point[3] offset by (EyBe_Config_Range - EyBe_Config_End_P_Offset) towards EyBe_UnitC_Angle[EyBe_Loop] degrees.)







Else - Actions








Set VariableSet EyBe_Point[7] = EyBe_Point[6]






-------- Magne- err Mathematics how do they work? --------






-------- --------






Special Effect - Set Position of EyBe_Point_Node[EyBe_Loop] to EyBe_Point[7]






-------- --------






-------- --------






-------- Make the caster do kissy faces towards their opponents. --------






Unit - Make EyBe_Unit_Caster[EyBe_Loop] face EyBe_Point[4] over 0.00 seconds






-------- Make the caster do kissy faces towards their opponents. --------






-------- --------






-------- Let the Lightning know our bearings --------






Custom script: set udg_EyBe_Point_Z_Height[2] = GetLocationZ(udg_EyBe_Point[3])






Set VariableSet EyBe_XYZ[4] = (X of EyBe_Point[3])






Set VariableSet EyBe_XYZ[5] = (Y of EyBe_Point[3])






Set VariableSet EyBe_XYZ[6] = ((Current flying height of EyBe_Unit_Caster[EyBe_Loop]) + (EyBe_Config_Height[0] + EyBe_Point_Z_Height[2]))






Custom script: set udg_EyBe_Point_Z_Height[3] = GetLocationZ(udg_EyBe_Point[7])






Set VariableSet EyBe_XYZ2[4] = (X of EyBe_Point[7])






Set VariableSet EyBe_XYZ2[5] = (Y of EyBe_Point[7])






Set VariableSet EyBe_XYZ2[6] = (EyBe_Config_Height[0] + EyBe_Point_Z_Height[3])






-------- Let the Lightning know our bearings --------






-------- --------






-------- Ensure our Laser End point is at a proper height --------






Special Effect - Set Position - Z of EyBe_Point_Node[EyBe_Loop] to (EyBe_Point_Z_Height[3] + EyBe_Config_Height[0])






-------- Ensure our Laser End point is at a proper height --------






-------- --------






-------- Move the Laser according the above Values --------






-------- also pray to Shiva that you spelt each variable correctly --------






Custom script: call MoveLightningEx(udg_EyBe_Lightning[(udg_EyBe_Loop)], true, udg_EyBe_XYZ[4], udg_EyBe_XYZ[5], udg_EyBe_XYZ[6], udg_EyBe_XYZ2[4], udg_EyBe_XYZ2[5], udg_EyBe_XYZ2[6])






-------- also pray to Shiva that you spelt each variable correctly --------






-------- Move the Laser according the above Values --------






-------- --------






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








EyBe_Tick[EyBe_Loop] Less than EyBe_Config_Periodic







Then - Actions








-------- ========================= --------








-------- --------








-------- Tick tock be sure to set back the clock! --------








Set VariableSet EyBe_Tick[EyBe_Loop] = EyBe_Config_Tick








-------- Tick tock be sure to set back the clock! --------








-------- --------








-------- Outsource Enum to Icemanbo's wonderful system --------








Set VariableSet LSE_Loc_1 = EyBe_Point[3]








Set VariableSet LSE_Loc_2 = (EyBe_Point[3] offset by EyBe_Config_Range towards (Angle from EyBe_Point[3] to EyBe_Point[4]) degrees.)








Set VariableSet LSE_Offset = EyBe_Width[EyBe_Loop]








Trigger - Run LSE_GetUnits (ignoring conditions)








-------- Outsource Enum to Icemanbo's wonderful system --------








-------- --------








-------- Form a pact with Gulog on the terrible to humbly request that he be a big dummy for us --------








Ability - Set Ability: (Unit: EyBe_Unit_Dummy's Ability with Ability Code: EyBe_Config_Ability[1])'s Real Level Field: Movement Speed Factor ('Slo1') of Level: 0 to EyBe_Slow[EyBe_Loop]








Ability - Set Ability: (Unit: EyBe_Unit_Dummy's Ability with Ability Code: EyBe_Config_Ability[1])'s Real Level Field: Duration - Normal ('adur') of Level: 0 to EyBe_Duration_Slow[EyBe_Loop]








Ability - Set Ability: (Unit: EyBe_Unit_Dummy's Ability with Ability Code: EyBe_Config_Ability[1])'s Real Level Field: Duration - Hero ('ahdu') of Level: 0 to EyBe_Duration_Slow[EyBe_Loop]








-------- Form a pact with Gulog on the terrible to humbly request that he be a big dummy for us --------








-------- --------








-------- Literally compact +50 lines into 5 thanks to Icemanbo --------








Unit Group - Pick every unit in LSE_Group and do (Actions)









Loop - Actions










Set VariableSet EyBe_Unit[3] = (Picked unit)










If (All Conditions are True) then do (Then Actions) else do (Else Actions)











If - Conditions












(EyBe_Unit[3] is A structure) Equal to False












(EyBe_Unit[3] is Magic Immune) Equal to False












(EyBe_Unit[3] is dead) Equal to False












(EyBe_Unit[3] belongs to an ally of EyBe_Owner[EyBe_Loop].) Equal to False












EyBe_Unit[3] Not equal to EyBe_Unit_Caster[EyBe_Loop]











Then - Actions












Set VariableSet EyBe_Point[8] = (Position of EyBe_Unit[3])












Unit - Order EyBe_Unit_Dummy to Human Sorceress - Slow EyBe_Unit[3]












Custom script: set udg_EyBe_Point_Z_Height[5] = GetLocationZ(udg_EyBe_Point[8])












Special Effect - Create a special effect at EyBe_Point[8] using EyBe_Config_Effect_Path[1]












Set VariableSet EyBe_Spef = (Last created special effect)












Special Effect - Set Height of EyBe_Spef to: (EyBe_Config_Height[1] + (EyBe_Point_Z_Height[5] + (Current flying height of EyBe_Unit[3])))












Special Effect - Set Yaw of EyBe_Spef to: (Radians((Angle from EyBe_Point[3] to EyBe_Point[8])))












Special Effect - Destroy EyBe_Spef












Unit - Cause EyBe_Unit_Caster[EyBe_Loop] to damage EyBe_Unit[3], dealing (EyBe_Damage[EyBe_Loop] x EyBe_Config_Tick) damage of attack type Spells and damage type Universal












Custom script: call RemoveLocation(udg_EyBe_Point[8])











Else - Actions








-------- Literally compact +50 lines into 5 thanks to Icemanbo --------








-------- --------








Custom script: call RemoveLocation(udg_LSE_Loc_1)








Custom script: call RemoveLocation(udg_LSE_Loc_2)








-------- --------








-------- ========================= --------







Else - Actions








Set VariableSet EyBe_Tick[EyBe_Loop] = (EyBe_Tick[EyBe_Loop] - EyBe_Config_Periodic)






-------- Pick Unit FIlter --------






-------- --------






-------- --------






-------- Remove Locaitons so we don't leak them later on --------






Custom script: call RemoveLocation(udg_EyBe_Point[3])






Custom script: call RemoveLocation(udg_EyBe_Point[4])






Custom script: call RemoveLocation(udg_EyBe_Point[5])






Custom script: call RemoveLocation(udg_EyBe_Point[6])






Custom script: call RemoveLocation(udg_EyBe_Point[7])






-------- Remove Locaitons so we don't leak them later on --------






-------- --------






-------- ========================= --------