getinventorylist;
.@i = 0;
while ( .@i < @inventorylist_count ) {
/* Filter only items that is not bound */
if (!@inventorylist_bound[.@i]){
.@itemname$ = callfunc( "getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], @inventorylist_bound[.@i]);
.@menu$ = .@menu$ + @itemname2_info$ + .@itemname$ +":";
}
.@i++;
}
.@s = select(.@menu$) -1;
/* Now display ItemID of selected inventory */
mes "You have selected "+@inventorylist_id[.@s]; // this did not return correct info because it reads [.@s] index from getinventorylist but not the filtered menu.
1. I list all inventory.
2. I remove all bound items
3. i want to get correct index of items selected from the menu. Any suggestion how to handle this?
getinventorylist; .@i = 0; while ( .@i < @inventorylist_count ) { /* Filter only items that is not bound */ if (!@inventorylist_bound[.@i]){ .@itemname$ = callfunc( "getitemname2", @inventorylist_id[.@i], @inventorylist_identify[.@i], @inventorylist_refine[.@i], @inventorylist_attribute[.@i], @inventorylist_card1[.@i], @inventorylist_card2[.@i], @inventorylist_card3[.@i], @inventorylist_card4[.@i], @inventorylist_bound[.@i]); .@menu$ = .@menu$ + @itemname2_info$ + .@itemname$ +":"; } .@i++; } .@s = select(.@menu$) -1; /* Now display ItemID of selected inventory */ mes "You have selected "+@inventorylist_id[.@s]; // this did not return correct info because it reads [.@s] index from getinventorylist but not the filtered menu.
1. I list all inventory.
2. I remove all bound items
3. i want to get correct index of items selected from the menu. Any suggestion how to handle this?
Share this post
Link to post
Share on other sites