- Joined
- Nov 14, 2008
- Messages
- 3,253
JNGP with latest JASSHelper is compatible with 1.24e. I can confirm that.
Chain Globals

Events


Time - Elapsed game time is 0.00 seconds

Conditions

Actions


-------- DON'T TOUCH ANYTHING HERE --------


-------- Locust --------


-------- This variable is to make sure chain won't jump to units who have this ability --------


Custom script: set udg_QJCS_Locust = 'Aloc'
Chain Create

Events

Conditions

Actions


-------- DON'T TOUCH ANYTHING HERE --------


-------- 1 is to check how many spells are running. 2 is for storage --------


-------- If empty instances, run trigger, so that when it is above 1, it keep calling it to turn on. --------


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



If - Conditions




QJCS_index[1] Equal to 0



Then - Actions




Trigger - Turn on Chain Jump <gen>



Else - Actions


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


-------- temp Position of caster for other usage --------


Set QJCS_tempPos[1] = (Position of QJC_Caster)


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


-------- Limitations --------


-------- Jump Count Limit Check --------


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



If - Conditions




QJC_JumpCount Less than or equal to 0



Then - Actions




Set QJC_JumpCount = 1



Else - Actions


-------- Target Unit Limitations --------


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



If - Conditions




QJC_NoTarget Equal to True



Then - Actions




-------- If No Target, get nearest target around caster --------




Set QJCS_tempGroup = (Units within QJC_JumpRadius of QJCS_tempPos[1] matching (((((Matching unit) is alive) Equal to True) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0)) and ((((Matching unit) belongs to an enemy of (Owner of QJC_Caster)) Equal to QJC_Enemy) or (((M




Set QJC_TargetUnit = (Random unit from QJCS_tempGroup)




Custom script: call DestroyGroup(udg_QJCS_tempGroup)



Else - Actions




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





If - Conditions






QJC_TargetUnit Equal to No unit





Then - Actions






Set QJCS_tempGroup = (Units within QJC_JumpRadius of QJC_TargetPoint matching (((((Matching unit) is alive) Equal to True) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0)) and ((((Matching unit) belongs to an enemy of (Owner of QJC_Caster)) Equal to QJC_Enemy) or (((M






Set QJC_TargetUnit = (Random unit from QJCS_tempGroup)






Custom script: call DestroyGroup(udg_QJCS_tempGroup)






Custom script: call RemoveLocation(udg_QJC_TargetPoint)





Else - Actions


-------- if Reduction Limit > 1.00 = 100% --------


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



If - Conditions




QJC_AmountReduce Greater than 1.00



Then - Actions




Set QJC_AmountReduce = 1.00



Else - Actions


-------- Reduction Limit < 0.00 = 0% --------


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



If - Conditions




QJC_AmountReduce Less than 0.00



Then - Actions




Set QJC_AmountReduce = 0.00



Else - Actions


-------- if Ally and Enemy = False --------


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



If - Conditions




And - All (Conditions) are true





Conditions






QJC_Ally Equal to False






QJC_Enemy Equal to False



Then - Actions




Set QJC_Enemy = True



Else - Actions


-------- Jump Delay Time Max = 1.00 --------


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



If - Conditions




QJC_JumpDelayTime Greater than 1.00



Then - Actions




Set QJC_JumpDelayTime = 1.00



Else - Actions


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



If - Conditions




QJC_JumpDelayTime Less than 0.00



Then - Actions




Set QJC_JumpDelayTime = 0.00



Else - Actions


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


-------- Increase Index 1 and 2 --------


Set QJCS_index[1] = (QJCS_index[1] + 1)


Set QJCS_index[2] = (QJCS_index[2] + 1)


-------- Store User Data to index 2 --------


-------- Caster --------


Set QJCS_Caster[QJCS_index[2]] = QJC_Caster


-------- Victim --------


Set QJCS_TargetUnit[QJCS_index[2]] = QJC_TargetUnit


-------- Priority --------


Set QJCS_Priority[QJCS_index[2]] = QJC_Priority


-------- OnePerUnit (OPU) --------


Set QJCS_OnePerUnit[QJCS_index[2]] = QJC_OnePerUnit


-------- Types --------


Set QJCS_Damage[QJCS_index[2]] = QJC_Damage


Set QJCS_Heal[QJCS_index[2]] = QJC_Heal


Set QJCS_Health[QJCS_index[2]] = QJC_Heatlh


Set QJCS_Mana[QJCS_index[2]] = QJC_Mana


Set QJCS_Gold[QJCS_index[2]] = QJC_Gold


Set QJCS_Leech[QJCS_index[2]] = QJC_Leech


-------- Target Types --------


Set QJCS_Ally[QJCS_index[2]] = QJC_Ally


Set QJCS_Enemy[QJCS_index[2]] = QJC_Enemy


-------- Amount of Damage/Heal/Health/Mana/Gold --------


Set QJCS_Amount[QJCS_index[2]] = QJC_Amount


-------- Attack & Damage Type --------


Set QJCS_AttackType[QJCS_index[2]] = QJC_AttackType


Set QJCS_DamageType[QJCS_index[2]] = QJC_DamageType


-------- Damage Reduction --------


Set QJCS_AmountReduce[QJCS_index[2]] = QJC_AmountReduce


-------- Jump Count --------


Set QJCS_JumpCount[QJCS_index[2]] = QJC_JumpCount


-------- Jump Delay --------


Set QJCS_JumpDelayTime[QJCS_index[2]] = QJC_JumpDelayTime


-------- Jump Radius --------


Set QJCS_JumpRadius[QJCS_index[2]] = QJC_JumpRadius


-------- Save AoE --------


Set QJCS_AoE[QJCS_index[2]] = QJC_AoE


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



If - Conditions




QJCS_AoE[QJCS_index[2]] Equal to True



Then - Actions




Set QJCS_AoERadius[QJCS_index[2]] = QJC_AoERadius



Else - Actions


-------- Save SFX --------


Set QJCS_ChainSFX[QJCS_index[2]] = QJC_ChainSFX


Set QJCS_TargetSFX[QJCS_index[2]] = QJC_TargetSFX


-------- Save Slow --------


Set QJCS_Slow[QJCS_index[2]] = QJC_Slow


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



If - Conditions




QJCS_Slow[QJCS_index[2]] Equal to True



Then - Actions




Set QJCS_SlowEffect[QJCS_index[2]] = QJC_SlowEffect



Else - Actions


-------- Save Stun --------


Set QJCS_Stun[QJCS_index[2]] = QJC_Stun


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



If - Conditions




QJCS_Stun[QJCS_index[2]] Equal to True



Then - Actions




Set QJCS_StunEffect[QJCS_index[2]] = QJC_StunEffect



Else - Actions


-------- Save System Time & System Jump Count --------


Set QJCS_SystemCount[QJCS_index[2]] = 0


Set QJCS_SystemTime[QJCS_index[2]] = 0.00


-------- Create dGroup --------


Custom script: set udg_QJCS_dGroup[udg_QJCS_index[2]] = CreateGroup()


-------- Create Base Dummy --------


Unit - Create 1 Dummy for (Owner of QJC_Caster) at QJCS_tempPos[1] facing Default building facing degrees


Set QJCS_baseDummy[QJCS_index[2]] = (Last created unit)


-------- Add dummy to group --------


Unit Group - Add (Last created unit) to QJCS_dummyGroup


-------- Clear --------


Custom script: call RemoveLocation(udg_QJCS_tempPos[1])
Chain Jump

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


-------- DON'T TOUCH ANYTHING HERE. --------


-------- index 3 is to keep track of things going on. --------


For each (Integer QJCS_index[3]) from 1 to QJCS_index[2], do (Actions)



Loop - Actions




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





If - Conditions






(QJCS_baseDummy[QJCS_index[3]] is in QJCS_dummyGroup) Equal to True





Then - Actions






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







If - Conditions








QJCS_JumpCount[QJCS_index[3]] Greater than 0








QJCS_TargetUnit[QJCS_index[3]] Not equal to No unit







Then - Actions








-------- Time Check --------








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









If - Conditions










QJCS_SystemTime[QJCS_index[3]] Greater than or equal to QJCS_JumpDelayTime[QJCS_index[3]]









Then - Actions










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










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










-------- Chain Effect --------










-------- Position Source for Lightning Creation --------










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











If - Conditions












QJCS_SystemCount[QJCS_index[3]] Equal to 0











Then - Actions












Set QJCS_tempPos[4] = (Position of QJCS_Caster[QJCS_index[3]])











Else - Actions












Set QJCS_tempPos[4] = (Position of QJCS_prevTarget[QJCS_index[3]])










-------- Lightning Effect Index --------










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











If - Conditions












QJCS_LightningIndex[1] Equal to 0











Then - Actions












Trigger - Turn on Chain Effect <gen>











Else - Actions










Set QJCS_LightningIndex[1] = (QJCS_LightningIndex[1] + 1)










Set QJCS_LightningIndex[2] = (QJCS_LightningIndex[2] + 1)










-------- Get Lightning Target --------










Set QJCS_LightningTarget[QJCS_LightningIndex[2]] = QJCS_TargetUnit[QJCS_index[3]]










-------- Lightning Duration --------










Set QJCS_LightningDur[QJCS_LightningIndex[2]] = 1.00










-------- Position Target for Lightning Creation --------










Set QJCS_tempPos[5] = (Position of QJCS_TargetUnit[QJCS_index[3]])










-------- Get Unit of Previous --------










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











If - Conditions












QJCS_SystemCount[QJCS_index[3]] Equal to 0











Then - Actions












Set QJCS_LightningDPos[QJCS_LightningIndex[2]] = QJCS_Caster[QJCS_index[3]]











Else - Actions












Set QJCS_LightningDPos[QJCS_LightningIndex[2]] = QJCS_prevTarget[QJCS_index[3]]










-------- Chain x1,y1,z1,x2,y2,z2 where z is height --------










Set QJCS_ChainX[1] = (X of QJCS_tempPos[4])










Set QJCS_ChainY[1] = (Y of QJCS_tempPos[4])










Custom script: set udg_QJCS_ChainZ[1] = GetLocationZ(udg_QJCS_tempPos[4]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[2]]) + 25










Set QJCS_ChainX[2] = (X of QJCS_tempPos[5])










Set QJCS_ChainY[2] = (Y of QJCS_tempPos[5])










Custom script: set udg_QJCS_ChainZ[2] = GetLocationZ(udg_QJCS_tempPos[5]) + GetUnitFlyHeight(udg_QJCS_TargetUnit[udg_QJCS_index[3]]) + 25










-------- Create and Store Lightning SFX --------










Custom script: set udg_QJCS_LightningSFX[udg_QJCS_LightningIndex[2]] = AddLightningEx( udg_QJCS_ChainSFX[udg_QJCS_index[3]] , true , udg_QJCS_ChainX[1] , udg_QJCS_ChainY[1] , udg_QJCS_ChainZ[1] , udg_QJCS_ChainX[2] , udg_QJCS_ChainY[2] , udg_QJCS_ChainZ[2])










-------- Clear Pos --------










Custom script: call RemoveLocation(udg_QJCS_tempPos[4])










Custom script: call RemoveLocation(udg_QJCS_tempPos[5])










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










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










-------- Target SFX --------










Special Effect - Create a special effect attached to the origin of QJCS_TargetUnit[QJCS_index[3]] using QJCS_TargetSFX[QJCS_index[3]]










Special Effect - Destroy (Last created special effect)










-------- Get Target Position --------










Set QJCS_tempPos[2] = (Position of QJCS_TargetUnit[QJCS_index[3]])










-------- AoE --------










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











If - Conditions












QJCS_AoE[QJCS_index[3]] Equal to True











Then - Actions












-------- Set Group --------












-------- CHANGE TO TARGET POS --------












Set QJCS_aGroup[QJCS_index[3]] = (Units within QJCS_AoERadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0))) and ((((Matching unit) be











Else - Actions












Set QJCS_aGroup[QJCS_index[3]] = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching ((((Matching unit) is alive) Equal to True) and ((Matching unit) Equal to QJCS_TargetUnit[QJCS_index[3]])))










-------- Damage --------










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











If - Conditions












QJCS_Damage[QJCS_index[3]] Equal to True











Then - Actions












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














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















If - Conditions
















And - All (Conditions) are true

















Conditions


















((Picked unit) belongs to an enemy of (Owner of QJCS_Caster[QJCS_index[3]])) Equal to True


















QJCS_Enemy[QJCS_index[3]] Equal to True















Then - Actions
















Unit - Cause QJCS_Caster[QJCS_index[3]] to damage (Picked unit), dealing QJCS_Amount[QJCS_index[3]] damage of attack type QJCS_AttackType[QJCS_index[3]] and damage type QJCS_DamageType[QJCS_index[3]]















Else - Actions











Else - Actions










-------- Heal --------










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











If - Conditions












QJCS_Heal[QJCS_index[3]] Equal to True











Then - Actions












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














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















If - Conditions
















((Picked unit) belongs to an ally of (Owner of QJCS_Caster[QJCS_index[3]])) Equal to True















Then - Actions
















Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + QJCS_Amount[QJCS_index[3]])















Else - Actions











Else - Actions










-------- Health --------










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











If - Conditions












QJCS_Health[QJCS_index[3]] Equal to True











Then - Actions












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













If - Conditions














QJCS_Leech[QJCS_index[3]] Equal to True













Then - Actions














Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)















Loop - Actions
















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

















If - Conditions


















And - All (Conditions) are true



















Conditions




















(Life of (Picked unit)) Greater than QJCS_Amount[QJCS_index[3]]

















Then - Actions


















-------- Increase Caster's Health --------


















Unit - Set life of QJCS_Caster[QJCS_index[3]] to ((Life of QJCS_Caster[QJCS_index[3]]) + QJCS_Amount[QJCS_index[3]])

















Else - Actions


















-------- Increase Caster's Health --------


















Unit - Set life of QJCS_Caster[QJCS_index[3]] to ((Life of QJCS_Caster[QJCS_index[3]]) + (Life of (Picked unit)))













Else - Actions












-------- Do Damage --------












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














Unit - Cause QJCS_Caster[QJCS_index[3]] to damage (Picked unit), dealing QJCS_Amount[QJCS_index[3]] damage of attack type QJCS_AttackType[QJCS_index[3]] and damage type QJCS_DamageType[QJCS_index[3]]











Else - Actions










-------- Mana --------










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











If - Conditions












QJCS_Mana[QJCS_index[3]] Equal to True











Then - Actions












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













If - Conditions














QJCS_Leech[QJCS_index[3]] Equal to True













Then - Actions














Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)















Loop - Actions
















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

















If - Conditions


















(Mana of (Picked unit)) Greater than QJCS_Amount[QJCS_index[3]]

















Then - Actions


















-------- Increase Caster's Mana --------


















Unit - Set mana of QJCS_Caster[QJCS_index[3]] to ((Mana of QJCS_Caster[QJCS_index[3]]) + QJCS_Amount[QJCS_index[3]])

















Else - Actions


















-------- Increase Caster's Mana --------


















Unit - Set mana of QJCS_Caster[QJCS_index[3]] to ((Mana of QJCS_Caster[QJCS_index[3]]) + (Mana of (Picked unit)))













Else - Actions












-------- Reduce Enemy Mana --------












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - QJCS_Amount[QJCS_index[3]])











Else - Actions










-------- Gold --------










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











If - Conditions












QJCS_Gold[QJCS_index[3]] Equal to True











Then - Actions












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













If - Conditions














QJCS_Leech[QJCS_index[3]] Equal to True













Then - Actions














Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)















Loop - Actions
















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

















If - Conditions


















((Owner of (Picked unit)) Current gold) Greater than (Integer(QJCS_Amount[QJCS_index[3]]))

















Then - Actions


















Player - Add (Integer(QJCS_Amount[QJCS_index[3]])) to (Owner of QJCS_Caster[QJCS_index[3]]) Current gold

















Else - Actions


















Player - Add ((Owner of (Picked unit)) Current gold) to (Owner of QJCS_Caster[QJCS_index[3]]) Current gold













Else - Actions












-------- Deduct Gold --------












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














Player - Add (-1 x (Integer(QJCS_Amount[QJCS_index[3]]))) to (Owner of (Picked unit)) Current gold











Else - Actions










-------- Slow --------










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











If - Conditions












QJCS_Slow[QJCS_index[3]] Equal to True











Then - Actions












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














Set QJCS_tempPos[3] = (Position of (Picked unit))














Unit - Create 1 Dummy for (Owner of QJCS_Caster[QJCS_index[3]]) at QJCS_tempPos[3] facing Default building facing degrees














Unit - Add a 1.00 second Generic expiration timer to (Last created unit)














Unit - Add QJCS_SlowEffect[QJCS_index[3]] to (Last created unit)














Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)














Custom script: call RemoveLocation(udg_QJCS_tempPos[3])











Else - Actions










-------- Stun --------










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











If - Conditions












QJCS_Stun[QJCS_index[3]] Equal to True











Then - Actions












Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)













Loop - Actions














Set QJCS_tempPos[3] = (Position of (Picked unit))














Unit - Create 1 Dummy for (Owner of QJCS_Caster[QJCS_index[3]]) at QJCS_tempPos[3] facing Default building facing degrees














Unit - Add a 1.00 second Generic expiration timer to (Last created unit)














Unit - Add QJCS_StunEffect[QJCS_index[3]] to (Last created unit)














Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)














Custom script: call RemoveLocation(udg_QJCS_tempPos[3])











Else - Actions










-------- Clear --------










Custom script: call DestroyGroup(udg_QJCS_aGroup[udg_QJCS_index[3]])










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










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










-------- Update System Jump Count --------










Set QJCS_SystemCount[QJCS_index[3]] = (QJCS_SystemCount[QJCS_index[3]] + 1)










-------- Update Jump Count --------










Set QJCS_JumpCount[QJCS_index[3]] = (QJCS_JumpCount[QJCS_index[3]] - 1)










-------- UPDATE Amount --------










Set QJCS_Amount[QJCS_index[3]] = (QJCS_Amount[QJCS_index[3]] - (QJCS_Amount[QJCS_index[3]] x QJCS_AmountReduce[QJCS_index[3]]))










-------- Get Previous Target --------










Set QJCS_prevTarget[QJCS_index[3]] = QJCS_TargetUnit[QJCS_index[3]]










-------- Check if its OPU --------










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











If - Conditions












QJCS_OnePerUnit[QJCS_index[3]] Equal to True











Then - Actions












-------- Store Victim in to individual damagedGroup --------












Unit Group - Add QJCS_TargetUnit[QJCS_index[3]] to QJCS_dGroup[QJCS_index[3]]












-------- Set new VictimGroup with Damaged Group in condition --------












Set QJCS_victimGroup = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to QJCS_TargetUnit[QJCS_index[3]]) and ((((Matching unit) is in QJCS_dGroup[QJCS_index[3]]) Equal to False) a











Else - Actions












-------- Set new VictimGroup --------












Set QJCS_victimGroup = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to QJCS_TargetUnit[QJCS_index[3]]) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0))) and ((((Matc










-------- Get Next Target --------










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











If - Conditions












(Number of units in QJCS_victimGroup) Greater than 0











Then - Actions












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













If - Conditions














QJCS_Priority[QJCS_index[3]] Equal to True













Then - Actions














-------- Get Lowest Health --------














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















Loop - Actions
















Set QJCS_currUnit = (Picked unit)
















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

















If - Conditions


















(Life of QJCS_currUnit) Less than (Life of QJCS_TargetUnit[QJCS_index[3]])

















Then - Actions


















Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_currUnit

















Else - Actions


















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



















If - Conditions




















(QJCS_TargetUnit[QJCS_index[3]] is in QJCS_victimGroup) Equal to True



















Then - Actions




















Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_TargetUnit[QJCS_index[3]]



















Else - Actions




















Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_currUnit













Else - Actions














-------- No priority, meaning random choose --------














Set QJCS_TargetUnit[QJCS_index[3]] = (Random unit from QJCS_victimGroup)











Else - Actions












-------- Set Jump Count to 0 to end it, because there is no more units nearby to hit --------












Set QJCS_JumpCount[QJCS_index[3]] = 0










-------- Reset System Time --------










Set QJCS_SystemTime[QJCS_index[3]] = 0.00










-------- Clear --------










Custom script: call DestroyGroup(udg_QJCS_victimGroup)










Custom script: call RemoveLocation(udg_QJCS_tempPos[2])









Else - Actions










-------- Update System Time --------










Set QJCS_SystemTime[QJCS_index[3]] = (QJCS_SystemTime[QJCS_index[3]] + 0.03)







Else - Actions








-------- Out of Count, End --------








Custom script: call DestroyGroup(udg_QJCS_dGroup[udg_QJCS_index[3]])








-------- Kill and Remove Base Dummy --------








Unit Group - Remove QJCS_baseDummy[QJCS_index[3]] from QJCS_dummyGroup








Unit - Kill QJCS_baseDummy[QJCS_index[3]]








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









If - Conditions










QJCS_OnePerUnit[QJCS_index[3]] Equal to True









Then - Actions










Unit Group - Remove all units from QJCS_dGroup[QJCS_index[3]]









Else - Actions








-------- Reduce Index 1 by 1 to let it know 1 spell has ended --------








Set QJCS_index[1] = (QJCS_index[1] - 1)








-------- Check if index 1 is 0, if it is 0, there is no active spell running --------








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









If - Conditions










QJCS_index[1] Equal to 0









Then - Actions










Set QJCS_index[2] = 0










Trigger - Turn off (This trigger)









Else - Actions





Else - Actions






-------- Do Nothing Here --------
Chain Effect

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


-------- DON'T TOUCH ANYTHING HERE. --------


For each (Integer QJCS_LightningIndex[3]) from 1 to QJCS_LightningIndex[2], do (Actions)



Loop - Actions




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





If - Conditions






QJCS_LightningDur[QJCS_LightningIndex[3]] Greater than 0.00





Then - Actions






-------- Lightning Duration --------






Set QJCS_LightningDur[QJCS_LightningIndex[3]] = (QJCS_LightningDur[QJCS_LightningIndex[3]] - 0.03)






-------- Get Position --------






Set QJCS_LightningPos[1] = (Position of QJCS_LightningDPos[QJCS_LightningIndex[3]])






Set QJCS_LightningPos[2] = (Position of QJCS_LightningTarget[QJCS_LightningIndex[3]])






-------- Get x1,y1,x2,y2 --------






Set QJCS_ChainX[3] = (X of QJCS_LightningPos[1])






Set QJCS_ChainY[3] = (Y of QJCS_LightningPos[1])






Custom script: set udg_QJCS_ChainZ[3] = GetLocationZ(udg_QJCS_LightningPos[1]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[3]]) + 25






Set QJCS_ChainX[4] = (X of QJCS_LightningPos[2])






Set QJCS_ChainY[4] = (Y of QJCS_LightningPos[2])






Custom script: set udg_QJCS_ChainZ[4] = GetLocationZ(udg_QJCS_LightningPos[2]) + GetUnitFlyHeight(udg_QJCS_LightningTarget[udg_QJCS_LightningIndex[3]]) + 25






-------- Move Lightning --------






Custom script: call MoveLightningEx(udg_QJCS_LightningSFX[udg_QJCS_LightningIndex[3]] , true , udg_QJCS_ChainX[3] , udg_QJCS_ChainY[3] , udg_QJCS_ChainZ[3] , udg_QJCS_ChainX[4] , udg_QJCS_ChainY[4] , udg_QJCS_ChainZ[4])






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







If - Conditions








QJCS_LightningDur[QJCS_LightningIndex[3]] Less than or equal to 0.00







Then - Actions








-------- Find a way to let it destroy once. --------








Lightning - Destroy QJCS_LightningSFX[QJCS_LightningIndex[3]]








Set QJCS_LightningIndex[1] = (QJCS_LightningIndex[1] - 1)








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









If - Conditions










QJCS_LightningIndex[1] Equal to 0









Then - Actions










Set QJCS_LightningIndex[2] = 0










Trigger - Turn off Chain Effect <gen>









Else - Actions







Else - Actions






-------- Clear --------






Custom script: call RemoveLocation(udg_QJCS_LightningPos[1])






Custom script: call RemoveLocation(udg_QJCS_LightningPos[2])





Else - Actions
Example 2 Chain Nova

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Example 2 - Chain Nova

Actions


Set QJC_Caster = (Triggering unit)


Set QJC_TargetUnit = No unit


DISABLED: Set QJC_TargetPoint = (Target point of ability being cast)


Set QJC_NoTarget = True


Set QJC_Priority = True


Set QJC_OnePerUnit = True


Set QJC_Damage = True


Set QJC_Heal = False


Set QJC_Heatlh = False


Set QJC_Mana = False


Set QJC_Gold = False


Set QJC_Leech = False


Set QJC_Ally = False


Set QJC_Enemy = True


Set QJC_Amount = 100.00


Set QJC_ChainSFX = Drain Mana


Set QJC_TargetSFX = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl


Set QJC_AttackType = Chaos


Set QJC_DamageType = Universal


Set QJC_AmountReduce = 0.00


Set QJC_JumpCount = 5


Set QJC_JumpDelayTime = 0.10


Set QJC_JumpRadius = 500.00


Set QJC_Slow = True


Set QJC_SlowEffect = Nova (Slow)


Set QJC_Stun = False


DISABLED: Set QJC_StunEffect = Storm Bolt


Set QJC_AoE = True


Set QJC_AoERadius = 200.00


Trigger - Run Chain Create <gen> (checking conditions)
Example 7 Chain Sheep

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Example 7 - Chain Polymorph

Actions


Set QJC_Caster = (Triggering unit)


Set QJC_TargetUnit = (Target unit of ability being cast)


DISABLED: Set QJC_TargetPoint = (Target point of ability being cast)


Set QJC_NoTarget = False


Set QJC_Priority = False


Set QJC_OnePerUnit = True


Set QJC_Damage = False


Set QJC_Heal = False


Set QJC_Heatlh = False


Set QJC_Mana = False


Set QJC_Gold = False


Set QJC_Leech = False


Set QJC_Ally = False


Set QJC_Enemy = True


Set QJC_Amount = 0.00


Set QJC_ChainSFX = Spirit Link


Set QJC_TargetSFX = Abilities\Spells\Human\Polymorph\PolyMorphTarget.mdl


Set QJC_AttackType = Chaos


Set QJC_DamageType = Universal


Set QJC_AmountReduce = 0.00


Set QJC_JumpCount = 10


Set QJC_JumpDelayTime = 0.10


Set QJC_JumpRadius = 500.00


Set QJC_Slow = False


DISABLED: Set QJC_SlowEffect = Slow


Set QJC_Stun = True


Set QJC_StunEffect = Sheep (Stun)


Set QJC_AoE = False


DISABLED: Set QJC_AoERadius = 200.00


Set QJC_DummyType = Dummy


Trigger - Run Chain Create <gen> (checking conditions)
Chain Sheep

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Sheep (Stun)

Actions


Set dontcopy_tempPos = (Position of (Triggering unit))


Unit - Create 1 Dummy for (Owner of (Triggering unit)) at dontcopythis facing Default building facing degrees


Unit - Add Polymorph (Example) to (Triggering unit)


Unit - Add a 1.00 second Generic expiration timer to (Triggering unit)


Unit - Order (Triggering unit) to Human Sorceress - Polymorph (Target unit of ability being cast)


Custom script: call RemoveLocation(udg_dontcopy_tempPos)