Jump to content
  • 0
Sign in to follow this  
XtriC

Credit to Zeny changer

Question

Hi all.

is there any npc script that trades Credit - Zeny and vice versa which has a limit to 2b zeny 

thank you guys..:B):

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

just a simple trader with that checks for 2b max zeny...

 

liek a coin to zeny trade

1 Coin = 10m zeny something liek that

Share this post


Link to post
Share on other sites
  • 0

OK, I'll try to do it for you.

You want the currency is for a player or account?

Edited by luizragna

Share this post


Link to post
Share on other sites
  • 0

i have a custom item  called Credit

its like a Game ticket so its for players to use exchanging it to 10m zeny per 1 Credit

Share this post


Link to post
Share on other sites
  • 0

I maked with variable.

 

Trader NPC:

prontera,136,217,4	script	Coin Trader	4_M_MANAGER,{

.@npc$ = "[Coin Trader]"; //NPC Name

mes .@npc$;
mes "Hello. I'm the Coin Trader";
mes "I can trade Zeny for Coin and vice versa";
mes "(1 Coin = 10.000.000z)";
mes  "What you want trade?";
next;
menu "Zeny for Coins",zc,"Coins for Zeny",cz,"Close",cl;

cl:
close;

zc:
mes .@npc$;
mes "How many Coins do you want purchase";
mes "(1 Coin = 10.000.000z)";
input @zc;
@qnt = @zc*10000000;

if (Zeny - @qnt < 0){
	
	mes "Do you not have zeny";
	close;
	
}
set SCoin,SCoin + @zc;
set Zeny,Zeny - @qnt;

mes " ";
mes "Thank You!";
mes "(Now do you have "+SCoin+" Coin(s) )";


close;

cz:
mes .@npc$;
mes "How many Coins  you want sell?";
mes "Do you have "+SCoin+" Coin(s)";
mes "(1 Coin = 10.000.000z)";
input @cz;
@qnt = @cz*10000000;

if (SCoin - @cz < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}

if (Zeny + @qnt > 2000000000){
	
	
	mes "Do you can't stay more than 2b Zeny";
	close;
	
}
set SCoin,SCoin - @cz;
set Zeny,Zeny + @qnt;

mes " ";
mes "Thank You!";
mes "(Now do you have "+SCoin+" Coin(s) )";
close;

}

 

Coin Shop:

prontera,141,217,4	script	Coin Shop	4_F_TELEPORTER,{

mes "[Coin Shop]";
mes "Hello. Why do you want buy with yours Coins?";
mes "(Do you have "+SCoin+" Coin(s) )";

menu "Red Potion (3 Coins)",rp,"Knife[4] (7 Coins)",kn,"Cancell",cl;
cl:
close;

rp:
if (SCoin - 3 < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}
SCoin = SCoin - 3;
getitem 501,1;
mes " ";
mes "Thank You!";
mes "(Now do you have "+SCoin+" Coin(s) )";
close;

kn:
if (SCoin - 7 < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}
SCoin = SCoin - 7;
getitem 1202,1;
mes " ";
mes "Thank You!";
mes "(Now do you have "+SCoin+" Coin(s) )";
close;


}

 

Share this post


Link to post
Share on other sites
  • 0

How do you change the coin to another item?

if i put on another item for trade like and Apple to zeny ot like poring coin

im using this custom item which has and ID 26080

Edited by XtriC

Share this post


Link to post
Share on other sites
  • 0

Try now:

I changed the coin to item ID 26080

NPC Trader:

prontera,136,217,4	script	Coin Trader	4_M_MANAGER,{

.@npc$ = "[Coin Trader]"; //NPC Name

mes .@npc$;
mes "Hello. I'm the Coin Trader";
mes "I can trade Zeny for Coin and vice versa";
mes "(1 Coin = 10.000.000z)";
mes  "What you want trade?";
next;
menu "Zeny for Coins",zc,"Coins for Zeny",cz,"Close",cl;

cl:
close;

zc:
mes .@npc$;
mes "How many Coins do you want purchase?";
mes "(1 Coin = 10.000.000z)";
input @zc;
@qnt = @zc*10000000;

if (Zeny - @qnt < 0){
	
	mes "Do you not have zeny";
	close;
	
}
getitem 26080,@zc;
set Zeny,Zeny - @qnt;

mes " ";
mes "Thank You!";
mes "(Now do you have "+countitem(26080)+" Coin(s) )";
close;

cz:
mes .@npc$;
mes "How many Coins  you want sell?";
mes "Do you have "+countitem(26080)+" Coin(s)";
mes "(1 Coin = 10.000.000z)";
input @cz;
@qnt = @cz*10000000;

if (countitem(26080) - @cz < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}

if (Zeny + @qnt > 2000000000){
	
	
	mes "Do you can't stay more than 2b Zeny";
	close;
	
}
delitem 26080,@zc;
set Zeny,Zeny + @qnt;

mes " ";
mes "Thank You!";
mes "(Now do you have "+countitem(26080)+" Coin(s) )";
close;

}

 

Coin Shop:

prontera,141,217,4	script	Coin Shop	4_F_TELEPORTER,{

mes "[Coin Shop]";
mes "Hello. Why do you want buy with yours Coins?";
mes "(Do you have "+countitem(26080)+" Coin(s) )";

menu "Red Potion (3 Coins)",rp,"Knife[4] (7 Coins)",kn,"Cancell",cl;
cl:
close;

rp:
if (countitem(26080) - 3 < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}
delitem 26080,3;
getitem 501,1;
mes " ";
mes "Thank You!";
mes "(Now do you have "+countitem(26080)+" Coin(s) )";
close;

kn:
if (countitem(26080) - 7 < 0)
{
	mes "Do you not have sufficient Coins";
	close;
}
delitem 26080,7;
getitem 1202,1;
mes " ";
mes "Thank You!";
mes "(Now do you have "+countitem(26080)+" Coin(s) )";
close;


}

 

Edited by luizragna

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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