Jump to content
  • 0
Sign in to follow this  
MikZ

Exchanger

Question

Hello I'm using this script: but i wanted to have it like, NPC will ask,

like how many poring coin do you want to buy.

if 20,000k = 1 poring coin, then player will input 20 poring coins , then that would be a total of 400,000zeny

how many TCG do you want

if 50 poring coing = 1 TCG , if player input 5 tcg = 250 Pcoins so on so fort. it's like short cut rather that making it one by one trade, sorry for my bad english , please help me. thank you

 

// 674,Mithril_Coin
// 13517,Yggdrasilberry_Box
// 7227,TCG_Card
// 100 coins + 15 berry ticket <-> 1 TCG

prontera,157,196,3	script	Exchanger	4_F_JPNCHIBI,{
	set .@TCG,20000;

	mes "[Exchanger]";
	mes "Hello there.";
	mes "I can change your Zeny to TCG, and TCG to POD.";
	mes "Which do you need?";
	next;
	menu "Zeny to Poring coin",t_trade, "Poring Coins to TCG",t_coin,  "TCG to PODs",b_trade, "I dont need anything",-;
	mes "[Exchanger]";
	mes "Very well, have a nice day.";
	close;
t_coin:
	if ( countitem(7539) < 50 ) goto c_fail; // 
//		Zeny -= .@TCG;
	delitem 7539, 50;
	mes "[Exchanger]";
	mes "Ok, here's Your ^0000FFTCG^000000.";
	getitem 25000, 1; // TCG_Card
	close;
t_trade:
	if ( Zeny < .@TCG) goto t_fail; // Mithril_Coin
//	if ( countitem(13517) < 15 ) goto t_fail; // Yggdrasilberry_Box
		Zeny -= .@TCG;
//	delitem 13517, 15;
	mes "[Exchanger]";
	mes "Ok, here's Your ^0000FFPoring Coin^000000.";
	getitem 7539, 1; // TCG_Card
	close;
t_fail:
	mes "[Exchanger]";
	mes "I'm terribly sorry, but you do not have enough Zeny for this ticket.";
	next;
	mes "[Exchanger]";
	mes "Please come back when you have the correct ammount.";
	close;
b_trade:
	if ( countitem(25000) < 50 ) goto b_fail; // TCG_Card
	if ( !checkweight(7179,150) ) goto t_OverWeight; // 100 Mithril_Coin & 15 Yggdrasilberry_Box
	delitem 25000,50;
	mes "[Exchanger]";
	mes "Ok, here's Your ^0000FFPOD^000000.";
	getitem 7179,1;
//	getitem 13517,15;
	close;
b_fail:
	mes "[Exchanger]";
	mes "It seems you don't have that TCG.";
	close;
c_fail:
	mes "[Exchanger]";
	mes "It seems you don't have enough Poring coins.";
	close;
t_OverWeight:
	mes "[TCG Exchanger]";
	mes "It seems you are overweight.";
	close;
}

 

Share this post


Link to post
Share on other sites

1 answer to this question

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.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.