is always popping out even if I correctly entered 100k
This was the coin exchanger
negel,222,254,4 script Coin Manager 573,{
// Your Server Max Zeny Amount
set .MaxZeny,2000000000;
// Coins Item ID and each Coins Costs
setarray .Coins[1],673,675,671,677,674;
setarray .Zeny[1],100000,1000000,10000000,100000000,1000000000;
setarray .@numbers$[1],100000,1000000,10000000,100000000,1000000000;
set @Menu$,"";
for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
set @Menu$,@Menu$ + getitemname( .Coins[.@a] )+":";
}
while( 1 ){
mes "[Coin Manager]";
mes "What do you want to do today?";
next;
switch( select( "Coin to Zeny:Zeny to Coin" ) ){
Case 1:
mes "[Coin Manager]";
mes "Very well. Here is the list on how much each coin is worth:";
for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
mes "^0000FF"+getitemname( .Coins[.@a] )+" = ^FF0000"+.@numbers$[.@a]+"^000000 Zeny.";
}
next;
set .@a,select( @Menu$ );
mes "[Coin Manager]";
mes "Select the Amount of Coins you want to trade into Zeny.";
mes "You have "+countitem( .Coins[.@a] )+" "+getitemname( .Coins[.@a] )+".";
input @Amount,0,countitem( .Coins[.@a] );
if( @Amount < 1 ){
mes "[Coin Manager]";
mes "You don't have enough coin to exchange.";
}else if( ( Zeny + ( @Amount * .Zeny[.@a] ) ) > .MaxZeny ){
mes "[Coin Manager]";
mes "Sorry you can't hold this amount of Zeny. Max Zeny is 2b"; close;
}else{
set Zeny,Zeny + ( @Amount * .Zeny[.@a] );
delitem .Coins[.@a],@Amount;
mes "[Coin Manager]";
mes "Done, you have traded "+@Amount+" of "+getitemname(.Coins[.@a])+" into "+( @Amount * .Zeny[.@a] )+" Zeny.";
}
next;
break;
Case 2:
mes "[Coin Manager]";
mes "Very well. Here is the list on how much each coin is worth:";
for( set .@a,1; .@a < getarraysize( .Coins ); set .@a,.@a+1 ){
mes "^0000FF"+getitemname( .Coins[.@a] )+" ^FF0000"+.@numbers$[.@a]+"^000000 Zeny.";
}
next;
set .@a,select( @Menu$ );
mes "[Coin Manager]";
mes "Select the Amount of Zeny you want to trade into "+getitemname( .Coins[.@a] )+".";
mes "You can get maximum of "+Zeny/.Zeny[.@a]+" "+getitemname( .Coins[.@a] )+".";
input @Amount,0,Zeny/.Zeny[.@a];
if( @Amount < 99999 ){
mes "[Coin Manager]";
mes "Invalid Amount."; close;
}
else if( @Amount > readparam (Zeny)) {
mes "[Coin Manager]";
mes "Insufficient Zeny."; close;
}else{
set Zeny,Zeny - ( @Amount * .Zeny[.@a] );
getitem .Coins[.@a],@Amount;
mes "[Coin Manager]";
mes "Done, you have traded "+( @Amount * .Zeny[.@a] )+"z into "+@Amount+" of "+getitemname(.Coins[.@a])+" .";
}
next;
break;
}
}
close;
}
or if you have another coin exchanger working and easy to configure please share it
Question
zmref
This code here
if( @Amount < 99999 ){
mes "[Coin Manager]";
mes "Invalid Amount."; close;
}
is always popping out even if I correctly entered 100k
This was the coin exchanger
or if you have another coin exchanger working and easy to configure please share it
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.