-Spell is GUI.

-Spell is MUI.

-Spell uses the indexing method.

-Spell is leakless and lagless.

Spell description -

Charges electric powers with his hands, such force of electricity can vanish units to the past, then unleashes an electrical ball that when it reaches the point, it runs an electrical vortex that stops time of units and vanishes them for 4/6/8 seconds but the fading process takes 3 seconds and when the units return they will be dealt 100/200/300 damage and confused, missing 50% on their attacks for 6 seconds.

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

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

The Following GUI MUI ... method uses Rrecycling and fully EFFICIENT !

-Spell is MUI.

-Spell uses the indexing method.

-Spell is leakless and lagless.

Spell description -

Charges electric powers with his hands, such force of electricity can vanish units to the past, then unleashes an electrical ball that when it reaches the point, it runs an electrical vortex that stops time of units and vanishes them for 4/6/8 seconds but the fading process takes 3 seconds and when the units return they will be dealt 100/200/300 damage and confused, missing 50% on their attacks for 6 seconds.

Trigger:

- Electric Vortex On
- Events
- Unit - A unit Starts the effect of an ability

- Conditions
- (Ability being cast) Equal to Electric Vortex

- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Times Equal to 0

- Then - Actions
- Trigger - Turn on Electric Vortex Loop <gen>

- Else - Actions

- If - Conditions
- Set EV_Times = (EV_Times + 1)
- Set EV_Skip = (EV_Skip + 1)
- Set EV_Off[EV_Times] = True
- -------- ----------------------------------------------------------------------------------------------------------------- --------
- Set EV_Caster[EV_Times] = (Casting unit)
- Set EV_Point[0] = (Position of EV_Caster[EV_Times])
- Set EV_Point[1] = (Target point of ability being cast)
- -------- ----------------------------------------------------------------------------------------------------------------- --------
- Set EV_Part[EV_Times] = 0
- Set EV_Level[EV_Times] = (Level of Electric Vortex for EV_Caster[EV_Times])
- Set EV_Distance[EV_Times] = (Distance between EV_Point[0] and EV_Point[1])
- Set EV_Angle[EV_Times] = (Angle from EV_Point[0] to EV_Point[1])
- Set EV_Speed[EV_Times] = 15.00
- Set EV_Max_Height[EV_Times] = 400.00
- Set EV_Raise_Speed[EV_Times] = ((EV_Speed[EV_Times] / EV_Distance[EV_Times]) x EV_Max_Height[EV_Times])
- Set EV_Max_Height[EV_Times] = 0.00
- -------- ----------------------------------------------------------------------------------------------------------------- --------
- Unit - Create 1 Dummy_For_Map for (Owner of EV_Caster[EV_Times]) at EV_Point[0] facing Default building facing degrees
- Set EV_Dummy[EV_Times] = (Last created unit)
- Special Effect - Create a special effect attached to the chest of EV_Dummy[EV_Times] using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
- Set EV_SpecialEffect[EV_Times] = (Last created special effect)
- Custom script: call RemoveLocation(udg_EV_Point[0])
- Custom script: call RemoveLocation(udg_EV_Point[1])

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

- Events

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

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

Trigger:

- Electric Vortex Loop
- Events
- Time - Every 0.02 seconds of game time

- Conditions
- Actions
- Custom script: local real x1
- Custom script: local real y1
- Custom script: local real z1
- Custom script: local real x2
- Custom script: local real y2
- Custom script: local real z2
- For each (Integer EV) from 1 to EV_Times, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Off[EV] Equal to True

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- EV_Part[EV] Equal to 0
- EV_Part[EV] Equal to 2

- Conditions

- Or - Any (Conditions) are true
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Distance[EV] Less than or equal to 0.00

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 0

- Then - Actions
- Set EV_Part[EV] = 1
- Set EV_Distance[EV] = ((10.15 + (2.00 x (Real(EV_Level[EV])))) / 0.02)
- Set EV_Point[4] = (Position of EV_Dummy[EV])
- For each (Integer EV_Looper[0]) from 1 to 6, do (Actions)
- Loop - Actions
- Set EV_Times = (EV_Times + 1)
- Set EV_Skip = (EV_Skip + 1)
- Set EV_Off[EV_Times] = True
- Set EV_Caster[EV_Times] = EV_Dummy[EV]
- Set EV_Level[EV_Times] = EV_Level[EV]
- Set EV_Point[5] = (EV_Point[4] offset by 300.00 towards (60.00 x (Real(EV_Looper[0]))) degrees)
- Set EV_Part[EV_Times] = 2
- Set EV_Distance[EV_Times] = (Distance between EV_Point[4] and EV_Point[5])
- Set EV_Distance_Decoy[EV_Times] = 300.00
- Set EV_Angle[EV_Times] = (Angle from EV_Point[4] to EV_Point[5])
- Set EV_Speed[EV_Times] = 3.00
- Set EV_Max_Height[EV_Times] = (Current flying height of EV_Dummy[EV])
- Set EV_Raise_Speed[EV_Times] = ((EV_Speed[EV_Times] / EV_Distance[EV_Times]) x EV_Max_Height[EV_Times])
- Unit - Create 1 Dummy_For_Map for (Owner of EV_Caster[EV_Times]) at EV_Point[4] facing Default building facing degrees
- Animation - Change EV_Dummy[EV_Times] flying height to (Current flying height of EV_Dummy[EV]) at 0.00
- Set EV_Dummy[EV_Times] = (Last created unit)
- Custom script: set udg_EV_Z[udg_EV_Times] = GetLocationZ(udg_EV_Point[4])
- Custom script: set x1 = GetUnitX(udg_EV_Dummy[udg_EV])
- Custom script: set y1 = GetUnitY(udg_EV_Dummy[udg_EV])
- Custom script: set z1 = GetUnitFlyHeight(udg_EV_Dummy[udg_EV])
- Custom script: set z1 = (z1 + 60) + (udg_EV_Z[udg_EV_Times])
- Custom script: set x2 = GetUnitX(udg_EV_Dummy[udg_EV_Times])
- Custom script: set y2 = GetUnitY(udg_EV_Dummy[udg_EV_Times])
- Custom script: set z2 = GetUnitFlyHeight(udg_EV_Dummy[udg_EV_Times])
- Custom script: set z2 = (z2 + 60) + (udg_EV_Z[udg_EV_Times])
- Custom script: set udg_EV_Light[udg_EV_Times] = AddLightningEx("CLPB", false, x1, y1, z1, x2, y2, z2)
- Special Effect - Create a special effect attached to the chest of EV_Dummy[EV_Times] using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
- Set EV_SpecialEffect[EV_Times] = (Last created special effect)
- Custom script: call RemoveLocation(udg_EV_Point[5])

- Loop - Actions
- Set EV_Group[EV] = (Units within 300.00 of EV_Point[4] matching (((Owner of (Matching unit)) Not equal to (Owner of EV_Dummy[EV])) and ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is A flying unit) Not equal to True) and ((((Matching unit) belong
- Unit Group - Pick every unit in EV_Group[EV] and do (Actions)
- Loop - Actions
- Set EV_Times = (EV_Times + 1)
- Set EV_Skip = (EV_Skip + 1)
- Set EV_Off[EV_Times] = True
- Set EV_Part[EV_Times] = 4
- Set EV_Caster[EV_Times] = (Picked unit)
- Set EV_Dummy[EV_Times] = EV_Caster[EV]
- Set EV_Level[EV_Times] = EV_Level[EV]
- Set EV_Distance[EV_Times] = 0.00
- Set EV_Raise_Speed[EV_Times] = 300.00
- Set EV_Speed[EV_Times] = 3.00
- Set EV_Angle[EV_Times] = ((100.00 x 0.02) / EV_Speed[EV_Times])
- Animation - Change EV_Caster[EV_Times]'s animation speed to 0.00% of its original speed
- Unit - Pause EV_Caster[EV_Times]

- Loop - Actions
- Custom script: call DestroyGroup(udg_EV_Group[udg_EV])
- Custom script: call RemoveLocation(udg_EV_Point[4])

- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 2

- Then - Actions
- Set EV_Part[EV] = 3
- Set EV_Distance[EV] = EV_Distance_Decoy[EV]
- Set EV_Angle[EV] = 0.10
- Set EV_Speed[EV] = 0.15
- Set EV_Max_Height[EV] = 150.00
- Set EV_Raise_Speed[EV] = (EV_Max_Height[EV] / 2.00)

- Else - Actions

- If - Conditions

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

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Set EV_Distance[EV] = (EV_Distance[EV] - EV_Speed[EV])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 0

- Then - Actions
- Set EV_Max_Height[EV] = (EV_Max_Height[EV] + EV_Raise_Speed[EV])

- Else - Actions
- Set EV_Max_Height[EV] = (EV_Max_Height[EV] - EV_Raise_Speed[EV])

- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 2

- Then - Actions
- Custom script: set x1 = GetUnitX(udg_EV_Caster[udg_EV])
- Custom script: set y1 = GetUnitY(udg_EV_Caster[udg_EV])
- Custom script: set z1 = GetUnitFlyHeight(udg_EV_Caster[udg_EV])
- Custom script: set z1 = (z1 + 60) + (udg_EV_Z[udg_EV])
- Custom script: set x2 = GetUnitX(udg_EV_Dummy[udg_EV])
- Custom script: set y2 = GetUnitY(udg_EV_Dummy[udg_EV])
- Custom script: set z2 = GetUnitFlyHeight(udg_EV_Dummy[udg_EV])
- Custom script: set z2 = (z2 + 60) + (udg_EV_Z[udg_EV])
- Custom script: call MoveLightningEx(udg_EV_Light[udg_EV], false, x1, y1, z1, x2, y2, z2)

- Else - Actions

- If - Conditions
- Set EV_Point[2] = (Position of EV_Dummy[EV])
- Set EV_Point[3] = (EV_Point[2] offset by EV_Speed[EV] towards EV_Angle[EV] degrees)
- Unit - Move EV_Dummy[EV] instantly to EV_Point[3]
- Custom script: call RemoveLocation(udg_EV_Point[2])
- Custom script: call RemoveLocation(udg_EV_Point[3])
- Animation - Change EV_Dummy[EV] flying height to EV_Max_Height[EV] at 0.00

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- EV_Part[EV] Equal to 3
- EV_Part[EV] Equal to 8

- Conditions

- Or - Any (Conditions) are true
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Max_Height[EV] Less than or equal to 0.00

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 3

- Then - Actions
- Set EV_Part[EV] = 6
- Set EV_Distance[EV] = ((((Real(EV_Level[EV])) x 2.00) + 2.00) / 0.02)

- Else - Actions
- Set EV_Off[EV] = False
- Set EV_Skip = (EV_Skip - 1)
- Set EV_Point[9] = (Position of EV_Dummy[EV])
- Special Effect - Create a special effect at EV_Point[9] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation(udg_EV_Point[9])
- Lightning - Destroy EV_Light[EV]
- Special Effect - Destroy EV_SpecialEffect[EV]
- Unit - Add a 0.01 second Generic expiration timer to EV_Dummy[EV]

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Set EV_Max_Height[EV] = (EV_Max_Height[EV] - 1.00)
- Set EV_Point[6] = (Position of EV_Dummy[EV])
- Set EV_Point[7] = (Position of EV_Caster[EV])
- Set EV_Point[8] = (EV_Point[7] offset by EV_Distance[EV] towards ((Angle from EV_Point[7] to EV_Point[6]) + EV_Angle[EV]) degrees)
- Custom script: call SetUnitX(udg_EV_Dummy[udg_EV], GetLocationX(udg_EV_Point[8]))
- Custom script: call SetUnitY(udg_EV_Dummy[udg_EV], GetLocationY(udg_EV_Point[8]))
- Custom script: set x1 = GetUnitX(udg_EV_Caster[udg_EV])
- Custom script: set y1 = GetUnitY(udg_EV_Caster[udg_EV])
- Custom script: set z1 = GetUnitFlyHeight(udg_EV_Caster[udg_EV])
- Custom script: set z1 = (z1 + 60) + (udg_EV_Z[udg_EV])
- Custom script: set x2 = GetUnitX(udg_EV_Dummy[udg_EV])
- Custom script: set y2 = GetUnitY(udg_EV_Dummy[udg_EV])
- Custom script: set z2 = GetUnitFlyHeight(udg_EV_Dummy[udg_EV])
- Custom script: set z2 = (z2 + 60) + (udg_EV_Z[udg_EV])
- Custom script: call MoveLightningEx(udg_EV_Light[udg_EV], false, x1, y1, z1, x2, y2, z2)
- Custom script: call RemoveLocation(udg_EV_Point[6])
- Custom script: call RemoveLocation(udg_EV_Point[7])
- Custom script: call RemoveLocation(udg_EV_Point[8])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Max_Height[EV] Less than or equal to EV_Raise_Speed[EV]

- Then - Actions
- Set EV_Angle[EV] = (EV_Angle[EV] - EV_Speed[EV])

- Else - Actions
- Set EV_Angle[EV] = (EV_Angle[EV] + EV_Speed[EV])
- Set EV_Angle[EV] = (EV_Angle[EV] mod 360.00)

- If - Conditions

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- EV_Part[EV] Equal to 4
- EV_Part[EV] Equal to 7

- Conditions

- Or - Any (Conditions) are true
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Raise_Speed[EV] Less than or equal to 0.00

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 4

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Distance[EV] Greater than or equal to 100.00

- Then - Actions
- Set EV_Part[EV] = 5
- Set EV_Distance[EV] = ((((Real(EV_Level[EV])) x 2.00) + 2.00) / 0.02)
- Set EV_Raise_Speed[EV] = 0.00
- Unit - Hide EV_Caster[EV]

- Else - Actions
- Set EV_Distance[EV] = (EV_Distance[EV] + EV_Angle[EV])

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 7

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Distance[EV] Less than or equal to 0.00

- Then - Actions
- Set EV_Off[EV] = False
- Set EV_Skip = (EV_Skip - 1)
- Animation - Change EV_Caster[EV]'s animation speed to 100.00% of its original speed
- Unit - Unpause EV_Caster[EV]
- Unit - Cause EV_Dummy[EV] to damage EV_Caster[EV], dealing ((Real(EV_Level[EV])) x 100.00) damage of attack type Spells and damage type Normal

- Else - Actions
- Set EV_Distance[EV] = (EV_Distance[EV] - EV_Angle[EV])

- If - Conditions

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

- If - Conditions

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

- If - Conditions
- Animation - Change EV_Caster[EV]'s vertex coloring to (100.00%, 100.00%, 100.00%) with EV_Distance[EV]% transparency

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Set EV_Raise_Speed[EV] = (EV_Raise_Speed[EV] - 3.00)

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- EV_Part[EV] Equal to 1
- EV_Part[EV] Equal to 5
- EV_Part[EV] Equal to 6

- Conditions

- Or - Any (Conditions) are true
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Distance[EV] Less than or equal to 0.00

- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 1

- Then - Actions
- Set EV_Off[EV] = False
- Set EV_Skip = (EV_Skip - 1)
- Special Effect - Destroy EV_SpecialEffect[EV]
- Unit - Add a 0.01 second Generic expiration timer to EV_Dummy[EV]

- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 5

- Then - Actions
- Set EV_Part[EV] = 7
- Set EV_Distance[EV] = 100.00
- Unit - Unhide EV_Caster[EV]

- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Part[EV] Equal to 6

- Then - Actions
- Set EV_Part[EV] = 8
- Set EV_Angle[EV] = 0.10
- Set EV_Max_Height[EV] = 150.00
- Set EV_Distance[EV] = EV_Distance_Decoy[EV]

- Else - Actions

- If - Conditions

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

- If - Conditions

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

- If - Conditions

- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Set EV_Distance[EV] = (EV_Distance[EV] - 1.00)

- If - Conditions

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

- If - Conditions

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

- If - Conditions

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

- If - Conditions

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

- If - Conditions

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

- If - Conditions

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

- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- EV_Skip Equal to 0

- Then - Actions
- Set EV_Times = 0
- Trigger - Turn off Electric Vortex Loop <gen>

- Else - Actions

- If - Conditions

- Events

The Following GUI MUI ... method uses Rrecycling and fully EFFICIENT !