Jump to content
  • 0
Sign in to follow this  
XtriC

Credit to Zeny changer

Question

10 answers to this question

Recommended Posts

  • 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

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.