I made an ability but i don't know that i have made it correctly, can you guys please take a look at it?
-
Repel
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Repel
-
-

Actions
-


-------- Config --------
-


Custom script: local unit r = GetSpellTargetUnit()
-


Custom script: local location rp = GetSpellTargetLoc()
-


Custom script: set udg_Repel_Target = r
-


Custom script: set udg_Repel_Point = rp
-


Unit - Create 1 Dummy for (Owner of Repel_Target) at Repel_Point facing Default building facing degrees
-


Set Repel_Dummy = (Last created unit)
-


Unit - Add Abolish Magic (Repel) to Repel_Dummy
-


Unit - Order Repel_Dummy to Night Elf Dryad - Abolish Magic Repel_Target
-


Unit - Add a 0.20 second Generic expiration timer to Dummy
-


Unit - Add Repel (Resistant) to Repel_Target
-


Unit - For Repel_Target, Ability Repel (Resistant), Hide ability: True
-


-------- Regenerates hit points over time --------
-


If ((Level of Repel for (Triggering unit)) Equal to 1) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 8.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 2) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 12.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 3) then do (Unit - Set life of Repel_Target to ((Life of Repel
-


Wait 1.12 game-time seconds
-


Custom script: set udg_Repel_Target = r
-


If ((Level of Repel for (Triggering unit)) Equal to 1) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 8.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 2) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 12.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 3) then do (Unit - Set life of Repel_Target to ((Life of Repel
-


Wait 1.12 game-time seconds
-


Custom script: set udg_Repel_Target = r
-


If ((Level of Repel for (Triggering unit)) Equal to 1) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 8.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 2) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 12.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 3) then do (Unit - Set life of Repel_Target to ((Life of Repel
-


Wait 1.12 game-time seconds
-


Custom script: set udg_Repel_Target = r
-


If ((Level of Repel for (Triggering unit)) Equal to 1) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 8.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 2) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 12.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 3) then do (Unit - Set life of Repel_Target to ((Life of Repel
-


Wait 1.12 game-time seconds
-


Custom script: set udg_Repel_Target = r
-


If ((Level of Repel for (Triggering unit)) Equal to 1) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 8.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 2) then do (Unit - Set life of Repel_Target to ((Life of Repel_Target) + 12.00)) else do (If ((Level of Repel for (Triggering unit)) Equal to 3) then do (Unit - Set life of Repel_Target to ((Life of Repel
-


Unit - Remove Repel (Resistant) from Repel_Target
-


-------- Remove leak --------
-


Custom script: call RemoveLocation(udg_Repel_Point)
-


Custom script: set rp = null
-


Custom script: set r = null
-


Custom script: set udg_Repel_Caster = null
-


Custom script: set udg_Repel_Target = null
-


Custom script: set udg_Repel_Dummy = null
-


Custom script: set udg_Repel_Point = null
-
-
