Jump to content
  • 0

Help on this script about coin exchanger


abdol

Question


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.02
  • Content Count:  43
  • Reputation:   0
  • Joined:  04/06/22
  • Last Seen:  

Hello i just want to change the ammount of coin to be traded 

50 bronze coin = 1m zeny but it doesnt work ?

 

here is my script. hope someone notices it and help me

 

 

prontera,190,161,4    script     Coin to Zeny     109,{

// 50 Bronze Coin = How Many Zeny ?
set .Rates,1000000;
while( 50 ){
switch( select("Coin to Zeny:Zeny to Coin") ){
Case 1:
  if( !countitem(673) ){
   mes "You didnt have enough Bronze coin";
  }else{
   mes "You have "+countitem(673)+" Coins.";
   mes "How many  Coin will be convert to zeny ?";
   input @Amount,50,countitem(673);
   if( !@Amount || (( .Rates * @Amount ) + Zeny ) > 1800000000 ){
    mes "Deal Cancelled. your zeny is full .";
   }else{
    delitem 673,@Amount;
    mes "Converted "+@Amount+" of Coin into Zeny.";
    mes "Gained Total of "+( .Rates * @Amount )+" of Zeny.";
    set Zeny,Zeny + ( .Rates * @Amount );
   }
  }
  next;
  break;
Case 2:
  if( Zeny < .Rates ){
   mes "You don't have enough Zeny.";
  }else{
   mes "You have "+Zeny+" Zeny.";
   mes "How many Coin do you want ?";
   mes "You can get maximum of "+( Zeny / .Rates )+" Bronze Coin.";
   input @Amount,50,( Zeny / .Rates );
   if( !@Amount ){
    mes "Deal Cancelled.";
   }else{
    set Zeny,Zeny - ( @Amount * .Rates );
    mes "Converted "+( @Amount * .Rates )+" Zeny into "+@Amount+"  Coin.";
    getitem 673,@Amount;
   }
  }
  next;
  break;
}
}
close;
}

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  41
  • Reputation:   11
  • Joined:  11/17/20
  • Last Seen:  

prontera,190,161,4    script     Coin to Zeny     109,{

// 50 Bronze Coin = How Many Zeny ?
set .Rates,1000000;
mes "Select what you want";
switch( select("Coin to Zeny:Zeny to Coin") ){
Case 1:
  if( countitem(673) < 50 ){
   mes "You didnt have enough Bronze coin";
   close;
  }else{
   mes "You have "+countitem(673)+" Coins.";
   mes "How many  Coin will be convert to zeny ?";
   mes "You can enter 0 to cancel this deal";
   input .@Amount,50,countitem(673);
   if( !.@Amount || (( .Rates * .@Amount ) + Zeny ) > 1800000000 ){
    mes "Deal Cancelled. your zeny is full .";
	close;
   }else{
    delitem 673,.@Amount;
    mes "Converted "+.@Amount+" of Coin into Zeny.";
    mes "Gained Total of "+( .Rates * .@Amount )+" of Zeny.";
    set Zeny,Zeny + ( .Rates * .@Amount );
   }
  }
  next;
  break;
Case 2:
  if( Zeny < .Rates ){
   mes "You don't have enough Zeny.";
   close;
  }else{
   mes "You have "+Zeny+" Zeny.";
   mes "How many Coin do you want ?";
   mes "You can get maximum of "+( Zeny / .Rates )+" Bronze Coin.";
   mes "You can enter 0 to cancel this deal";
   input .@Amount,1,( Zeny / .Rates );
   if( !.@Amount ){
    mes "Deal Cancelled.";
	close;
   }else{
    set Zeny,Zeny - ( .@Amount * .Rates );
    mes "Converted "+( .@Amount * .Rates )+" Zeny into "+.@Amount+"  Coin.";
    getitem 673,.@Amount;
   }
  }
  next;
  break;
}

close;
end;
}

Please use code box next time. This code is not tested so tell me if you have any errors

Edited by Pride
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...