getinventorylist;
for(set .@i,0; .@i < @inventorylist_count; set .@i,.@i+1){
set .@itemtype, getiteminfo(@inventorylist_id[.@i], ITEMINFO_SUBTYPE);
set .@itemid, getiteminfo(@inventorylist_id[.@i], ITEMINFO_ID);
if((.@itemtype == CARD_ENCHANT)){
set .@menu$, .@menu$ + "- Enchant " + getitemname(@inventorylist_id[.@i]) + "";
set .@menu$, .@menu$ + ":";
setarray .@rune[.@i], .@itemid;
mes ""+.@i+" - "+.@rune[.@i]+"";
}
}
I got the Menu created right:
But now i need to select the index from menu to create a specific call.
So i setup this:
mes "[Enchant Rune Book]";
mes "I see you possess some of my treasures.";
mes "What do you desire?";
.@eqi = select(.@menu$) -1;
.@runeId = .@rune[.@eqi];
dispbottom ""+ .@eqi +", "+ .@runeId +"";
Once i select the first 3 indexes, i got the right item ID. On the 4th index i got the problem. It's like the index jumped for no reason here, because the 5th index got the 4th ID.
Someone can give me a hint how to make this work? Thank you
Question
Banned
Hello guys,
I've got this piece of code here:
I got the Menu created right:

But now i need to select the index from menu to create a specific call.
So i setup this:
mes "[Enchant Rune Book]"; mes "I see you possess some of my treasures."; mes "What do you desire?"; .@eqi = select(.@menu$) -1; .@runeId = .@rune[.@eqi]; dispbottom ""+ .@eqi +", "+ .@runeId +"";
Once i select the first 3 indexes, i got the right item ID. On the 4th index i got the problem. It's like the index jumped for no reason here, because the 5th index got the 4th ID.
Someone can give me a hint how to make this work? Thank you
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.