If I use
for (.@i=1; .@i< 26; .@i++){ .@menu$ = .@menu$ +""+ (getd("#AlootSet3ID"+.@i) != 0)?"Item ID "+getd("#AlootSet3ID"+.@i)+" - ("+getitemname(getd("#AlootSet3ID"+.@i))+")":"Add Item";}
and
switch(select(.@menu$)){ //Do something here.}
can I change it to be somehting like..
.@menu$ = .@menu$ +""+ (getd("#AlootSet"+.@s+"ID"+.@i) != 0)?"Item ID "+getd("#AlootSet"+.@s+"ID"+.@i)+" - ("+getitemname(getd("#AlootSet"+.@s+"ID"+.@i))+")":"Add Item";
and
switch(select(.@menu$)){
will that let me then later (since there's 6 sets and 25 items per set) do..
mes .NPCName$; mes "Please input the item ID for what you want to autoloot."; mes "Enter 0 if you wish to leave this option blank."; input @input; if (@input == 0) { next; mes .NPCName$; mes "Alright, deleted!"; set #AlootSet.@sID.@i,0; next; goto L_EasyMode; close; } else { if(getiteminfo(@input,0) == -1) { next; mes .NPCName$; mes "Sorry, this is not a valid Item ID"; mes "Please try again."; next; goto L_EasyMode; next; } else { next; mes .NPCName$; mes "Item ID "+@input+" ("+getitemname(@input)+") has been updated on your list."; set #AlootSet+.@s+ID+.@i,@input; next; goto L_EasyMode; }
Something like that, so I can just make one string for all 6 sets and 25 items per set?
Entire Code for this section.
Thank you in advance
Edit:
Or rather...
when the menu for what set they want to edit comes up, put the
for (.@s=1; .@s< 7; .@i++){
like,
mes .NPCName$; mes "Alright, let's edit an existing set!"; mes "What set do you want to edit?"; mes "Empty/Unused Sets are shown with "Nothing" and can't be edited."; if (#LootSet1$ == "") { set @menu$[1], "Nothing"; } else { set @menu$[1], #LootSet1$; } if (#LootSet2$ == "") { set @menu$[2], "Nothing"; } else { set @menu$[2], #LootSet2$; } if (#LootSet3$ == "") { set @menu$[3], "Nothing"; } else { set @menu$[3], #LootSet3$; } if (#LootSet4$ == "") { set @menu$[4], "Nothing"; } else { set @menu$[4], #LootSet4$; } if (#LootSet5$ == "") { set @menu$[5], "Nothing"; } else { set @menu$[5], #LootSet5$; } if (#LootSet6$ == "") { set @menu$[6], "Nothing"; } else { set @menu$[6], #LootSet6$; } next; for (.@s=1; .@s<7; .@s++){ switch(select(@menu$[1],@menu$[2],@menu$[3],@menu$[4],@menu$[5],@menu$[6])) {