Resetting item-sell cooldown in marketplaces

N-a-z-g-u-l

New Member
Reaction score
30
First, i will explain what i meant by resetting: setting to zero, so that you will instantly be able to buy the item... I want an item to be sold to all players having one of the two specified units from a marketplace... it does not have to use the real marketplace, but its a neutral building, so this may be useful... is there a way to reset the cooldown, if somebody buys the item, who does not have one of the units? or is their an easier way? a way to prevent other units from buying? i would simply remove the sold item on buying, but then the cooldown is at about ~30 seconds again... (cooldown is very important in this case) jass codes are ok, WEU-only GUI should be converted to jass before posting it here. thanks
 
B

bugi_bi

Guest
only trigger i know is the one that resets cooldown for unit abilities..maybe game see items as abilities too....but you willl have to reset all cooldowns so i guess that won work......there is one that resets singe ability but you cant target item so i guess that wont work too... :(...i dunno....
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
You can set item cooldowns from object editor-items, just look for cooldown. There should also be replsenish rate, set them to 0.
 

N-a-z-g-u-l

New Member
Reaction score
30
its also ok to reset all, because the building only sells one item... but it doesnt work with abilities, already tried it... i also removed the unit and created a new one, works, but its not nice ;) its also possible to use "add item to marketplace", but only with a wait time of at least 0.00 seconds, so that the item disappears for about ~0.2 seconds, and its not nice, either ;) well, no other way? by the way, its going to be a new trading system for battle tanks, if you know the map... you can buy items as a trader (and only a trader), which add in one slot, and after collecting about 5 different types of items in the needed amounts, you can go to your trade master and sell the items together... selling one item alone is not possible... so i think you know, where the trigger is needed: buying the object, which has a cooldown of about 20 seconds... not that important, because ive already thought of another system without cooldown, but with wood, which you have to pay, and which makes you only can carry some items, because you dont have enough wood... each selling would add an amount of wood then... well, but i hope you have another solution...

EDIT: andrew, i need the cooldown... (if i want to use the old system, as ive written here)
 
B

bugi_bi

Guest
i am in clan FAM and we love battle tanks...never lost a game when we play together....
to be honest i didnt quite understand the new trading system, and what for you need the trigger :/
 

N-a-z-g-u-l

New Member
Reaction score
30
well, i will try to explain it again:

you go to the trading points and buy items there (with cooldown of 20 seconds on the items)
you go to the trade master, and there you can sell the items, for example:
3x gold, 3x metal, 1x oil -> 750 gold or something...
you have 8 combinations to choose of, and you can buy trading items in every trading point, even the one being next to your base, but you cant sell it alone, you have to sell it in a combination... with this method the traders have more possibilites...
and about the cooldown: i wanted the item to be ready again after a normal player wanted to buy it, but now i think there wont be players buying the trading items, because their ally trader has also to buy the items...
all in all i like the new trading system, but its not easy to look through the combinations at first... i hope i can find a way to make it easier...
 
B

bugi_bi

Guest
perfectly explained... :D
nice idea...and in the end you can use wood to cover bugs....
but you can modify ability "select hero" that trading point building has so that "select hero" selects only trader units....
 

N-a-z-g-u-l

New Member
Reaction score
30
dont think so... you can only choose from 3 different options, which units can be targeted, but i dont know a way to make it only select two different units (the normal trader and the stealth trader)
edit: by the way, i changed the system a bit... you can sell items alone now, but the items, which are next to your base give only 50 gold... and you need to combine items, if you want to create a factory, or speed-pack or ultimate-pack or sth... if you dont want to combine your items, theres is a button "sell all" selling all trade goods
 
B

bugi_bi

Guest
i thought "stats - targets alowed" will work but aint working...too bad...
 

Sooda

Diversity enchants
Reaction score
318
Um... I don' t know much about your plan, but I had idea how to dedect normal players when they want to buy things. Great ability labeled example: member of club <= lol and if normal player uses it ( Ability is where are items only its ability what is given to building.) reset cooldowns ( Only works if normal player uses it).
 
X

xyon75

Guest
Hi naz sry to be so in late with answer but i'm new to WE and i had the same problem. I figured out 2 ways to solve it.

1.
- Add the "sell item" ability to the shop
- Add the items which need cooldown reset at map initialization (thus not directly in the object editor, 'coz they cant be removed via actions)
- Trigger when the shop sells the item
- If buyer cant hold it then: remove item from the game, remove item from the shop (neutral building - remove ...), wait 0.01 seconds, add again the item (neutral building - add ...).
Unfortunately if u remove the Wait, cooldown doesnt reset. When u buy the item (if u cant buy it) u have a little flashing on the item's icon.

2.
- Use dummy items (copy & paste the item u want to be resetted).
- Trigget item & item-copy selling.
- If buyer cant hold bought item => A. remove item from shop, B. add dummy item to the shop (without wait); here you have to check if shop holds the item or the dummy (ie sold item=item or dummy?) and remove/add the right ones; C. remove item from hero.
- If buyer can hold the item => Always change item on buyer to the first one to avoid problems if it's related to some table/ability/trigger/... (remove item bought + create item for hero).
This method requires more checks during selling and more items in object editor, but removes the flashing of the item shop's icon.
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top