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

Item Unique

Status
Not open for further replies.
Level 3
Joined
Oct 15, 2010
Messages
51
So i got this 4 items , charged up type cuz i got no other items there ;)
I get my mind blown trying to make a trigger that allow you to have only one of them at all time in the hero . The item must be not repeatable and the others must not be able to be picked up .
If the hero tries to pick one of the 4 items while having any one of those 4 to drop the trying to pick item :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
If they are the same item type

  • Untitled Trigger 003
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Set int = 0
      • Set itype = (Item-type of (Item being manipulated))
      • For each (Integer loopA) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • itype Equal to (Item-type of (Item carried by (Triggering unit) in slot loopA))
            • Then - Actions
              • Set int = (int + 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • int Equal to 2
                • Then - Actions
                  • Hero - Drop (Item being manipulated) from (Triggering unit)
                  • Skip remaining actions
                • Else - Actions
            • Else - Actions
If different item types

  • Untitled Trigger 004
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
          • (Item-type of (Item being manipulated)) Equal to Crown of Kings +5
          • (Item-type of (Item being manipulated)) Equal to Kelen's Dagger of Escape
          • (Item-type of (Item being manipulated)) Equal to Mask of Death
    • Actions
      • Set int = 0
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
        • Then - Actions
          • Set int = (int + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Crown of Kings +5) Equal to True
        • Then - Actions
          • Set int = (int + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Kelen's Dagger of Escape) Equal to True
        • Then - Actions
          • Set int = (int + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) has an item of type Mask of Death) Equal to True
        • Then - Actions
          • Set int = (int + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • int Greater than or equal to 2
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit)
        • Else - Actions
 
Status
Not open for further replies.
Top