Credit to Zeny changer

XtriC

New member
Messages
11
Points
0
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):

 
What "credit" are you trying to exchange?

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

liek a coin to zeny trade

1 Coin = 10m zeny something liek that

 
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

 
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:

Code:
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;


}
 
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

 
Last edited by a moderator:
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:

Code:
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;


}
 
Last edited by a moderator:
Back
Top