• 🏆 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!

"Craft" item with 3 from any of 16 items

Status
Not open for further replies.
Level 18
Joined
Mar 16, 2008
Messages
721
I might be over thinking this. So this map has 16 items. I want you to be able to "combine" any 3 from a pool of 16 items. I made this trigger and thought it was working but it seems to be "combining" and creating the item even if the unit only has 1 of the items or 2. I want it to combine only if it has 3 or more, and only consume 3 items.

I think something as simple as a condition of "has atleast 3 items from this pool of 16 items" would get this trigger working but not sure how to translate that into an actual gui conditional.

I know I might be asking too much for a forum post but here's a copy of the trigger. Curious what you guys think and if you can imagine a way to get this working or completely simplify it:

  • Create Epic Creep Crystal
    • Events
      • Unit - A unit comes within 256.00 of Orb Forge 1078 <gen>
    • Conditions
      • ((Item carried by (Triggering unit) of type Epic Disenchanting Rod) is owned) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • ((Item carried by (Triggering unit) of type Imbued Blood Stained Dagger) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Gilded Chestguard) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Iron Cuisses) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Iron Gauntlets) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Knight's Belt) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Pandaren Amulet) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Ruby Ring) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Sapphire Ring) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Shadow Bow) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Vas Fictile Axe) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued Verbene Bonariensis) is owned) Equal to True
          • ((Item carried by (Triggering unit) of type Imbued War Horse Bridal) is owned) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EpicCreepItems Equal to 0
          • ((Item carried by (Triggering unit) of type Imbued Blood Stained Dagger) is owned) Equal to True
        • Then - Actions
          • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
          • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Blood Stained Dagger)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 1
              • ((Item carried by (Triggering unit) of type Imbued Blood Stained Dagger) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Blood Stained Dagger)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 2
                  • ((Item carried by (Triggering unit) of type Imbued Blood Stained Dagger) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Blood Stained Dagger)
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Fallen Death Knight's Blade)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Fallen Knight's Helmet)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Fallen Paladin's Gavel)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Gilded Chestguard) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Gilded Chestguard)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Gilded Chestguard) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Gilded Chestguard)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Gilded Chestguard) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Gilded Chestguard)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Iron Cuisses) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Iron Cuisses)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Iron Cuisses) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Iron Cuisses)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Iron Cuisses) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Iron Cuisses)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Iron Gauntlets) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Iron Gauntlets)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Iron Gauntlets) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Iron Gauntlets)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Iron Gauntlets) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Iron Gauntlets)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Iron Shoulder Plates)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Knight's Belt) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Knight's Belt)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Knight's Belt) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Knight's Belt)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Knight's Belt) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Knight's Belt)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Pandaren Amulet) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Pandaren Amulet)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Pandaren Amulet) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Pandaren Amulet)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Pandaren Amulet) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Pandaren Amulet)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Ruby Ring) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Ruby Ring)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Ruby Ring) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Ruby Ring)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Ruby Ring) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Ruby Ring)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Sapphire Ring) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Sapphire Ring)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Sapphire Ring) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Sapphire Ring)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Sapphire Ring) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Sapphire Ring)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Shadow Bow) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Shadow Bow)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Shadow Bow) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Shadow Bow)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Shadow Bow) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Shadow Bow)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Vas Fictile Axe) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Vas Fictile Axe)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Vas Fictile Axe) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Vas Fictile Axe)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Vas Fictile Axe) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Vas Fictile Axe)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued Verbene Bonariensis) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued Verbene Bonariensis)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued Verbene Bonariensis) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued Verbene Bonariensis)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued Verbene Bonariensis) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued Verbene Bonariensis)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 0
              • ((Item carried by (Triggering unit) of type Imbued War Horse Bridal) is owned) Equal to True
            • Then - Actions
              • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
              • Set VariableSet EpicCreepItem_temp_1 = (Item carried by (Triggering unit) of type Imbued War Horse Bridal)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 1
                  • ((Item carried by (Triggering unit) of type Imbued War Horse Bridal) is owned) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                  • Set VariableSet EpicCreepItem_temp_2 = (Item carried by (Triggering unit) of type Imbued War Horse Bridal)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • EpicCreepItems Equal to 2
                      • ((Item carried by (Triggering unit) of type Imbued War Horse Bridal) is owned) Equal to True
                    • Then - Actions
                      • Set VariableSet EpicCreepItems = (EpicCreepItems + 1)
                      • Set VariableSet EpicCreepItem_temp_3 = (Item carried by (Triggering unit) of type Imbued War Horse Bridal)
                    • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • EpicCreepItems Equal to 3
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 3
                  • ((Item carried by (Triggering unit) of type Epic Disenchanting Rod) is owned) Equal to True
                  • ((Triggering unit) has an item of type Royal Orb of Fire) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of EpicCreepItem_temp_1)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of EpicCreepItem_temp_2)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of EpicCreepItem_temp_3)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_1_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_2_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_3_TYPE)
                  • Hero - Create |cffff4444Sun Ruby|r and give it to (Triggering unit)
                  • Floating Text - Create floating text that reads |cff6f2583Items Dis... above (Triggering unit) with Z offset 0.00, using font size 24.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 55.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                  • Set VariableSet EpicCreepItems = 0
                  • Set VariableSet EpicCreepItem_temp_1 = No item
                  • Set VariableSet EpicCreepItem_temp_2 = No item
                  • Set VariableSet EpicCreepItem_temp_3 = No item
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of No item)
                  • If ((Create Nexus Shield <gen> is on) Equal to True) then do (Do nothing) else do (Trigger - Turn on Create Nexus Shield <gen>)
                  • Skip remaining actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 3
                  • ((Item carried by (Triggering unit) of type Epic Disenchanting Rod) is owned) Equal to True
                  • ((Triggering unit) has an item of type Royal Orb of Water) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of EpicCreepItem_temp_1)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of EpicCreepItem_temp_2)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of EpicCreepItem_temp_3)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_1_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_2_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_3_TYPE)
                  • Hero - Create |cff4444ffNeptune Sapphire|r and give it to (Triggering unit)
                  • Floating Text - Create floating text that reads |cff6f2583Items Dis... above (Triggering unit) with Z offset 0.00, using font size 24.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 55.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                  • Set VariableSet EpicCreepItems = 0
                  • Set VariableSet EpicCreepItem_temp_1 = No item
                  • Set VariableSet EpicCreepItem_temp_2 = No item
                  • Set VariableSet EpicCreepItem_temp_3 = No item
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of No item)
                  • If ((Create Nexus Shield <gen> is on) Equal to True) then do (Do nothing) else do (Trigger - Turn on Create Nexus Shield <gen>)
                  • Skip remaining actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 3
                  • ((Item carried by (Triggering unit) of type Epic Disenchanting Rod) is owned) Equal to True
                  • ((Triggering unit) has an item of type Royal Orb of Wind) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of EpicCreepItem_temp_1)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of EpicCreepItem_temp_2)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of EpicCreepItem_temp_3)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_1_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_2_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_3_TYPE)
                  • Hero - Create |cff66ffffStar Emerald|r and give it to (Triggering unit)
                  • Floating Text - Create floating text that reads |cff6f2583Items Dis... above (Triggering unit) with Z offset 0.00, using font size 24.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 55.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                  • Set VariableSet EpicCreepItems = 0
                  • Set VariableSet EpicCreepItem_temp_1 = No item
                  • Set VariableSet EpicCreepItem_temp_2 = No item
                  • Set VariableSet EpicCreepItem_temp_3 = No item
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of No item)
                  • If ((Create Nexus Shield <gen> is on) Equal to True) then do (Do nothing) else do (Trigger - Turn on Create Nexus Shield <gen>)
                  • Skip remaining actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • EpicCreepItems Equal to 3
                  • ((Item carried by (Triggering unit) of type Epic Disenchanting Rod) is owned) Equal to True
                  • ((Triggering unit) has an item of type Royal Orb of Ice) Equal to True
                • Then - Actions
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of EpicCreepItem_temp_1)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of EpicCreepItem_temp_2)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of EpicCreepItem_temp_3)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_1_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_2_TYPE)
                  • Item - Remove (Item carried by (Triggering unit) of type EpicCreepItem_Temp_3_TYPE)
                  • Hero - Create |cffB19CD9Moon Diamond|r and give it to (Triggering unit)
                  • Floating Text - Create floating text that reads |cff6f2583Items Dis... above (Triggering unit) with Z offset 0.00, using font size 24.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                  • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 55.00 degrees
                  • Floating Text - Change (Last created floating text): Disable permanence
                  • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
                  • Set VariableSet EpicCreepItems = 0
                  • Set VariableSet EpicCreepItem_temp_1 = No item
                  • Set VariableSet EpicCreepItem_temp_2 = No item
                  • Set VariableSet EpicCreepItem_temp_3 = No item
                  • Set VariableSet EpicCreepItem_Temp_1_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_2_TYPE = (Item-type of No item)
                  • Set VariableSet EpicCreepItem_Temp_3_TYPE = (Item-type of No item)
                  • If ((Create Nexus Shield <gen> is on) Equal to True) then do (Do nothing) else do (Trigger - Turn on Create Nexus Shield <gen>)
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
        • Else - Actions
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
So you're relying on this Condition to check if the unit has one of your 16 items:
  • ((Item carried by (Triggering unit) of type Imbued Blood Stained Dagger) is owned) Equal to True

But you're assuming that this condition is checking a different Blood Stained Dagger each time you use it. That's not the case, this condition will check the same exact dagger for all 3 of it's If Then Else statements. So as long as the unit has 1 of these daggers then the logic will always result with it thinking it has 3.

Another issue is how you've nested your If Then Else statements. Most of that code is unreachable with how you've done it since it's all contained in one big If Then Else statement.

Here's a simple way of doing it with some Arrays and For Loops:
  • Setup Item Types
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- List the basic combinable item-types: --------
      • Set VariableSet ItemTypesBasic[1] = Ring of Protection +3
      • Set VariableSet ItemTypesBasic[2] = Gauntlets of Ogre Strength +3
      • Set VariableSet ItemTypesBasic[3] = Slippers of Agility +3
      • Set VariableSet ItemTypesBasic[4] = Mantle of Intelligence +3
      • -------- --------
      • -------- How many of these basic item-types exist? --------
      • Set VariableSet ItemTypesTotal = 4
      • -------- --------
      • -------- List the different upgraded versions of the basic item-types (match the indexes with their basic version): --------
      • Set VariableSet ItemTypesUpgrade[1] = Ring of Protection +5
      • Set VariableSet ItemTypesUpgrade[2] = Belt of Giant Strength +6
      • Set VariableSet ItemTypesUpgrade[3] = Boots of Quel'Thalas +6
      • Set VariableSet ItemTypesUpgrade[4] = Robe of the Magi +6
  • Combine Items
    • Events
      • Unit - A unit comes within 256.00 of Circle of Power (large) 0002 <gen>
    • Conditions
      • ((Triggering unit) has an item of type Disenchanting Rod) Equal to True
    • Actions
      • -------- Setup variables: --------
      • Set VariableSet CombineUnit = (Triggering unit)
      • Set VariableSet UpgradeSuccess = False
      • For each (Integer ItemIndex) from 1 to ItemTypesTotal, do (Actions)
        • Loop - Actions
          • Set VariableSet ItemCount[ItemIndex] = 0
      • -------- --------
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if an upgrade hasn't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpgradeSuccess Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 CombineUnit in slot InvSlot)) Equal to ItemTypesBasic[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount[ItemIndex] = (ItemCount[ItemIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount[ItemIndex] Equal to 3
                        • Then - Actions
                          • Set VariableSet BasicItemType = ItemTypesBasic[ItemIndex]
                          • Set VariableSet UpgradeItemType = ItemTypesUpgrade[ItemIndex]
                          • Set VariableSet UpgradeSuccess = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
      • -------- --------
      • -------- If we found 3 or more of the same basic item-type then proceed to upgrade them: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UpgradeSuccess Equal to True
        • Then - Actions
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Hero - Create UpgradeItemType and give it to CombineUnit
          • Special Effect - Create a special effect attached to the origin of CombineUnit using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
So it might look confusing but it's rather simple:
  • Loop over each inventory slot (slots 1 to 6).
  • For each inventory slot figure out which basic item-type is equipped there (if any).
  • If a basic item-type is found then increase that specific item's counter (ItemCount[ItemIndex]) by 1.
  • After increasing that item's counter check to see if it's Equal to 3.
  • If it is Equal to 3 then we know we've found 3 of the same basic item-type and can do the following:
  • - Set the BasicItemType variable to be equal to our successful basic-item (the one that has 3 of the same type).
  • - Set the UpgradeItemType variable to the upgraded version of that basic item-type. This is easy since these item-types share the same [Index].
  • - Set the UpgradeSuccess boolean to True since we've found a successful upgrade (3 of the same item).

  • Finally, outside of those For Loops and at the end of the trigger, check to see if UpgradeSuccess is True.
  • If it is True then we know that all of the information we need is set. BasicItemType = the basic item that we found 3 of and UpgradeItemType is it's upgraded version. The logic is simple now, remove 3 BasicItemTypes from our unit and create and give an UpgradeItemType to it.
 

Attachments

  • Combine Items 3 of each.w3m
    19.4 KB · Views: 12
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
You continue to impress me, Uncle. I think this will work. My one concern is what if it has 4 basic items? I only want it to destroy 3. Also, I may need to modify slightly because I want it to create 1 of 4 different resulting items depending on the type of "orb" the unit is carrying. This will work though.

Thank you for going above and beyond!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
No problem.

And it only ever destroys three, the logic is simple at the end:
  • Item - Remove (Item carried by CombineUnit of type BasicItemType)
  • Item - Remove (Item carried by CombineUnit of type BasicItemType)
  • Item - Remove (Item carried by CombineUnit of type BasicItemType)
  • Hero - Create UpgradeItemType and give it to CombineUnit
I'm removing 3 basic items and creating 1 upgraded item.

And by "orb" do you mean the Disenchanting Rod?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
Alright, I added in the Orb stuff. So now in the Setup trigger you'll have Item-Type Arrays for each different Orb:
  • Setup Item Types
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- List the basic combinable item-types: --------
      • Set VariableSet ItemTypesBasic[1] = Ring of Protection +3
      • Set VariableSet ItemTypesBasic[2] = Gauntlets of Ogre Strength +3
      • Set VariableSet ItemTypesBasic[3] = Slippers of Agility +3
      • Set VariableSet ItemTypesBasic[4] = Mantle of Intelligence +3
      • -------- --------
      • -------- How many of these basic item-types exist? --------
      • Set VariableSet ItemTypesTotal = 4
      • -------- --------
      • -------- List the different upgraded versions of the basic item-types (match the indexes with their basic version): --------
      • -------- --------
      • -------- Orb A upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbA[1] = Ring of Protection +5
      • Set VariableSet ItemTypesUpgrade_OrbA[2] = Belt of Giant Strength +6
      • Set VariableSet ItemTypesUpgrade_OrbA[3] = Boots of Quel'Thalas +6
      • Set VariableSet ItemTypesUpgrade_OrbA[4] = Robe of the Magi +6
      • -------- --------
      • -------- Orb B upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbB[1] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbB[2] = Helm of Valor
      • Set VariableSet ItemTypesUpgrade_OrbB[3] = Hood of Cunning
      • Set VariableSet ItemTypesUpgrade_OrbB[4] = Medallion of Courage
      • -------- --------
      • -------- Orb C upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbC[1] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbC[2] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbC[3] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbC[4] = Ring of Superiority
      • -------- --------
      • -------- Orb D upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbD[1] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbD[2] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbD[3] = Ring of Superiority
      • Set VariableSet ItemTypesUpgrade_OrbD[4] = Ring of Superiority
      • -------- --------
      • -------- List the different orb types and what trigger they run (list them from greatest to worst): --------
      • Set VariableSet OrbTypes[1] = Orb D
      • Set VariableSet OrbTypes[2] = Orb C
      • Set VariableSet OrbTypes[3] = Orb B
      • Set VariableSet OrbTypes[4] = Orb A
      • Set VariableSet OrbTriggers[1] = Orb D <gen>
      • Set VariableSet OrbTriggers[2] = Orb C <gen>
      • Set VariableSet OrbTriggers[3] = Orb B <gen>
      • Set VariableSet OrbTriggers[4] = Orb A <gen>
      • Set VariableSet OrbsTotal = 4
I got a bit lazy with Orb C/D so they all have Ring of Superiority as their item-types. Obviously you'd go in and set them to what you want anyway.

So basically what happens is depending on which Orb your unit has equipped one of the 4 triggers will run -> Orb A, Orb B, Orb C or Orb D.

These triggers are exactly the same except for one important action:
  • Set VariableSet UpgradeItemType = ItemTypesUpgrade_OrbA[ItemIndex]

This action will be different for each Orb trigger. For example:
Orb A will reference ItemTypesUpgrade_OrbA[ItemIndex]
Orb B will reference ItemTypesUpgrade_OrbB[ItemIndex]
Orb C will reference ItemTypesUpgrade_OrbC[ItemIndex]
Orb D will reference ItemTypesUpgrade_OrbD[ItemIndex]

So UpgradeItemType will be Set to something different depending on which Orb is equipped. If you have multiple different Orbs equipped it will always choose the "greatest" Orb over the others, which is managed in the Setup trigger. For this to work you need to order the Orbs from Greatest to Worst, so OrbTypes[1] is the best Orb.
 

Attachments

  • Combine Items 3 of each ORB.w3m
    23 KB · Views: 13
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
U N C L E! Wow! Thank you so much! I really owe you!

Update: I implemented your triggers. I do not think we need an array for the orbs because each orb only results in one type of item, if that makes sense.

THIS IS BRILLIANT. Could not have created this on my own LOL.

  • Setup Item Types
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- List the basic combinable item-types: --------
      • Set VariableSet ItemTypesBasic[1] = Imbued Blood Stained Dagger
      • Set VariableSet ItemTypesBasic[2] = Imbued Fallen Death Knight's Blade
      • Set VariableSet ItemTypesBasic[3] = Imbued Fallen Knight's Helmet
      • Set VariableSet ItemTypesBasic[4] = Imbued Fallen Paladin's Gavel
      • Set VariableSet ItemTypesBasic[5] = Imbued Gilded Chestguard
      • Set VariableSet ItemTypesBasic[6] = Imbued Iron Cuisses
      • Set VariableSet ItemTypesBasic[7] = Imbued Iron Gauntlets
      • Set VariableSet ItemTypesBasic[8] = Imbued Iron Shoulder Plates
      • Set VariableSet ItemTypesBasic[9] = Imbued Knight's Belt
      • Set VariableSet ItemTypesBasic[10] = Imbued Pandaren Amulet
      • Set VariableSet ItemTypesBasic[11] = Imbued Ruby Ring
      • Set VariableSet ItemTypesBasic[12] = Imbued Sapphire Ring
      • Set VariableSet ItemTypesBasic[13] = Imbued Shadow Bow
      • Set VariableSet ItemTypesBasic[14] = Imbued Vas Fictile Axe
      • Set VariableSet ItemTypesBasic[15] = Imbued Verbene Bonariensis
      • Set VariableSet ItemTypesBasic[16] = Imbued War Horse Bridal
      • -------- --------
      • -------- How many of these basic item-types exist? --------
      • Set VariableSet ItemTypesTotal = 16
      • -------- --------
      • -------- List the different upgraded versions of the basic item-types (match the indexes with their basic version): --------
      • -------- Orb A upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbA = |cffff4444Sun Ruby|r
      • -------- Orb B upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbB = |cff4444ffNeptune Sapphire|r
      • -------- Orb C upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbC = |cff66ffffStar Emerald|r
      • -------- Orb D upgrades: --------
      • Set VariableSet ItemTypesUpgrade_OrbD = |cffB19CD9Moon Diamond|r
      • -------- --------
      • -------- List the different orb types and what trigger they run (list them from greatest to worst): --------
      • Set VariableSet OrbTypes[1] = Royal Orb of Fire
      • Set VariableSet OrbTypes[2] = Royal Orb of Water
      • Set VariableSet OrbTypes[3] = Royal Orb of Wind
      • Set VariableSet OrbTypes[4] = Royal Orb of Ice
      • Set VariableSet OrbTriggers[1] = Orb A <gen>
      • Set VariableSet OrbTriggers[2] = Orb B <gen>
      • Set VariableSet OrbTriggers[3] = Orb C <gen>
      • Set VariableSet OrbTriggers[4] = Orb D <gen>
      • Set VariableSet OrbsTotal = 4

  • Combine Items
    • Events
      • Unit - A unit comes within 256.00 of Orb Forge 1078 <gen>
    • Conditions
      • ((Triggering unit) has an item of type Epic Disenchanting Rod) Equal to True
    • Actions
      • -------- Setup variables: --------
      • Set VariableSet CombineUnit = (Triggering unit)
      • Set VariableSet UpgradeSuccess = False
      • Set VariableSet OrbWasFound = False
      • For each (Integer ItemIndex) from 1 to ItemTypesTotal, do (Actions)
        • Loop - Actions
          • Set VariableSet ItemCount[ItemIndex] = 0
      • -------- --------
      • -------- Figure out which Orb the unit has equipped and run the approriate trigger: --------
      • For each (Integer ItemIndex) from 1 to OrbsTotal, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OrbWasFound Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CombineUnit has an item of type OrbTypes[ItemIndex]) Equal to True
                • Then - Actions
                  • Set VariableSet OrbWasFound = True
                  • Trigger - Run OrbTriggers[ItemIndex] (ignoring conditions)
                • Else - Actions
            • Else - Actions
      • -------- --------
      • -------- If we found 3 or more of the same basic item-type then proceed to upgrade them: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • UpgradeSuccess Equal to True
        • Then - Actions
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Item - Remove (Item carried by CombineUnit of type BasicItemType)
          • Hero - Create UpgradeItemType and give it to CombineUnit
          • Special Effect - Create a special effect attached to the origin of CombineUnit using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
          • Special Effect - Destroy (Last created special effect)
          • Floating Text - Create floating text that reads |cff6f2583Items Dis... above (Triggering unit) with Z offset 0.00, using font size 24.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 32.00 towards 55.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
        • Else - Actions

These don't need events? these triggers are a bit beyond my understanding


  • Orb A
    • Events
    • Conditions
    • Actions
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if an upgrade hasn't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpgradeSuccess Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 CombineUnit in slot InvSlot)) Equal to ItemTypesBasic[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount[ItemIndex] = (ItemCount[ItemIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount[ItemIndex] Equal to 3
                        • Then - Actions
                          • -------- Here's where you set which upgraded item-type you want to use: --------
                          • Set VariableSet UpgradeItemType = |cffff4444Sun Ruby|r
                          • Set VariableSet BasicItemType = ItemTypesBasic[ItemIndex]
                          • Set VariableSet UpgradeSuccess = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
  • Orb B
    • Events
    • Conditions
    • Actions
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if an upgrade hasn't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpgradeSuccess Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 CombineUnit in slot InvSlot)) Equal to ItemTypesBasic[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount[ItemIndex] = (ItemCount[ItemIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount[ItemIndex] Equal to 3
                        • Then - Actions
                          • -------- Here's where you set which upgraded item-type you want to use: --------
                          • Set VariableSet UpgradeItemType = |cff4444ffNeptune Sapphire|r
                          • Set VariableSet BasicItemType = ItemTypesBasic[ItemIndex]
                          • Set VariableSet UpgradeSuccess = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
  • Orb C
    • Events
    • Conditions
    • Actions
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if an upgrade hasn't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpgradeSuccess Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 CombineUnit in slot InvSlot)) Equal to ItemTypesBasic[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount[ItemIndex] = (ItemCount[ItemIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount[ItemIndex] Equal to 3
                        • Then - Actions
                          • -------- Here's where you set which upgraded item-type you want to use: --------
                          • Set VariableSet UpgradeItemType = |cff66ffffStar Emerald|r
                          • Set VariableSet BasicItemType = ItemTypesBasic[ItemIndex]
                          • Set VariableSet UpgradeSuccess = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
  • Orb D
    • Events
    • Conditions
    • Actions
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if an upgrade hasn't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • UpgradeSuccess Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 CombineUnit in slot InvSlot)) Equal to ItemTypesBasic[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount[ItemIndex] = (ItemCount[ItemIndex] + 1)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount[ItemIndex] Equal to 3
                        • Then - Actions
                          • -------- Here's where you set which upgraded item-type you want to use: --------
                          • Set VariableSet UpgradeItemType = |cffB19CD9Moon Diamond|r
                          • Set VariableSet BasicItemType = ItemTypesBasic[ItemIndex]
                          • Set VariableSet UpgradeSuccess = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
I don't understand what the orbs do then. I thought that you would get a different upgrade result depending on which orb you had equipped like:
3 gauntlets of strength + orb a = belt of giant strength
3 gauntlets of strength + orb b = mighty hammer
3 gauntlets of strength + orb c = ogre club
etc...

If that's not the case then how do they work?

Which 3 basic items turn into a gem (sapphire, ruby, diamond, emerald)? What makes them different from the original design?


And those Orb triggers don't need events because their actions are run like this from the Combine Items trigger:
  • Trigger - Run OrbTriggers[ItemIndex] (ignoring conditions)

You can make a trigger run it's actions on command using that action. There's two versions of that action, the first being (ignoring conditions) which causes the trigger to execute just the actions while ignoring the Events/Conditions. Note that any conditions inside If Then Else statements will still work as normal. The other version (checking conditions) will skip the Events and attempt to run the trigger's actions but only if the conditions in the Conditions block are met.

I take advantage of this in my system in order to get the correct ItemTypesUpgrade_Orb array. But I think this is all unnecessary now depending on what you actually wanted to happen.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
First of all thank you so much for continuing to reply to me.

yes you are correct about the orbs should yield different items. but for some reason the triggers don't seem to be running is my only concern.

Sorry if I have been confusing but this is my intention:
1) any combination of the 16 basic items. so it could be any 3 basic items. For example, #3, #7 and #15. or basic items #1, #2, #9 - for example.
2) 1 of any of the 4 orbs, each orb changes the resulting item. the basic items used do not affect the resulting item, you only need any 3 basic items.
3) 1 "disenchanting rod"
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,511
Edit: I think all of the confusion is settled and this should be exactly what you need. I had misread your initial trigger but looking back at it now I see exactly what you were trying to do.

  • Setup Item Types
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- List the disenchantable item-types: --------
      • Set VariableSet ItemTypes[1] = Ring of Protection +3
      • Set VariableSet ItemTypes[2] = Gauntlets of Ogre Strength +3
      • Set VariableSet ItemTypes[3] = Slippers of Agility +3
      • Set VariableSet ItemTypes[4] = Mantle of Intelligence +3
      • -------- --------
      • -------- How many of these disenchantable item-types exist? --------
      • Set VariableSet ItemTypesTotal = 4
      • -------- --------
      • -------- List the different orb types and what gems they create: --------
      • -------- ( Order them from best to worst - best orbs take priority over worst orbs ) --------
      • Set VariableSet OrbTypes[1] = Orb D
      • Set VariableSet OrbTypes[2] = Orb C
      • Set VariableSet OrbTypes[3] = Orb B
      • Set VariableSet OrbTypes[4] = Orb A
      • Set VariableSet OrbGems[1] = Enchanted Gemstone
      • Set VariableSet OrbGems[2] = Cheese
      • Set VariableSet OrbGems[3] = Heart of Aszune
      • Set VariableSet OrbGems[4] = Wirt's Leg
      • Set VariableSet OrbTotal = 4
  • Disenchant Items
    • Events
      • Unit - A unit comes within 256.00 of Circle of Power (large) 0002 <gen>
    • Conditions
      • ((Triggering unit) has an item of type Disenchanting Rod) Equal to True
    • Actions
      • -------- Setup variables: --------
      • Set VariableSet DisenchantUnit = (Triggering unit)
      • Set VariableSet ThreeItemsFound = False
      • Set VariableSet OrbWasFound = False
      • Set VariableSet ItemCount = 0
      • -------- --------
      • -------- Figure out which Orb the unit has equipped: --------
      • For each (Integer ItemIndex) from 1 to OrbTotal, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • OrbWasFound Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (DisenchantUnit has an item of type OrbTypes[ItemIndex]) Equal to True
                • Then - Actions
                  • Set VariableSet OrbWasFound = True
                  • Set VariableSet GemReward = OrbGems[ItemIndex]
                • Else - Actions
            • Else - Actions
      • -------- --------
      • -------- If no orbs were found then don't bother running the rest of the actions: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OrbWasFound Equal to False
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Loop over each Inventory Slot and count up the number of basic items equipped: --------
      • For each (Integer InvSlot) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- Only run these actions if 3 items haven't been found yet: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ThreeItemsFound Equal to False
            • Then - Actions
              • For each (Integer ItemIndex) from 1 to ItemTypesTotal, 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 DisenchantUnit in slot InvSlot)) Equal to ItemTypes[ItemIndex]
                    • Then - Actions
                      • Set VariableSet ItemCount = (ItemCount + 1)
                      • Set VariableSet ItemsFound[ItemCount] = (Item carried by DisenchantUnit in slot InvSlot)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ItemCount Equal to 3
                        • Then - Actions
                          • Set VariableSet ThreeItemsFound = True
                        • Else - Actions
                    • Else - Actions
            • Else - Actions
      • -------- --------
      • -------- If we found 3 item-types then proceed to disenchant them: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ThreeItemsFound Equal to True
        • Then - Actions
          • Item - Remove ItemsFound[1]
          • Item - Remove ItemsFound[2]
          • Item - Remove ItemsFound[3]
          • Hero - Create GemReward and give it to DisenchantUnit
          • Special Effect - Create a special effect attached to the origin of DisenchantUnit using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
 

Attachments

  • Combine Items Orb 2.w3m
    20.2 KB · Views: 9
Last edited:
Status
Not open for further replies.
Top