Jump to content

Script_Command: npcshopstock


Hyroshima

Recommended Posts


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

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

  • MVP 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...