- Joined
- Jun 26, 2014
- Messages
- 500
(I accidentally posted this on the Help Zone first, pls delete that thread)
Usually I get the total error after 20th or 30th cast (if the number of casting is even the problem here)
Spell desc.: Links the caster and the target, healing the target per second and draining the mana of the caster. Caster can link himself with multiple units.
Usually I get the total error after 20th or 30th cast (if the number of casting is even the problem here)
Spell desc.: Links the caster and the target, healing the target per second and draining the mana of the caster. Caster can link himself with multiple units.
-
Cell Link
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Cell Link
-
Actions
-
For each (Integer A) from 1 to SP_CL_mui, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Target unit of ability being cast) Equal to SP_CL_unit[(Integer A)]
-
Then - Actions
- Player Group - Add (Owner of (Triggering unit)) to Player_Messages
- Game - Display to Player_Messages for 5.00 seconds the text: |cffffcc00Unit is a...
- Player Group - Remove (Owner of (Triggering unit)) from Player_Messages
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set SP_CL_index = (SP_CL_index + 1)
- Set SP_CL_mui = (SP_CL_mui + 1)
- Set SP_CL_caster[SP_CL_mui] = (Triggering unit)
- Set SP_CL_unit[SP_CL_mui] = (Target unit of ability being cast)
- Set SP_CL_data[SP_CL_mui] = ((Real((Level of Cell Link for (Triggering unit)))) x 1.00)
- Set SP_CL_mana[SP_CL_mui] = ((Real((Level of Cell Link for (Triggering unit)))) x 0.10)
- Set SP_CL_distance[SP_CL_mui] = (((Level of Cell Link for (Triggering unit)) x 75) + 675)
- Set SP_CL_point1[SP_CL_mui] = (Position of (Triggering unit))
- Set SP_CL_point2[SP_CL_mui] = (Position of (Target unit of ability being cast))
- Lightning - Create a Healing Wave - Secondary lightning effect from source SP_CL_point1[SP_CL_mui] to target SP_CL_point2[SP_CL_mui]
- Set SP_CL_link[SP_CL_mui] = (Last created lightning effect)
- Trigger - Turn on Cell Link Loop <gen>
-
For each (Integer A) from 1 to SP_CL_mui, do (Actions)
-
Events
-
Cell Link Loop
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to SP_CL_mui, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((SP_CL_caster[(Integer A)] is alive) Equal to True) and ((SP_CL_unit[(Integer A)] is alive) Equal to True)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between SP_CL_point1[(Integer A)] and SP_CL_point2[(Integer A)]) Less than or equal to (Real(SP_CL_distance[(Integer A)]))
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Percentage mana of SP_CL_caster[(Integer A)]) Greater than 5.00
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Percentage life of SP_CL_unit[(Integer A)]) Less than 100.00
-
Then - Actions
- Set SP_CL_point1[(Integer A)] = (Position of SP_CL_caster[(Integer A)])
- Set SP_CL_point2[(Integer A)] = (Position of SP_CL_unit[(Integer A)])
- Lightning - Move SP_CL_link[(Integer A)] to source SP_CL_point1[(Integer A)] and target SP_CL_point2[(Integer A)]
- Unit - Set mana of SP_CL_caster[(Integer A)] to ((Mana of SP_CL_caster[(Integer A)]) - SP_CL_mana[(Integer A)])
- Unit - Set life of SP_CL_unit[(Integer A)] to ((Life of SP_CL_unit[(Integer A)]) + SP_CL_data[(Integer A)])
- Custom script: call RemoveLocation(udg_SP_CL_point1[bj_forLoopAIndex])
- Custom script: call RemoveLocation(udg_SP_CL_point2[bj_forLoopAIndex])
-
Else - Actions
- Lightning - Destroy SP_CL_link[(Integer A)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_unit[(Integer A)] Not equal to No unit
-
Then - Actions
- Set SP_CL_caster[(Integer A)] = No unit
- Set SP_CL_unit[(Integer A)] = No unit
- Set SP_CL_index = (SP_CL_index - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_index Less than or equal to 0
-
Then - Actions
- Set SP_CL_index = 0
- Set SP_CL_mui = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Lightning - Destroy SP_CL_link[(Integer A)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_unit[(Integer A)] Not equal to No unit
-
Then - Actions
- Set SP_CL_caster[(Integer A)] = No unit
- Set SP_CL_unit[(Integer A)] = No unit
- Set SP_CL_index = (SP_CL_index - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_index Less than or equal to 0
-
Then - Actions
- Set SP_CL_index = 0
- Set SP_CL_mui = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Lightning - Destroy SP_CL_link[(Integer A)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_unit[(Integer A)] Not equal to No unit
-
Then - Actions
- Set SP_CL_caster[(Integer A)] = No unit
- Set SP_CL_unit[(Integer A)] = No unit
- Set SP_CL_index = (SP_CL_index - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_index Less than or equal to 0
-
Then - Actions
- Set SP_CL_index = 0
- Set SP_CL_mui = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Lightning - Destroy SP_CL_link[(Integer A)]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_unit[(Integer A)] Not equal to No unit
-
Then - Actions
- Set SP_CL_caster[(Integer A)] = No unit
- Set SP_CL_unit[(Integer A)] = No unit
- Set SP_CL_index = (SP_CL_index - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SP_CL_index Less than or equal to 0
-
Then - Actions
- Set SP_CL_index = 0
- Set SP_CL_mui = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to SP_CL_mui, do (Actions)
-
Events