Hyroshima Posted March 24, 2023 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 189 Reputation: 122 Joined: 07/11/14 Last Seen: November 27, 2024 Share Posted March 24, 2023 According to a need I had, I didn't find another way to check how many items were left in a npc shop like marketshop, so I made this command to return the amount that still exists in the npc. *npcshopstock("<name>",<item_id>); Obs: In case of -1 return the item was not found in the shop. Example: prontera,157,168,5 script Stock View 113,{ if(!npcshopstock("Bugigangas",607)) { mes "Item "+getitemname(607)+" is out of stock."; close; } mes "Item "+getitemname(607)+" has "+npcshopstock("Bugigangas",607)+"x in stock. is out of stock."; if(select("Open Shop:Cancel")==2) close; close2; callshop "Bugigangas",1; end; } - marketshop Bugigangas 112,607:5000:150 I have little experience in src but I can do some things lol npcshopstock.diff 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.