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

[General] Limited buying of items

Status
Not open for further replies.
Level 2
Joined
Sep 20, 2015
Messages
8
I need help, how do i limit the item to one. for example I buy boots of speed and If I buy another the gold will be returned and the item will be removed. And for removing the bugginess I made the item undroppable.

  • Planewalker Buy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Rune Planewalker's Cloak
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Rune Planewalker's Cloak)
      • Hero - Create Planewalker's Cloak and give it to (Hero manipulating item)
      • Item - Make (Item carried by (Hero manipulating item) of type Planewalker's Cloak) Undroppable
  • Planewalker Limit
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • ((Hero manipulating item) has an item of type Planewalker's Cloak) Equal to True
      • (Item-type of (Item being manipulated)) Equal to Rune Planewalker's Cloak
    • Actions
      • Item - Remove (Item carried by (Hero manipulating item) of type Planewalker's Cloak)
      • Player - Add 1600 to (Owner of (Hero manipulating item)) Current gold

these triggers worked last night, and after I woke up this morning. The trigger doesnt work anymore
 
Last edited:
Level 10
Joined
Apr 4, 2010
Messages
509
these triggers worked last night, and after I woke up this morning. The trigger doesnt work anymore

99a7fb6eafd8239a09c9fc15d1eeb94a.jpg
 
Level 10
Joined
Apr 4, 2010
Messages
509
Delete this part
  • Hero - Drop Bought_Item from (Buying unit)
.
Also the test map doesn't stop a person from buying something, then dropping it to the floor and buying it again.
EDIT: Also don't double post. Instead of posting another comment, just edit one of your old ones like I'm doing right now.
 

Ardenian

A

Ardenian

If you would like to avoid the 'buys the same and gets gold back'-part, you could add the items via triggers to the shop. Once an item that was added via triggers with the stack 1 is sold, then it is removed from the shop permanently.
With more than one player you would have to add dummy shops for every player though.
 
Status
Not open for further replies.
Top