• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

Why i cannot add item with 0 stock?

Level 17
Joined
Jun 2, 2009
Messages
1,193
Hello everyone. This is what I want exactly.

Hello. I want to add X item to the X shop with 300 seconds stock start delay.
I have to do it with triggers because game is starting after few settings. I cannot put it shop directly.

Ok i have solved one the mysteries. We have to set Stock Replenish Interval above 0 to make it work.

Update: Ok still i haven't figured it out yet. Let me show you something.

  • INVESTMENT UPGRADE Copy 2
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to |cffdda0ddDurability|r
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • StringTeamPoint[1] Greater than or equal to 500
        • Then - Actions
          • Neutral Building - Add |cffdda0ddDurability|r to Lich3 0000 <gen> with 0 in stock and a max stock of 0
        • Else - Actions
          • Neutral Building - Add |cffdda0ddDurability|r to Lich3 0000 <gen> with 1 in stock and a max stock of 1
If i can make it work, it will solves all of my problems.
Why these actions not works as i want?
If then = Add item with 0 stock (someone upgraded this building and it is the proof. If you see this stock 0 means someone already upgraded)
If else = Add item with 1 stock again. Because your team don't have the required TeamPoint and this item should stay in the shop.

Update: Ok i have solved it again. We have to put 1 second wait before re-add. Now i am trying to solve my main question that i have asked.
 
Last edited:

Uncle

Warcraft Moderator
Level 67
Joined
Aug 10, 2018
Messages
6,863
Max Stock of 0 <----

That means the Shop carries ZERO of these items. Set it to 1.

Also, I believe that Action only works if the Shop has the proper abilities (Sell Items?). I know this issue occurs for adding Units to Neutral Shops and requires that the Shop has the Sell Units ability.
 
Top