Well based on some scripts tha i found on google i made my own coin excanger and goues like this
quiz_02,49,386,4 script Coin Buyer 790,{
set @sPrice,10000;
mes "Hello, i can trade your silver coins for 10k of zeny. Wanna deal?";
next;
menu "Sure, lets get rich",Cfz,"No thanks.",nothx;
Cfz:
if(countitem(675)<1)goto no_item;
input @amount;
delitem 675,1*@amount;
set Zeny,Zeny+(@amount*@sPrice);
close;
no_item:
mes "You dont have enough coins.";
close;
nothx:
mes "You are welcome anyway";
close;
}
everything works fine, or it looks like it, BUT when a player types 100,000 the coiner gives 1B of zeny DDD:!
so may i ask
how to make the max value to input be 10,000 and no more D:?!
thanks in advance
edit:
i tryied with input_max_value: 10000
but it did not work ):
second edit:
i fixed, the script ended like this, i just added the min and max value to the input instead, i got it from scripts_eathena.ttx
quiz_02,49,386,4 script Coin Buyer 790,{
set @sPrice,10000;
mes "Hello, i can trade your silver coins for 10k of zeny. Wanna deal?";
next;
menu "Sure, lets get rich",Cfz,"No thanks.",nothx;
Cfz:
if(countitem(675)<1)goto no_item;
input @amount,0,10000;
delitem 675,1*@amount;
set Zeny,Zeny+(@amount*@sPrice);
close;
no_item:
mes "You dont have enough coins.";
close;
nothx:
mes "You are welcome anyway";
close;
}
Now this is how it will work
iIf player deals:
1 Silver = 10,000z
10 Silver = 100,000z
100 Silver = 1,000,000z
1,000 Silver = 10,000,000z
10,000 Silver = 100,000,000z
>10,000 Will take only 10,000 coins and give the proper amount (100,000,000z) of zeny.
Even no one readed/see this before i fix it, i will say thanks anyways !
Question
Kido
Well based on some scripts tha i found on google i made my own coin excanger and goues like this
everything works fine, or it looks like it, BUT when a player types 100,000 the coiner gives 1B of zeny DDD:!
so may i ask
how to make the max value to input be 10,000 and no more D:?!
thanks in advance
edit:
i tryied with input_max_value: 10000
but it did not work ):
second edit:
i fixed, the script ended like this, i just added the min and max value to the input instead, i got it from scripts_eathena.ttx
Now this is how it will work
iIf player deals:
1 Silver = 10,000z
10 Silver = 100,000z
100 Silver = 1,000,000z
1,000 Silver = 10,000,000z
10,000 Silver = 100,000,000z
>10,000 Will take only 10,000 coins and give the proper amount (100,000,000z) of zeny.
Even no one readed/see this before i fix it, i will say thanks anyways
!
Edited by KidoLink to comment
Share on other sites
4 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.