• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Solved] OrderID of item ability not being recognized

Status
Not open for further replies.
Level 12
Joined
May 16, 2020
Messages
660
Hi all,

When a unit casts an item ability, the OrderID which WC3 derives is the ID of the item SLOT, not the ID of the ability being cast through the item:

public constant integer useslot1=852008
public constant integer useslot2=852009
public constant integer useslot3=852010
public constant integer useslot4=852011
public constant integer useslot5=852012
public constant integer useslot6=852013

(see Order Ids)

So for example, if a Hero uses an item in Slot 1 (which is an item that can Charm), I want to get the OrderID 852581, not 852008.
(public constant integer charm=852581)

Would anyone have a solution for this?
 
Level 12
Joined
May 16, 2020
Messages
660
Have you given the unit the item ability directly? Order IDs with no string equivalents can be detected this way.

The dummy unit does not "natively" have the item ability, but I'm giving it the ability via trigger.
The problem is that once the dummy has the ability, I cannot activate it through the dummy unit, as I don't know which Order ID to cast.

  • Set VariableSet Z_AbilityTemp = (Ability being cast)
  • Unit - Add Z_AbilityTemp to Z_DummyTemp

As workaround I'm experimenting giving the dummy unit the same ITEM (with the ability) that the hero is using, and then making it use the item on the target (with "use item in slot 1"). This more or less works for 1 target, but gives me troubles if I want the dummy to use this item several times on multiple enemies.

The spell is essentially Dota 2's Multicast (Ogre Magi)
Enables Ogre Magi to cast his abilities and items multiple times with each use.
2x Multicast Chance: 65%
3x Multicast Chance: 35%
4x Multicast Chance: 15%

Below the trigger (still WIP!). I cut out some stuff which is not relevant to this question:

  • Multicast Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Z_Chance[1] = 65
      • Set VariableSet Z_Chance[2] = 35
      • Set VariableSet Z_Chance[3] = 15
  • Multicast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Level of Multicast for (Triggering unit)) Greater than 0
      • (Target unit of ability being cast) Not equal to No unit
      • (Ability being cast) Not equal to Spell Shield (12 seconds)
    • Actions
      • Set VariableSet Z_CasterTemp = (Triggering unit)
      • Set VariableSet Z_Random = (Random integer number between 1 and 100)
      • Set VariableSet Z_MultiplierTemp = 0
      • For each (Integer Z_Integer) from 1 to (Level of Multicast for Z_CasterTemp), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_Random Less than or equal to Z_Chance[Z_Integer]
            • Then - Actions
              • Set VariableSet Z_MultiplierTemp = (Z_MultiplierTemp + 1)
            • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Z_MultiplierTemp Greater than 0
        • Then - Actions
          • Set VariableSet Z_Point = (Position of Z_CasterTemp)
          • -------- --------
          • Set VariableSet Z_AbilityTemp = (Ability being cast)
          • Set VariableSet Z_Level = (Level of Z_AbilityTemp for Z_CasterTemp)
          • -------- --------
          • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of Z_CasterTemp) at Z_Point facing Default building facing degrees
          • Set VariableSet Z_DummyTemp = (Last created unit)
          • Unit - Add Z_AbilityTemp to Z_DummyTemp
          • Unit - Set level of Z_AbilityTemp for Z_DummyTemp to Z_Level
          • Ability - Set Ability: (Unit: Z_DummyTemp's Ability with Ability Code: Z_AbilityTemp)'s Real Level Field: Cast Range ('aran') of Level: (Z_Level - 1) to 1600.00
          • Ability - Set Ability: (Unit: Z_DummyTemp's Ability with Ability Code: Z_AbilityTemp)'s Real Level Field: Cooldown ('acdn') of Level: (Z_Level - 1) to 0.00
          • Ability - Set Ability: (Unit: Z_DummyTemp's Ability with Ability Code: Z_AbilityTemp)'s Integer Level Field: Mana Cost ('amcs') of Level: (Z_Level - 1) to 0
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Z_AbilityTemp Not equal to Fireblast
              • Z_AbilityTemp Not equal to Ignite
            • Then - Actions
              • Custom script: call BJDebugMsg(I2S(GetUnitCurrentOrder(GetTriggerUnit())))
              • Custom script: set udg_Z_OrderID = GetUnitCurrentOrder(udg_Z_CasterTemp)
              • -------- --------
              • Set VariableSet Z_TargetTemp = (Target unit of ability being cast)
              • Set VariableSet Z_GroupTemp = (Units within 1000.00 of Z_Point matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to Z_TargetTemp) and ((((Matching unit) is visible to (Owner of Z_CasterTemp).) Equal to True) and ((((Matching unit) belongs to an ally of (
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Z_GroupTemp is empty) Equal to False
                • Then - Actions
                  • Unit - Add a 0.50 second Generic expiration timer to Z_DummyTemp
                  • -------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Z_OrderID Greater than or equal to 852008
                      • Z_OrderID Less than or equal to 852013
                    • Then - Actions
                      • For each (Integer Z_Integer) from 1 to 6, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Z_OrderID Equal to (852007 + Z_Integer)
                            • Then - Actions
                              • Unit - Add Inventory (Hero) to Z_DummyTemp
                              • Hero - Create (Item-type of (Item carried by Z_CasterTemp in slot Z_Integer)) and give it to Z_DummyTemp
                              • Unit Group - Pick every unit in (Random Z_MultiplierTemp units from Z_GroupTemp) and do (Actions)
                                • Loop - Actions
                                  • Set VariableSet Z_Unit = (Picked unit)
                                  • Hero - Order Z_DummyTemp to use (Item carried by Z_DummyTemp in slot 1) on Z_Unit
                            • Else - Actions
                    • Else - Actions
                      • Unit Group - Pick every unit in (Random Z_MultiplierTemp units from Z_GroupTemp) and do (Actions)
                        • Loop - Actions
                          • Set VariableSet Z_Unit = (Picked unit)
                          • Custom script: call IssueTargetOrderById(udg_Z_DummyTemp, udg_Z_OrderID, udg_Z_Unit)
                • Else - Actions
 
Last edited:
Expanding on my previous post on this thread:

Have you given the unit the item ability directly? Order IDs with no string equivalents can be detected this way.

Try giving the item ability to a controllable unit first and check out what the order id is at the moment the issued order event runs by making the unit cast that ability. The order id can be retrieved via
JASS:
GetIssuedOrderId()
.

Also, (Random N units from group) leaks a group handle, which can be cleaned up using the following script:

  • Custom Script: set bj_wantDestroyGroup = true
 
Level 12
Joined
May 16, 2020
Messages
660
When the unit casts the item ability, I get "proper" IDs with "GetIssuedOrderId()", for example:
  • Purge > 852111
  • Charm > 852581
  • Finger of Death > 852230
But this ties back to the described problem: I cannot use these IDs, because I don't know which item was used (I'm only receiving the IDs 852008-852013 which are for slots when activating an item).

I was thinking that maybe I can make a table of "Items" and "OrderIDs" (of the inherent ability). For example:

  • Multicast Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Z_Item[1] = Helm of the Dominator
      • Set VariableSet Z_Item[2] = Dagon
      • -------- --------
      • Set VariableSet Z_OrderID[1] = 852581 (//"Charm")
      • Set VariableSet Z_OrderID[2] = 852230 (//"Finger of Death")

And then, when a caster uses the item, I can run a search via "For each integer A to XXX" to find which item was used, and if there is a match, use the matching OrderID. For me that's an ugly solution though, as every time I create a new item, I would need to update this table. Hence I'm searching for a dynamic solution.

Also, (Random N units from group) leaks a group handle, which can be cleaned up using the following script:

  • Custom Script: set bj_wantDestroyGroup = true

Thanks, didn't know this!
Edit: I added the BJ before every group, but this seems to block the loop afterwards (i.e. in my case the dummy unit doesn't use it's order on Z_Unit)

  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Random Z_MultiplierTemp units from Z_GroupTemp) and do (Actions)
    • Loop - Actions
      • Set VariableSet Z_Unit = (Picked unit)
      • Custom script: call IssueTargetOrderById(udg_Z_DummyTemp, udg_Z_OrderID, udg_Z_Unit)
 
Last edited:
Level 12
Joined
May 16, 2020
Messages
660
If you know how items are being targeted (no target, point, unit etc.) and know what item, you can give item to dummy and use the "Hero - Use Item on X".

That doesn't do it the way you described it, but could work...

Thanks, that's what I'm trying currently (see above). The problem with this:
  • The items have a cooldown. So when I want to cast the item ability on for example 3 enemies, I haven't found a way to reset it fast enough. That's because "reset all cooldowns", doesn't reset the cooldown instantly, so the dummy unit only uses the item on 1 enemy
  • Dummy units with an item drop it upon dying (so you end up with an item on the map). I can "remove" the carried item prior to the dummy dying, but this messes up the order (it seems like the unit doesn't have enough time to use the item before it's being removed)
Would it help if I attach the map?
 
Thanks, that's what I'm trying currently (see above). The problem with this:
  • The items have a cooldown. So when I want to cast the item ability on for example 3 enemies, I haven't found a way to reset it fast enough. That's because "reset all cooldowns", doesn't reset the cooldown instantly, so the dummy unit only uses the item on 1 enemy
  • Dummy units with an item drop it upon dying (so you end up with an item on the map). I can "remove" the carried item prior to the dummy dying, but this messes up the order (it seems like the unit doesn't have enough time to use the item before it's being removed)
Would it help if I attach the map?
Well, you can also make all items use dummies for their actual casts, so when you have to multiply them, you only create more dummies and use the "normal routine" for multiplying it.

And not really, I most often post here when I don't have access to WE.
 
Level 12
Joined
May 16, 2020
Messages
660
I think the quickest (albeit not most efficient) version is the list.
Let me try this and update in this post once done.

EDIT: @MyPad @ThompZon The issue with the dummy unit not casting its ability 3 or 4 times (only twice) was related to Chainlightning. No idea why with this particular spell the dummy refuses to cast it >2. Anyhow, here the full trigger that works:

  • Multicast Config
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- 65% > 35% > 15% --------
      • Set VariableSet Multicast_Chance[1] = 65
      • Set VariableSet Multicast_Chance[2] = 35
      • Set VariableSet Multicast_Chance[3] = 15
      • -------- --------
      • Set VariableSet Multicast_Item_Number = 14
      • Set VariableSet Multicast_Item[1] = Abyssal Blade
      • Set VariableSet Multicast_Item[2] = Bloodthorn
      • Set VariableSet Multicast_Item[3] = Mjollnir
      • Set VariableSet Multicast_Item[4] = Scythe of Vyse
      • Set VariableSet Multicast_Item[5] = Wind Waker
      • Set VariableSet Multicast_Item[6] = Dagon I
      • Set VariableSet Multicast_Item[7] = Dagon II
      • Set VariableSet Multicast_Item[8] = Dagon III
      • Set VariableSet Multicast_Item[9] = Dagon IV
      • Set VariableSet Multicast_Item[10] = Dagon V
      • Set VariableSet Multicast_Item[11] = Diffusal Blade
      • Set VariableSet Multicast_Item[12] = Eul’s Scepter of Divinity
      • Set VariableSet Multicast_Item[13] = Hand of Midas
      • Set VariableSet Multicast_Item[14] = Orchid Malevolence
      • -------- --------
      • Set VariableSet Multicast_OrderID[1] = 852095
      • Set VariableSet Multicast_OrderID[2] = 852668
      • Set VariableSet Multicast_OrderID[3] = 852209
      • Set VariableSet Multicast_OrderID[4] = 852502
      • Set VariableSet Multicast_OrderID[5] = 852209
      • Set VariableSet Multicast_OrderID[6] = 852230
      • Set VariableSet Multicast_OrderID[7] = 852230
      • Set VariableSet Multicast_OrderID[8] = 852230
      • Set VariableSet Multicast_OrderID[9] = 852230
      • Set VariableSet Multicast_OrderID[10] = 852230
      • Set VariableSet Multicast_OrderID[11] = 852111
      • Set VariableSet Multicast_OrderID[12] = 852209
      • Set VariableSet Multicast_OrderID[13] = 852581
      • Set VariableSet Multicast_OrderID[14] = 852668
  • Multicast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Level of Multicast for (Triggering unit)) Greater than 0
      • (Target unit of ability being cast) Not equal to No unit
      • (Ability being cast) Not equal to Spell Shield (12 seconds)
    • Actions
      • Set VariableSet Multicast_CasterTemp = (Triggering unit)
      • Set VariableSet Multicast_Random = (Random integer number between 1 and 100)
      • Set VariableSet Multicast_MultiplierTemp = 0
      • For each (Integer Multicast_Integer_A) from 1 to (Level of Multicast for Multicast_CasterTemp), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multicast_Random Less than or equal to Multicast_Chance[Multicast_Integer_A]
            • Then - Actions
              • Set VariableSet Multicast_MultiplierTemp = (Multicast_MultiplierTemp + 1)
            • Else - Actions
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Multicast_MultiplierTemp Greater than 0
        • Then - Actions
          • Set VariableSet Multicast_Point = (Position of Multicast_CasterTemp)
          • Floating Text - Create floating text that reads ((String((Multicast_MultiplierTemp + 1))) + x MULTICAST!) above Multicast_CasterTemp with Z offset -50.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.25% transparency
          • Set VariableSet Global_FloatingText = (Last created floating text)
          • -------- --------
          • Floating Text - Hide Global_FloatingText for (All players)
          • Set VariableSet Global_PlayerGroup = (All players matching ((Multicast_CasterTemp is visible to (Matching player).) Equal to True).)
          • Floating Text - Show Global_FloatingText for Global_PlayerGroup
          • Custom script: call DestroyForce(udg_Global_PlayerGroup)
          • -------- --------
          • Floating Text - Change Global_FloatingText: Disable permanence
          • Floating Text - Set the velocity of Global_FloatingText to 32.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of Global_FloatingText to 3.00 seconds
          • Floating Text - Change the fading age of Global_FloatingText to 4.00 seconds
          • -------- --------
          • Set VariableSet Multicast_AbilityTemp = (Ability being cast)
          • Set VariableSet Multicast_Level = (Level of Multicast_AbilityTemp for Multicast_CasterTemp)
          • -------- --------
          • Unit - Create 1 Dummy (Ground/Speed 0) for (Owner of Multicast_CasterTemp) at Multicast_Point facing Default building facing degrees
          • Set VariableSet Multicast_DummyTemp = (Last created unit)
          • Unit - Add Multicast_AbilityTemp to Multicast_DummyTemp
          • Unit - Set level of Multicast_AbilityTemp for Multicast_DummyTemp to Multicast_Level
          • Ability - Set Ability: (Unit: Multicast_DummyTemp's Ability with Ability Code: Multicast_AbilityTemp)'s Real Level Field: Cast Range ('aran') of Level: (Multicast_Level - 1) to 9999.00
          • Ability - Set Ability: (Unit: Multicast_DummyTemp's Ability with Ability Code: Multicast_AbilityTemp)'s Real Level Field: Cooldown ('acdn') of Level: (Multicast_Level - 1) to 0.00
          • Ability - Set Ability: (Unit: Multicast_DummyTemp's Ability with Ability Code: Multicast_AbilityTemp)'s Integer Level Field: Mana Cost ('amcs') of Level: (Multicast_Level - 1) to 0
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multicast_AbilityTemp Not equal to Fireblast
              • Multicast_AbilityTemp Not equal to Ignite
            • Then - Actions
              • Custom script: set udg_Multicast_OrderIDTemp = GetUnitCurrentOrder(udg_Multicast_CasterTemp)
              • -------- --------
              • Set VariableSet Multicast_TargetTemp = (Target unit of ability being cast)
              • Custom script: set udg_Multicast_Group[1] = CreateGroup()
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Multicast_TargetTemp belongs to an enemy of (Owner of Multicast_CasterTemp).) Equal to True
                • Then - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 1000.00 of Multicast_Point.) and do (Actions)
                    • Loop - Actions
                      • Set VariableSet Multicast_Unit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Multicast_Unit is A structure) Equal to False
                          • (Multicast_Unit is alive) Equal to True
                          • (Multicast_Unit is visible to (Owner of Multicast_CasterTemp).) Equal to True
                          • Multicast_Unit Not equal to Multicast_TargetTemp
                          • (Multicast_Unit belongs to an enemy of (Owner of Multicast_CasterTemp).) Equal to True
                          • (Level of Marker (Trigger prevention) for Multicast_Unit) Equal to 0
                        • Then - Actions
                          • Unit Group - Add Multicast_Unit to Multicast_Group[1]
                        • Else - Actions
                • Else - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 1000.00 of Multicast_Point.) and do (Actions)
                    • Loop - Actions
                      • Set VariableSet Multicast_Unit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Multicast_Unit is A structure) Equal to False
                          • (Multicast_Unit is alive) Equal to True
                          • (Multicast_Unit is visible to (Owner of Multicast_CasterTemp).) Equal to True
                          • Multicast_Unit Not equal to Multicast_TargetTemp
                          • (Multicast_Unit belongs to an ally of (Owner of Multicast_CasterTemp).) Equal to True
                          • (Level of Marker (Trigger prevention) for Multicast_Unit) Equal to 0
                        • Then - Actions
                          • Unit Group - Add Multicast_Unit to Multicast_Group[1]
                        • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Multicast_Group[1] is empty) Equal to False
                • Then - Actions
                  • Unit - Add a 0.50 second Generic expiration timer to Multicast_DummyTemp
                  • Set VariableSet Multicast_Group[2] = (Random Multicast_MultiplierTemp units from Multicast_Group[1])
                  • -------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Multicast_OrderIDTemp Greater than or equal to 852008
                      • Multicast_OrderIDTemp Less than or equal to 852013
                    • Then - Actions
                      • -------- AN ITEM BEING USED --------
                      • For each (Integer Multicast_Integer_A) from 1 to 6, do (Actions)
                        • Loop - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Multicast_OrderIDTemp Equal to (852007 + Multicast_Integer_A)
                            • Then - Actions
                              • For each (Integer Multicast_Integer_B) from 1 to Multicast_Item_Number, do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Item-type of (Item carried by Multicast_CasterTemp in slot Multicast_Integer_A)) Equal to Multicast_Item[Multicast_Integer_B]
                                    • Then - Actions
                                      • Unit Group - Pick every unit in Multicast_Group[2] and do (Actions)
                                        • Loop - Actions
                                          • Set VariableSet Multicast_Unit = (Picked unit)
                                          • Custom script: call IssueTargetOrderById(udg_Multicast_DummyTemp, udg_Multicast_OrderID[udg_Multicast_Integer_B], udg_Multicast_Unit)
                                    • Else - Actions
                            • Else - Actions
                    • Else - Actions
                      • -------- BLOODLUST --------
                      • Unit Group - Pick every unit in Multicast_Group[2] and do (Actions)
                        • Loop - Actions
                          • Set VariableSet Multicast_Unit = (Picked unit)
                          • Custom script: call IssueTargetOrderById(udg_Multicast_DummyTemp, udg_Multicast_OrderIDTemp, udg_Multicast_Unit)
                  • Custom script: call DestroyGroup(udg_Multicast_Group[2])
                • Else - Actions
              • Custom script: call DestroyGroup(udg_Multicast_Group[1])
            • Else - Actions
              • Set VariableSet Multicast_Index = (Multicast_Index + 1)
              • -------- --------
              • Set VariableSet Multicast_Caster[Multicast_Index] = Multicast_CasterTemp
              • Set VariableSet Multicast_Target[Multicast_Index] = (Target unit of ability being cast)
              • Set VariableSet Multicast_Dummy[Multicast_Index] = Multicast_DummyTemp
              • Set VariableSet Multicast_Multiplier[Multicast_Index] = Multicast_MultiplierTemp
              • Set VariableSet Multicast_Counter[Multicast_Index] = 0
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Multicast_AbilityTemp Equal to Fireblast
                • Then - Actions
                  • Set VariableSet Multicast_Boolean[Multicast_Index] = True
                • Else - Actions
                  • Set VariableSet Multicast_Boolean[Multicast_Index] = False
              • -------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Multicast_Index Equal to 1
                • Then - Actions
                  • Countdown Timer - Start Multicast_Timer as a Repeating timer that will expire in 0.10 seconds
                  • Trigger - Turn on Multicast Loop <gen>
                • Else - Actions
          • Custom script: call RemoveLocation (udg_Multicast_Point)
        • Else - Actions
  • Multicast Loop
    • Events
      • Time - Multicast_Timer expires
    • Conditions
    • Actions
      • For each (Integer Multicast_Integer_A) from 1 to Multicast_Index, do (Actions)
        • Loop - Actions
          • Set VariableSet Multicast_Counter[Multicast_Integer_A] = (Multicast_Counter[Multicast_Integer_A] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Multicast_Counter[Multicast_Integer_A] mod 6) Equal to 0
            • Then - Actions
              • Set VariableSet Multicast_Multiplier[Multicast_Integer_A] = (Multicast_Multiplier[Multicast_Integer_A] - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Multicast_Boolean[Multicast_Integer_A] Equal to True
                • Then - Actions
                  • Unit - Order Multicast_Dummy[Multicast_Integer_A] to Human Mountain King - Storm Bolt Multicast_Target[Multicast_Integer_A]
                • Else - Actions
                  • -------- Select Group twice to put priority on non-debuffed enemies --------
                  • Set VariableSet Multicast_Point = (Position of Multicast_Caster[Multicast_Integer_A])
                  • Custom script: set udg_Multicast_Group[1] = CreateGroup()
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in (Units within 1600.00 of Multicast_Point.) and do (Actions)
                    • Loop - Actions
                      • Set VariableSet Multicast_Unit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Multicast_Unit is A structure) Equal to False
                          • (Multicast_Unit is alive) Equal to True
                          • (Multicast_Unit has buff Ignite ) Equal to False
                          • (Multicast_Unit is visible to (Owner of Multicast_Caster[Multicast_Integer_A]).) Equal to True
                          • (Multicast_Unit belongs to an enemy of (Owner of Multicast_Caster[Multicast_Integer_A]).) Equal to True
                          • (Level of Marker (Trigger prevention) for Multicast_Unit) Equal to 0
                        • Then - Actions
                          • Unit Group - Add Multicast_Unit to Multicast_Group[1]
                        • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Multicast_Group[1] is empty) Equal to False
                    • Then - Actions
                      • Set VariableSet Multicast_Group[2] = (Random 1 units from Multicast_Group[1])
                      • -------- --------
                      • Set VariableSet Multicast_X = (X of Multicast_Point)
                      • Set VariableSet Multicast_Y = (Y of Multicast_Point)
                      • Custom script: call SetUnitX(udg_Multicast_Dummy[udg_Multicast_Integer_A], udg_Multicast_X)
                      • Custom script: call SetUnitY(udg_Multicast_Dummy[udg_Multicast_Integer_A], udg_Multicast_Y)
                      • -------- --------
                      • Unit Group - Pick every unit in Multicast_Group[2] and do (Actions)
                        • Loop - Actions
                          • Set VariableSet Multicast_Unit = (Picked unit)
                          • Unit - Order Multicast_Dummy[Multicast_Integer_A] to Neutral Alchemist - Acid Bomb Multicast_Unit
                      • Custom script: call DestroyGroup(udg_Multicast_Group[2])
                    • Else - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in (Units within 1600.00 of Multicast_Point.) and do (Actions)
                        • Loop - Actions
                          • Set VariableSet Multicast_Unit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Multicast_Unit is A structure) Equal to False
                              • (Multicast_Unit is alive) Equal to True
                              • (Multicast_Unit is visible to (Owner of Multicast_Caster[Multicast_Integer_A]).) Equal to True
                              • (Multicast_Unit belongs to an enemy of (Owner of Multicast_Caster[Multicast_Integer_A]).) Equal to True
                              • (Level of Marker (Trigger prevention) for Multicast_Unit) Equal to 0
                            • Then - Actions
                              • Unit Group - Add Multicast_Unit to Multicast_Group[1]
                            • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Multicast_Group[1] is empty) Equal to False
                        • Then - Actions
                          • Set VariableSet Multicast_Group[2] = (Random 1 units from Multicast_Group[1])
                          • -------- --------
                          • Set VariableSet Multicast_X = (X of Multicast_Point)
                          • Set VariableSet Multicast_Y = (Y of Multicast_Point)
                          • Custom script: call SetUnitX(udg_Multicast_Dummy[udg_Multicast_Integer_A], udg_Multicast_X)
                          • Custom script: call SetUnitY(udg_Multicast_Dummy[udg_Multicast_Integer_A], udg_Multicast_Y)
                          • -------- --------
                          • Unit Group - Pick every unit in Multicast_Group[2] and do (Actions)
                            • Loop - Actions
                              • Set VariableSet Multicast_Unit = (Picked unit)
                              • Unit - Order Multicast_Dummy[Multicast_Integer_A] to Neutral Alchemist - Acid Bomb Multicast_Unit
                          • Custom script: call DestroyGroup(udg_Multicast_Group[2])
                        • Else - Actions
                          • -------- NO TARGET FOUND --------
                  • Custom script: call DestroyGroup(udg_Multicast_Group[1])
                  • Custom script: call RemoveLocation (udg_Multicast_Point)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Multicast_Multiplier[Multicast_Integer_A] Equal to 0
            • Then - Actions
              • Unit - Remove Multicast_Dummy[Multicast_Integer_A] from the game
              • -------- --------
              • Set VariableSet Multicast_Caster[Multicast_Integer_A] = Multicast_Caster[Multicast_Index]
              • Set VariableSet Multicast_Target[Multicast_Integer_A] = Multicast_Target[Multicast_Index]
              • Set VariableSet Multicast_Dummy[Multicast_Integer_A] = Multicast_Dummy[Multicast_Index]
              • Set VariableSet Multicast_Multiplier[Multicast_Integer_A] = Multicast_Multiplier[Multicast_Index]
              • Set VariableSet Multicast_Counter[Multicast_Integer_A] = Multicast_Counter[Multicast_Index]
              • Set VariableSet Multicast_Boolean[Multicast_Integer_A] = Multicast_Boolean[Multicast_Index]
              • -------- --------
              • Set VariableSet Multicast_Index = (Multicast_Index - 1)
              • Set VariableSet Multicast_Integer_A = (Multicast_Integer_A - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Multicast_Index Equal to 0
                • Then - Actions
                  • Countdown Timer - Pause Multicast_Timer
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top