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

Item Carry = 1

Status
Not open for further replies.
Level 13
Joined
Sep 14, 2008
Messages
1,407
Trigger

  • Stack Items
    • Event
      • Unit - A unit accquires an item
    • Condition
      • Or - Any (Conditions) are true
        • Condition
          • (Item-type of (Item being manipulated)) equal to ItemYouWant
    • Event
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • (Item carried by (Triggering unit) in slot (Integer A)) Gleich (Item being manipulated)
            • 'THEN'-Aktionen
              • Set SlotNumber = (Integer A)
            • 'ELSE'-Aktionen
      • 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'-Bedingungen
              • And - All (Conditions) are true
                • Conditions
                  • (Integer B) not equal to SlotNumber
                  • (Item-type of (Item carried by (Triggering unit) in slot SlotNumber)) equal to (Item-type of (Item carried by (Triggering unit) in slot (Integer B)))
            • 'THEN'-Actions
              • Item - Set charges remaining in (Item carried by (Triggering unit) in slot (Integer B)) to ((Charges remaining in (Item carried by (Triggering unit) in slot (Integer B))) + (Charges remaining in (Item being manipulated)))
              • Item - Remove (Item being manipulated)
            • 'ELSE'-Actions
This trigger does not only remove the item. I adds the charges of the picked item to the item already carried.
 
Level 12
Joined
Mar 16, 2006
Messages
992
By replacing the hero inventory ability with custom inventory ability that can only hold 1 item?
 
Status
Not open for further replies.
Top