• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JeffQ's Basic Chain System v2.00f (MUI/GUI)

Created by JeffQ a.k.a JeffreyQ, SmileyJeff
Version distributed by other people are edited and not by me.

I recommend all users who downloaded this to re-download as i revamp the chain system and it is alot alot more polish now than before and more flexible as i remove the ChainEffect ability creation limitation. Cheers~

1. Please do give credits if you use this in your map.
2. This is fully MUI/GUI using indexing
3. Supports alot of things (Atleast those chain ideas that i got for my map)


Q: Why is it version 1.11 as this is your 1st version?
A: Because i edited 11 times before removing all of the bugs and finally submitting this polish version (So far no bugs i found yet)

Q: Why is the picture you used for this system so ugly?
A: Sorry, my photoshop sucks ]:

Additional Knowledge to Use this System
- Object Editor (Unit/Ability/Buff)

Q: Why do i need to know the object editor?
A: I base alot of things on it. And to create effects you need to use it.

Q: Why do i want to use this?
A: Its easy to use. You can customize alot of things, from damage, to jump count, jump delay between chains. Hit both ally and enemy, steal gold, mana, health, damage add your own effects etc. etc.


How to Implement?

***You can also download the map, the below step by step tutorial is included in the map's README

======================
How to Use?
======================
If your map is a New Map without any triggers:
1. Open JeffQ's Basic Chain System map.
2. Open Trigger Editor.
3. File > Export Triggers.
4. Open your map.
5. Open Trigger Editor.
6. File > Import Triggers.
7. Remember to copy the Dummy over too.

OR

If your map has existing triggers:
1. Open JeffQ's Basic Chain System map.
2. Copy JeffQ's Chain System folder by right-clicking it and select Copy.
3. Open your map.
4. File > Preference > Check "Automatically create unknown variables while pasting trigger data".
5. Open Object Editor. Create a Dummy base on anything, name it Dummy and give it locust and remove its model. Or just copy the dummy from my map.
6. Open Trigger Editor.
7. Right click on the Map Name, or any other trigger/category/comments, and select Paste.
8. Create a variable by pressing CTRL+B and name it QJCS_ChainZ of type Real, array size of 1.
9. Go to "Chain Create" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.
10.Go to "Chain Jump" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.
11.Go to "Chain effect" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.



Limitations
Q: What?! There are limitations?
A: Only Stun and Slow ability have limitations. This is because i order the dummy to human - storm bolt and human sorc - slow in the system.

Flexibility
I did say this system is very flexible except for the few limitations. Which are actually rules you have to follow to use this system. Try any combinations you want and let me know what results you get [: Almost everything stacks.



Briefly what it supports, detail explanation in README in the map.

- Damage enemies
- Heal Allies
- Steal Health
- Steal Mana
- Steal Gold
- Slow
- Stun
- Target Unit
- Target Point
- No Target
- MUI
- And many many more!


Currently In Map Spells:
- Chain Lightning (Typical with red lightning effect)
- Chain Heal (Heals ally and damage enemy)
- Chain Nova (AoE damage and slows enemy)
- Chain Steal (Steals enemy gold and transfer to self)
- Chain Siphon (Steal health and mana and transfer to self)
- Chain Sleep (Makes enemy sleep, wake on hit)
- Chain Polymorph (Change enemy units into random critters) new!
- Chain Invisibility (Change ally units to invisible) new!



=====================
Bugs & FeedBacks
=====================
If you find any bugs please send an email to [email protected] or post a comment here.


**Enjoy using [:

EDIT: OPS! forgot the code, here is it. Thanks for reminding me baassee.


  • 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)


Currently Known Issues:
- All Fixed [:


Thanks to the below who shed some light on me about indexing and leaks.
- Kingz
- YourNameHere
- baassee
- Adiktuz
- Maker
- TitanHex
- D4RK_G4ND4LF
- And other people if i miss out.

Special Thanks to Kingz who show me his simple lightning system. I learned alot from it and after understanding i made 1 my own to fit my system. +Rep



v2.00f, 24 Feb 2010
- Chain should no longer jump to buildings/structures.
- Some demo ability can still target buildings, this is because i didn't limit the target allowed at the ability editor. (Nothing to do with the system)

v2.00e, 31 Jan 2010
- Fix lightning height to match cliff or raised terrain.
- Added a raised terrain and cliff to test out.

v2.00d, 25 Jan 2010
- Rearrange Folder for easier implementing in other maps.
- Updated "How To Use" in the README to give a step by step tutorial on how to implement. Please do give it a read.

v2.00c, 24 Jan 2010
- Chain now gets unit height +25. Meaning that if you target a flying unit, the chain height will change accordingly.
- Added a few flying units to let you try out the dynamic chain height.
- Added Chain Globals Trigger to store Locust.
- Chain should now only jump to units that doesn't have locust (This should remove the limitation of where you need to only base all other ability dummies on my dummy as long as your custom dummies have locust).

v2.00b, 23 Jan 2010
- Lightning effect now won't stick to ground.

v2.00a, 23 Jan 2010
- Fix 2 major bugs that make the chain not MUI for chain effect and Stun effect. Due to setting the wrong index. Now it has been fixed and should no longer containt any more bugs! Thanks to my sis for testing out this with me [:

v2.00, 22 Jan 2010
- v2.00, 22 Jan 2010
- Revamp the chain effect system.
- Remove dummy type. You still have to copy the dummy to your map though.
- Remove finger of death limitations. Now you can choose your chain effect freely.
- Added a new Chain Effect Trigger.
- This allows the chain to follow the unit if it is moving.
- Polish code.
- Fixed a few bugs in code.
- Added Implementation Details Trigger and tidy up the Example 1-8 Implementations.
- Removed all (SFX) ability as now you can use the QJC_ChainSFX to set your lightning effect.
- Chain effect should look way more nicer now [:

v1.14, 22 Jan 2010
- Added 2 new abilities chain sheep and chain invisible to show the flexibility of this system and how to play around with stun/slow effect to your advantages.

v1.13a, 22 Jan 2010
- Added a sleep ability in the implementation after Kingz asked me what if he wanted to create a chain sleep. (No additional system code added).
- Fix several bugs.

v1.12, 21 Jan 2010
- Periodic Time change to 0.03seconds. And System Time update + 0.03 from 0.01.

v1.11a, 21 Jan 2010
- Fixed Implementation Example Comment for Chain Effect.

v1.11, 21 Jan 2010
- Initial Release.


Keywords:
chain, system, target, unit, point, no target, gui, mui, index, spell, pack, nova, slow, stun, gold, steal, lightning, siphon, damage, heal, sheep, in
Contents

JeffQ's Basic Chain System v2.00f (Map)

Reviews
20:00, 21st Jan 2010 The_Reborn_Devil: The triggering looks ok and there's nothing wrong that I can see. Status: Approved Rating: Useful
Level 8
Joined
Apr 8, 2009
Messages
499
JNGP with latest JASSHelper is compatible with 1.24e. I can confirm that.

but if you save a map in the official Map editor and then open it in JNGP it'll say
"this map was saved in a more recent editor, some function might be lost. continue?"

or something along those lines anyways. soooo, why does it bug for me D:!?
 
Level 8
Joined
Apr 8, 2009
Messages
499
I have no clue to have to actually use this system. Really bad, dude. There is absolutely nowhere to start configuring the spells. Bad system. 1/5

the fact that YOU have no clue how to configure or use it, doesn't mean its a bad system. tbh, its a good system, just not that user friendly.

don't downrate it for not liking it.
 
I have no clue to have to actually use this system. Really bad, dude. There is absolutely nowhere to start configuring the spells. Bad system. 1/5

Adiktuz said:
downrating ones resource just because ur too stupid to understand it?

No clue on how to use it? he included a how to implement on the first page...

Absolutely nowhere to start configuring spells? this system is really easy to configure and it offers a lot of configurables... maybe you hadn't realized the fact that the config is done in your own spell trigger and not on the default triggers it has
 
Top