waaa123 Posted February 8, 2017 Posted February 8, 2017 (edited) my problem is when they clicked it accidentally and they cancelled it the item will be gone how can i make this item when used and cancel the item still in to inventory ? here is the script function script JobBox { setarray .@Jobs$[0], "Str Set:Vit Set:Int Set:Dex Set"; setarray .@Items[0],30039,30039,30040,30042,30041; set .@menu$,""; for(set .@i,0; .@i<getarraysize(.@Jobs$); set .@i,.@i+1) set .@menu$, .@menu$+.@Jobs$[.@i]; getitem .@Items[select(.@menu$)], 1; close; } item.db 30037,Solo_Freebies,Solo_Freebies,2,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "JobBox",1; },{},{} Edited February 8, 2017 by waaa123 Quote
0 Emistry Posted February 17, 2017 Posted February 17, 2017 change itemtype to 11... and add the delitem script command to remove the item once they get the item using getitem. Quote
0 blurryrox Posted February 8, 2017 Posted February 8, 2017 Maybe you add another manu option for canceling? if they choose cancel, getitem 30037 Quote
Question
waaa123
my problem is when they clicked it accidentally and they cancelled it the item will be gone
how can i make this item when used and cancel the item still in to inventory ?
here is the script
function script JobBox {
setarray .@Jobs$[0], "Str Set:Vit Set:Int Set:Dex Set";
setarray .@Items[0],30039,30039,30040,30042,30041;
set .@menu$,"";
for(set .@i,0; .@i<getarraysize(.@Jobs$); set .@i,.@i+1)
set .@menu$, .@menu$+.@Jobs$[.@i];
getitem .@Items[select(.@menu$)], 1;
close;
}
item.db
30037,Solo_Freebies,Solo_Freebies,2,50,,70,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "JobBox",1; },{},{}
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.