waaa123 Posted February 8, 2017 Group: Members Topic Count: 20 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 11/09/12 Last Seen: March 30, 2023 Share 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 Link to comment Share on other sites More sharing options...
0 Emistry Posted February 17, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2370 Joined: 10/28/11 Last Seen: Yesterday at 05:27 AM Share 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 Link to comment Share on other sites More sharing options...
0 blurryrox Posted February 8, 2017 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 26 Reputation: 4 Joined: 06/27/12 Last Seen: April 10, 2022 Share Posted February 8, 2017 Maybe you add another manu option for canceling? if they choose cancel, getitem 30037 Quote Link to comment Share on other sites More sharing options...
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; },{},{}
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.