I am just wondering what is wrong with my script below as sometime randomly i get stuck at without a chance of inputting number or when someone just pressed enter and not inputting number. Below is my script.
vip_lounge,157,139,4 script Potion Converter 100,{
mes "Hi! I can convert your potions to your choice.";
mes "Select which item you want to exchange.";
next;
switch(select("Segen White Potion 2x->Segen Blue Potion 1x:Segen Blue Potion 2x->Segen White Potion 1x:Siege White Potion 2x->Siege Blue Potion1x:Siege Blue Potion2x->Siege White Potion1x:Close")) {
mes "How much?";
input .@num;
case 1:
if(countitem(11503) >= .@num) {
delitem 11503, .@num;
getitem 11504, .@num/2;
} else if ((.@weight) > 50){
mes "Hmmmm... it seems you are overweight";
} else if(countitem(11503) < .@num) {
mes "Sorry You don't have the required item!";
}
close;
break;
case 2:
if(countitem(11504) >= .@num) {
delitem 11504, .@num;
getitem 11503, .@num/2;
} else if ((.@weight) > 50){
mes "Hmmmm... it seems you are overweight";
} else if(countitem(11504) < .@num) {
mes "Sorry You don't have the required item!";
}
close;
break;
case 3:
if(countitem(32007) >= .@num) {
delitem 32007, .@num;
getitem 32008, .@num/2;
} else if ((.@weight) > 50){
mes "Hmmmm... it seems you are overweight";
} else if(countitem(32007) < .@num) {
mes "Sorry You don't have the required item!";
}
close;
break;
case 4:
if(countitem(32008) >= .@num) {
delitem 32008, .@num;
getitem 32007, .@num/2;
} else if ((.@weight) > 50){
mes "Hmmmm... it seems you are overweight";
} else if(countitem(32008) < .@num) {
mes "Sorry You don't have the required item!";
}
close;
break;
case 5:
close;
}
OnInit:
waitingroom "Convert pots here",0;
}
Question
erick26
Hi everyone,
I am just wondering what is wrong with my script below as sometime randomly i get stuck at without a chance of inputting number or when someone just pressed enter and not inputting number. Below is my script.
Use a codebox
Link to comment
Share on other sites
2 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.