Good day! Requesting assistant or sample script please.
Re item option npc found on this link
How can to check the slot to make sure that the options will not be the same check slot 1 if STR , then Slot 2~5 cannot use STR.
Been checking this part
Please help me. thank you!
// Build the menu of current options.
for (.@i = 1; .@i <= MAX_ITEM_OPTIONS; ++.@i) {
// call getequipoption(<equip_index>, <type>, <slot>);
// if the return is <0, it's a script error.
// if the return is 0, the slot is empty.
// if the return is >0, the slot is unavailable.
.@opt = getequipoption(.@equip_index, .@i, IT_OPT_INDEX);
if (.@opt > 0)
.@menu$ += (.@i) + ") " + .options$[.@opt - 1] + ":";
else
.@menu$ += (.@i) + ") ^999999Empty^000000" + ":";
}
// Option Slot is the actual option slot 0-MAX_ITEM_OPTIONS (@see mmo.h)
.@option_slot = select(.@menu$);
// Check for used slot and request user action if found.
if (getequipoption(.@equip_index, .@option_slot, IT_OPT_INDEX) > 0) {
mes(.@name$);
mes("This slot is already used up!");
if (select("^990000Override the slot.^000000", "Choose again.") == 2)
.@used = true;
next();
}
} while (.@used); // loop if the slot is not to be overridden
Good day! Requesting assistant or sample script please.
Re item option npc found on this link
How can to check the slot to make sure that the options will not be the same check slot 1 if STR , then Slot 2~5 cannot use STR.
Been checking this part
Please help me. thank you!
Share this post
Link to post
Share on other sites