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

My items can be duplicated

Level 4
Joined
Mar 9, 2023
Messages
37
Hi! An exploit has appeared with the "Unique item" trigger I created. Somehow they can make multiple, and I can't quite wrap my head around it. Obviously I need testing, but I also need a solution. Can you make me wiser?

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffb4a085Outlaw Cape|r
    • Then - Actions
      • Item - Make (Item being manipulated) Unpawnable
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B)))
              • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item).
              • Skip remaining actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Hero manipulating item) has an item of type |cffb4a085Mage Cloak|r) Equal to True
                      • ((Hero manipulating item) has an item of type |cffb4a085Soldier Breastplate|r) Equal to True
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Hero manipulating item).
                  • Skip remaining actions
                • Else - Actions
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffb4a085Soldier Breastplate|r
    • Then - Actions
      • Item - Make (Item being manipulated) Unpawnable
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B)))
              • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item).
              • Skip remaining actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Hero manipulating item) has an item of type |cffb4a085Mage Cloak|r) Equal to True
                      • ((Hero manipulating item) has an item of type |cffb4a085Outlaw Cape|r) Equal to True
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Hero manipulating item).
                  • Skip remaining actions
                • Else - Actions
    • Else - Actions
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffb4a085Mage Cloak|r
    • Then - Actions
      • Item - Make (Item being manipulated) Unpawnable
      • For each (Integer B) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B)))
              • (Item carried by (Hero manipulating item) in slot (Integer B)) Not equal to (Item being manipulated)
            • Then - Actions
              • Hero - Drop (Item being manipulated) from (Hero manipulating item).
              • Skip remaining actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • ((Hero manipulating item) has an item of type |cffb4a085Soldier Breastplate|r) Equal to True
                      • ((Hero manipulating item) has an item of type |cffb4a085Outlaw Cape|r) Equal to True
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Hero manipulating item).
                  • Skip remaining actions
                • Else - Actions
    • Else - Actions
The three items cannot be held with duplicates or any of the others. It cannot be a way to get extra gold, as they're unpawnable.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
None of your triggers create Items as far as I can see.

Here's a simplified approach for preventing duplicates of the Unpawnable items:
  • Drop Unpawnable
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Item-type of (Item being manipulated)) is Pawnable.) Equal to False
    • Actions
      • Set VariableSet Drop_Hero = (Triggering unit)
      • Set VariableSet Drop_Item = (Item being manipulated)
      • Set VariableSet Drop_Item_Type = (Item-type of Drop_Item)
      • -------- --------
      • -------- First check to see if they have acquired one of these items: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Drop_Item_Type Equal to Belt of Giant Strength +6
              • (Drop_Item_Type Equal to Boots of Quel'Thalas +6
              • (Drop_Item_Type Equal to Robe of the Magi +6
        • Then - Actions
          • -------- We've confirmed that they have. --------
          • Set VariableSet Drop_Counter = 0
          • -------- --------
          • -------- Now let's check if they have more than one of these: --------
          • For each (Integer Drop_Slot) from 1 to 6, do (Actions)
            • Loop - Actions
              • Set VariableSet Drop_Item_Type = (Item carried by Drop_Hero in slot Drop_Slot)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (Drop_Item_Type Equal to Belt of Giant Strength +6
                      • (Drop_Item_Type Equal to Boots of Quel'Thalas +6
                      • (Drop_Item_Type Equal to Robe of the Magi +6
                • Then - Actions
                  • Set VariableSet Drop_Counter = (Drop_Counter + 1)
                • Else - Actions
          • -------- --------
          • -------- If they had more than one of these Items then Drop_Counter will be equal to 2+: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Drop_Counter Greater than 1
            • Then - Actions
              • Hero - Drop Drop_Item from Drop_Hero.
            • Else - Actions
        • Else - Actions
In the Object Editor, change each item's Stats - Can Be Sold To Merchants to FALSE so that it will be considered Unpawnable. This way we can filter them easily and remove the need for your Make Unpawnable action.

My trigger aside, if you have a bunch of Item triggers then I'd suggest posting all of them here. If you have triggers that combine Items then you'll probably want to structure them into one system that uses a single "A unit Acquires an Item" Event. It should be designed to only run Actions for what should happen -> dropping an item or combining an item.

Edit: Fixed trigger
 
Last edited:
Level 19
Joined
Feb 27, 2019
Messages
590
My guess is something else interfering with the triggers. I have experienced duplication exploits with recipes. It was from buying a recipe and ingredient then buying the actual useful item so I didnt find it for some time because its very odd to buy the items in that order. Do you know when the exploit occurs? (simply acquiring an item, buying a recipe, unknown etc)
 
Top