Today Im just trying to make custom script.. When player input number, he will get the item..
It suppose to work like this :
1 Red Herb
1 Empty Bottle
Will get 1 Red Potion
So.. If they had 20 Red Herb and 19 Empty Bottle, they can input 1-19 for Red Potion.. But my current script only working when they input 1 only.. More than that, it will shows my Error message.. IDK which part I do wrong.. Please help me..
set.@amountBottle,(countitem (713));//Empty Bottleset.@amountHerb,(countitem (507));//Red Herb// Player input
input .@amountPotion;// 1st Error Message if Input is ZERO if(.@amountPotion==0){
mes "ERROR!";
close2;
end;}// 2nd Error if Input is larger than both item requiredif((.@amountPotion)>((.@amountBottle)||(.@amountHerb))){
mes "ERROR! Input bigger than item amount!";
close2;
end;}// Player will get item if no problem but now stuck with 1 potion only, if input 2 or more will shows the 2nd error.
delitem 507,.@amountPotion;
delitem 713,.@amountPotion;
close2;
getitem 503,.@amountPotion;// Yellow Potion
end;
But if I removed the 2nd error line, it work perfectly.. But player able to get free item as server cannot delitem the required item and shows console error.. I tried use && and || but both shows same result.
Question
rakuzas
Hello,
Today Im just trying to make custom script.. When player input number, he will get the item..
It suppose to work like this :
1 Red Herb
1 Empty Bottle
Will get 1 Red Potion
So.. If they had 20 Red Herb and 19 Empty Bottle, they can input 1-19 for Red Potion.. But my current script only working when they input 1 only.. More than that, it will shows my Error message.. IDK which part I do wrong.. Please help me..
But if I removed the 2nd error line, it work perfectly.. But player able to get free item as server cannot delitem the required item and shows console error.. I tried use && and || but both shows same result.
Edited by rakuzasLink 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.