my script is bug i'm try to upgrade this script to can select many day of VIP
but it not work i'm try check it before keep old value input and cal program help me fix script pls . ty so much
dewata,196,165,5 script CashToVIP 123,{
.@cashperday = 100;
.@timeperday = 1440;
mes "["+ strnpcinfo(1)+"]";
if( #CASHPOINTS < .@cashperday ){
mes "You don't have enough Cash Points to purchase VIP Days";
close;
}
switch(vip_status(1)){
case 0:
mes "You're not a VIP";
break;
case 1:
mes "You are a VIP";
break;
}
mes "You currently have "+ #CASHPOINTS +" Cash Points.";
mes "Each VIP Day will cost you ^0000ff"+ .@cashperday +"^000000";
next;
mes "["+ strnpcinfo(1)+"]";
mes "Would you like to purchase/increase your VIP Days?";
switch(select(" - Nope: - 1 day: - many days")){
case 1:
break;
case 2:
#CASHPOINTS -= .@cashperday;
vip_time 1440;
set .@Timer, vip_status(2);
dispbottom "Current Cash Points: "+ #CASHPOINTS;
dispbottom "Time left : "+ callfunc("Time2Str",.@Timer);
break;
case 3:
set .@inputDay, 0;
input .@inputDay;
if(.@inputDay > 0 && (.@cashperday*.@inputDay) < #CASHPOINTS){
set .@Timer, vip_status(2);
#CASHPOINTS -= .@cashperday*.@inputDay;
vip_time .@timeperday*.@inputDay;
dispbottom "Current Cash Points: "+ #CASHPOINTS;
dispbottom "Time left : "+ callfunc("Time2Str",.@Timer);
}else{
mes "-";
mes "^FF0000You don't have enough Cash Points to purchase VIP Days^FF0000";
close;
}
break;
}
close;
}