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

Simple Item Limit Question.

Status
Not open for further replies.
Level 7
Joined
Nov 6, 2019
Messages
186
Hey, i am wondering how to limit number of items of type carreid by hero.

i got this, but it lets u pick up more than 1 still

  • WingLimiterTest
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffffff00Divine|r Wings
          • Or - Any (Conditions) are true
            • Conditions
              • (Custom value of (Item carried by (Hero manipulating item) of type |cffffff00Divine|r Wings)) Equal to 1
              • ((Hero manipulating item) has an item of type |cff008000Nature|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff00ffffCosmic|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff800000Chaos|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff800080Void|r Wings) Equal to True
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item).
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: [|cffff0000U|rD|cff...
        • Else - Actions

And if i have this you cant even pick up 1

  • WingLimiterTest
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to |cffffff00Divine|r Wings
          • Or - Any (Conditions) are true
            • Conditions
              • ((Hero manipulating item) has an item of type |cffffff00Divine|r Wings)) Equal to True
              • ((Hero manipulating item) has an item of type |cff008000Nature|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff00ffffCosmic|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff800000Chaos|r Wings) Equal to True
              • ((Hero manipulating item) has an item of type |cff800080Void|r Wings) Equal to True
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item).
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: [|cffff0000U|rD|cff...
        • Else - Actions


i got this working, but if theres a simpler way let me know.

  • WingAquire
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • 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 |cff008000Nature|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff00ffffCosmic|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800000Chaos|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800080Void|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cffffff00Divine|r Wings
        • Then - Actions
          • Set VariableSet LimitWings[(Player number of (Owner of (Hero manipulating item)))] = (LimitWings[(Player number of (Owner of (Hero manipulating item)))] + 1)
        • Else - Actions
  • WingLoose
    • Events
      • Unit - A unit Loses an item
    • Conditions
    • 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 |cff008000Nature|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff00ffffCosmic|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800000Chaos|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800080Void|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cffffff00Divine|r Wings
        • Then - Actions
          • Set VariableSet LimitWings[(Player number of (Owner of (Hero manipulating item)))] = (LimitWings[(Player number of (Owner of (Hero manipulating item)))] - 1)
        • Else - Actions
  • WingLimiter
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • 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 |cff008000Nature|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff00ffffCosmic|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800000Chaos|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cff800080Void|r Wings
              • (Item-type of (Item being manipulated)) Equal to |cffffff00Divine|r Wings
          • LimitWings[(Player number of (Owner of (Hero manipulating item)))] Greater than 1
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item).
          • Game - Display to (Player group((Owner of (Hero manipulating item)))) the text: [|cffff0000U|rD|cff...
        • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top