ShiroNaito Posted June 16, 2019 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 65 Reputation: 1 Joined: 04/04/19 Last Seen: May 27, 2021 Share Posted June 16, 2019 Goodevening How to create a multiple input that store 1st input to 4th Example I have Card box where you can select 4 cards of different category This is how it works ~ Guild package CARDS choose your desired weapon card Menu HYDRA and DROPS If you pick Hydra the script will proceed on armor cards Then after armor ,Accessory cards So on so on .. After all of 4 armor weapon accesories and garment card pickings Prompt questions * Please check selected cards Are you sure? You can change it. Theres an option to change selected card If all are set ,getitem armor card,weapon card,acce card and garment card Quote Link to comment Share on other sites More sharing options...
0 KidoSang Posted June 24, 2019 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 24 Reputation: 3 Joined: 04/10/19 Last Seen: September 4, 2019 Share Posted June 24, 2019 (edited) On 6/16/2019 at 10:14 PM, ShiroNaito said: Goodevening How to create a multiple input that store 1st input to 4th Example I have Card box where you can select 4 cards of different category This is how it works ~ Guild package CARDS choose your desired weapon card Menu HYDRA and DROPS If you pick Hydra the script will proceed on armor cards Then after armor ,Accessory cards So on so on .. After all of 4 armor weapon accesories and garment card pickings Prompt questions * Please check selected cards Are you sure? You can change it. Theres an option to change selected card If all are set ,getitem armor card,weapon card,acce card and garment card function script guildbox { setarray .@weaponcard[1],4140,4062; setarray .@garmentcard[1],4402,4359; setarray .@acccard[1],4252,4344; setarray .@armorcard[1],4409,4401; if(#end == 1){ goto cardend; }else{ goto card1; } end; card1: for( .@i = 1; .@i < getarraysize(.@weaponcard); .@i++ ){ .@menu1$ = .@menu1$ + getitemname(.@weaponcard[.@i]) + ":"; } #selectedcard[1] = .@weaponcard[select(.@menu1$)]; if(#end == 1){ goto cardend; } goto card2; end; card2: for( .@i = 1; .@i < getarraysize(.@armorcard); .@i++ ){ .@menu2$ = .@menu2$ + getitemname(.@armorcard[.@i]) + ":"; } #selectedcard[2] = .@armorcard[select(.@menu2$)]; if(#end == 1){ goto cardend; } goto card3; end; card3: for( .@i = 1; .@i < getarraysize(.@acccard); .@i++ ){ .@menu3$ = .@menu3$ + getitemname(.@acccard[.@i]) + ":"; } #selectedcard[3] = .@acccard[select(.@menu3$)]; if(#end == 1){ goto cardend; } goto card4; end; card4: for( .@i = 1; .@i < getarraysize(.@garmentcard); .@i++ ){ .@menu4$ = .@menu4$ + getitemname(.@garmentcard[.@i]) + ":"; } #selectedcard[4] = .@garmentcard[select(.@menu4$)]; goto cardend; end; cardend: #end = 1; .@menu5$ = ""; mes "You had selected the card as below."; mes "Do you wish to change or continue?"; for( .@i = 1; .@i < getarraysize(#selectedcard); .@i++ ){ .@menu5$ = .@menu5$ + "Change " +getitemname(#selectedcard[.@i]) + ":"; } .@menu5$ = .@menu5$ + "Proceed"; .@finalanswer = select(.@menu5$); switch(.@finalanswer){ case 1: goto card1; break; case 2: goto card2; break; case 3: goto card3; break; case 4: goto card4; break; default: for( .@i = 1; .@i <= getarraysize(#selectedcard); .@i++ ){ getitem #selectedcard[.@i],1; } delitem theitemid,1 #end = 0; break; } end; } I think this is what you mentioned. Just call this function when you use the guild package item and change the delitem theitemid,1 to guild package box id. Edited June 24, 2019 by KidoSang Quote Link to comment Share on other sites More sharing options...
0 ShiroNaito Posted June 24, 2019 Group: Members Topic Count: 31 Topics Per Day: 0.01 Content Count: 65 Reputation: 1 Joined: 04/04/19 Last Seen: May 27, 2021 Author Share Posted June 24, 2019 39 minutes ago, KidoSang said: function script guildbox { setarray .@weaponcard[1],4140,4062; setarray .@garmentcard[1],4402,4359; setarray .@acccard[1],4252,4344; setarray .@armorcard[1],4409,4401; if(#end == 1){ goto cardend; }else{ goto card1; } end; card1: for( .@i = 1; .@i < getarraysize(.@weaponcard); .@i++ ){ .@menu1$ = .@menu1$ + getitemname(.@weaponcard[.@i]) + ":"; } #selectedcard[1] = .@weaponcard[select(.@menu1$)]; if(#end == 1){ goto cardend; } goto card2; end; card2: for( .@i = 1; .@i < getarraysize(.@armorcard); .@i++ ){ .@menu2$ = .@menu2$ + getitemname(.@armorcard[.@i]) + ":"; } #selectedcard[2] = .@armorcard[select(.@menu2$)]; if(#end == 1){ goto cardend; } goto card3; end; card3: for( .@i = 1; .@i < getarraysize(.@acccard); .@i++ ){ .@menu3$ = .@menu3$ + getitemname(.@acccard[.@i]) + ":"; } #selectedcard[3] = .@acccard[select(.@menu3$)]; if(#end == 1){ goto cardend; } goto card4; end; card4: for( .@i = 1; .@i < getarraysize(.@garmentcard); .@i++ ){ .@menu4$ = .@menu4$ + getitemname(.@garmentcard[.@i]) + ":"; } #selectedcard[4] = .@garmentcard[select(.@menu4$)]; goto cardend; end; cardend: #end = 1; .@menu5$ = ""; mes "You had selected the card as below."; mes "Do you wish to change or continue?"; for( .@i = 1; .@i < getarraysize(#selectedcard); .@i++ ){ .@menu5$ = .@menu5$ + "Change " +getitemname(#selectedcard[.@i]) + ":"; } .@menu5$ = .@menu5$ + "Proceed"; .@finalanswer = select(.@menu5$); switch(.@finalanswer){ case 1: goto card1; break; case 2: goto card2; break; case 3: goto card3; break; case 4: goto card4; break; default: for( .@i = 1; .@i <= getarraysize(#selectedcard); .@i++ ){ getitem #selectedcard[.@i],1; } delitem theitemid,1 #end = 0; break; } end; } I think this is what you mentioned. Just call this function when you use the guild package item and change the delitem theitemid,1 to guild package box id. Thank you sirrrr!!!! ^_^ Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted August 18, 2019 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: 14 hours ago Share Posted August 18, 2019 you could also try something like this. a more simpler approach. // add more line if needed. // .@item_id[getarraysize(.@item_id)] = func_ItemCategory(<item_id_list>); prontera,155,181,5 script Sample 4_F_KAFRA1,{ function func_ItemCategory { .@getargcount = getargcount(); if (.@getargcount) { for (.@i = 0; .@i < .@getargcount; .@i++) { .@menu$ = .@menu$ + getitemname(getarg(.@i)) + ":"; } .@i = select(.@menu$) - 1; return getarg(.@i, 0); } return; } .@item_id[getarraysize(.@item_id)] = func_ItemCategory(4001, 4002, 4003); // item 1 .@item_id[getarraysize(.@item_id)] = func_ItemCategory(4011, 4012, 4013); // item 2 .@item_id[getarraysize(.@item_id)] = func_ItemCategory(4021, 4012, 4023); // item 3 .@item_id[getarraysize(.@item_id)] = func_ItemCategory(4031, 4022, 4033); // item 4 .@size = getarraysize(.@item_id); mes "Check card list:"; for (.@i = 0; .@i < .@size; .@i++) { if (.@item_id[.@i]) mes "> "+getitemname(.@item_id[.@i]); } if (select("Confirm", "Cancel") == 1) { for (.@i = 0; .@i < .@size; .@i++) { if (.@item_id[.@i]) getitem .@item_id[.@i], 1; } } close; } Quote Link to comment Share on other sites More sharing options...
Question
ShiroNaito
Goodevening
How to create a multiple input that store 1st input to 4th
Example I have Card box where you can select 4 cards of different category
This is how it works
~ Guild package CARDS
choose your desired weapon card
Menu HYDRA and DROPS
If you pick Hydra the script will proceed on armor cards
Then after armor ,Accessory cards
So on so on ..
After all of 4 armor weapon accesories and garment card pickings
Prompt questions * Please check selected cards
Are you sure? You can change it.
Theres an option to change selected card
If all are set ,getitem armor card,weapon card,acce card and garment card
Link to comment
Share on other sites
3 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.