Jump to content
  • 0
Hatake Kakashi

Coin Exchanger

Question

4 answers to this question

Recommended Posts

try this

prontera,155,181,5 script Sample 718,{
setarray .CoinID,
  677,
  671,
  675,
  674;

setarray .Zeny,
  500000000,
  100000000,
  50000000,
  1000000;
while( 1 ){
mes "What service you want ?";
next;
switch( select("Zeny to Coin:Coin to Zeny") ){
Case 1:
 mes "What Coin you want ?";
 set [email protected]$,"";
 for( set [email protected],0; [email protected] < getarraysize( .CoinID ); set [email protected],[email protected] + 1 ){
  mes "^0000FF"+getitemname( .CoinID[[email protected]] )+" : ^FF0000"+.Zeny[[email protected]]+"^000000 Zeny";
  set [email protected]$,[email protected]$ + getitemname( .CoinID[[email protected]] )+":";
 }
 set [email protected],select( [email protected]$ ) - 1;
 next;
 mes "Selected : ^00FF00"+getitemname( .CoinID[[email protected]] )+"^000000";
 if( Zeny < .Zeny[[email protected]] ){
  mes "It seem like you didnt have Enough Zeny for this.";
  next;
  break;
 }
 mes "You can exchange to ^FF0000"+( Zeny / .Zeny[[email protected]] )+" ^0000FF"+getitemname( .CoinID[[email protected]] )+"^000000 .";
 mes "How many ^0000FF"+getitemname( .CoinID[[email protected]] )+"^000000 do you want ?";
 input @Amount,0,( Zeny / .Zeny[[email protected]] );
 if( [email protected] ) close;
 mes "You gained "[email protected]+" ^0000FF"+getitemname( .CoinID[[email protected]] )+"^000000.";
 set Zeny,Zeny - ( @Amount * .Zeny[[email protected]] );
 getitem .CoinID[[email protected]],@Amount;
 next;
 break;
Case 2:
 mes "Which Coin ?";
 set [email protected]$,"";
 for( set [email protected],0; [email protected] < getarraysize( .CoinID ); set [email protected],[email protected] + 1 ){
  mes "^0000FF"+getitemname( .CoinID[[email protected]] )+" : ^FF0000"+countitem( .CoinID[[email protected]] )+"^000000 Available";
  set [email protected]$,[email protected]$ + getitemname( .CoinID[[email protected]] )+":";
 }
 do{
  set [email protected],select( [email protected]$ ) - 1;
 }while( !countitem( .CoinID[[email protected]] ) );
 next;
 mes "Selected : ^00FF00"+getitemname( .CoinID[[email protected]] )+"^000000";
 mes "You can exchange ^0000FF"+countitem( .CoinID[[email protected]] )+" "+getitemname( .CoinID[[email protected]] )+"^000000 to ^FF0000"+( countitem( .CoinID[[email protected]] ) * .Zeny[[email protected]] )+"^000000 Zeny.";
 mes "How many ^0000FF"+getitemname( .CoinID[[email protected]] )+"^000000 do you want to change into Zeny ?";
 input @Amount,0,( ( 1000000000 - Zeny ) / .Zeny[[email protected]] );
 if( [email protected] ) close;
 mes "You gained "+( @Amount * .Zeny[[email protected]] )+" Zeny.";
 delitem .CoinID[[email protected]],@Amount;
 set Zeny,Zeny + ( @Amount * .Zeny[[email protected]] );
 next;
 break;
 }
}
}

Link to comment
Share on other sites

try this....

prontera,155,181,5 script Sample 718,{
mes "Which you wanna exchange ?";
next;
if( select("Silver Coin to Gold Coin:close") == 2 ) close;
mes "Exchange Rate :";
mes "^FF00001 Silver Coin = 1,000,000 Zeny^000000";
if( !countitem(675) ) close;
mes "You have ^0000FF"+countitem(675)+"^000000 Silver Coin, can exchange for ^0000FF"+( 1000000*countitem(675) )+"^000000 Zeny.";
mes "How many ^0000FFSilver Coin^000000 you want to exchange to Zeny. ??";
input @Amount,0,countitem(675);
next;
mes "Thank you, you have exchanged ^0000FF"+( @Amount )+"^000000 Silver Coin into ^0000FF"+( @Amount * 1000000 )+"^000000 Zeny.";
delitem 675,@Amount;
set Zeny,Zeny + ( 1000000 * countitem(675) );
close;
}

next time, please provide more detail on this....nvr request a script by mention just few lines of words.....

Edited by Emistry
Link to comment
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.   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.



×
×
  • Create New...

Important Information

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