Jump to content

Question

Posted

An item seller that checks if you have this particular item then doesnt sell you anything.

 

For example, NPC sells aloevera for people only who has 10 gold coins and they dont have any aloeveras inside their inventory. 

 

If I have aloevera, it will check and wont sell me anything. If I dont have enough gold coins, it will check and wont sell me anything.

 

If I dont have aloevera and has Gold Coin inside my inventory, it gives me 100 aloeveras and deletes the gold coin.

Help?

1 answer to this question

Recommended Posts

  • 0
Posted

solved

 

prontera,151,174,4	script	Green Ale Seller	829,{
	mes "[Green Ale Seller]";
	mes "What would you like to do?";
	switch(select("Buy Green Ale","Close")) {
	
	case 1:
		if (countitem(7929) < 10) goto L_NE;
		if (countitem(12135) >= 1) goto L_GA;
		delitem 7929,10;
		getitem 12135,100;
		close;
	L_NE:
		mes "[Green Ale Seller]";
		mes "I'm Sorry but you don't have enough Gold Coins.";
		close;
	L_GA:
		mes "[Green Ale Seller]";
		mes "Please use all your Green Ale first before buying.";
		close;
	case 2:
		next;
		mes "[Green Ale Seller]";
		mes "Okay bye!";
		close;
	}
OnInit:
waitingroom "Green Ale Seller",0;
end;

}

 

Join the conversation

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

Guest
Answer this question...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...