Jump to content
  • 0

Coin to Coin Exchanger Request (eA)


Question

1 answer to this question

Recommended Posts

Posted (edited)

for example 1 gold coin for 10 silver coins?

prontera,163,174,4	script	Exchanger	71,{ 
	mes "[Exchanger]";
	mes "Hello, do you want to exchange Seeds into Berrys?";
	if (select("Yes:No") -1) end;
	next;
	mes "[Exchanger]";
	mes "You trade 3 Seeds for 1 Berry";
	if (select ("Trade all!:Single trade!") -1){
		next;
		mes "[Exchanger]";
		mes "Single trade!";
		if(countitem(.req_item) < .req_num){
			next;
			mes "[Exchanger]";
			mes "Not enought seeds to exchange";
		}else{
			next;
			mes "[Exchanger]";
			mes "Successful!";
			delitem .req_item, .req_num;
			getitem .get_item, .get_num;
		}
	}else{
		next;
		mes "[Exchanger]";
		mes "Trade all!";
		next;
		mes "[Exchanger]";
		mes "Successful!";
		.@c = (countitem(.req_item) / .req_num);
		for(.@i = 0; .@i <= .@c ; .@i ++){
			delitem .req_item, .req_num;
			getitem .get_item, .get_num;
		}
				
			
	}
	end;
OnInit:
	.req_item = 608; //Item you need to exchange
	.req_num = 3;	//how many?
		
	.get_item = 607; //Item you get
	.get_num = 1;	//how many?
		
	end;
}
Edited by Normynator

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