Break Posted September 21, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 158 Reputation: 14 Joined: 07/07/12 Last Seen: 23 hours ago Share Posted September 21, 2019 We need a function so that when using an item, you can select a equip, select an option from the array and specify the occupied slot. Who can help with this? Quote Link to comment Share on other sites More sharing options...
0 Chun3 Posted September 21, 2019 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 67 Reputation: 9 Joined: 08/22/19 Last Seen: February 2, 2020 Share Posted September 21, 2019 Be more specific. Use item X -> open a select equipment window -> slot occupied? then what? Quote Link to comment Share on other sites More sharing options...
0 Break Posted September 21, 2019 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 158 Reputation: 14 Joined: 07/07/12 Last Seen: 23 hours ago Author Share Posted September 21, 2019 If the slot occupied, then you can replace it with another option Need help with this script function function script item_option { disable_items; setarray .@eq[1], EQI_HEAD_TOP,EQI_ARMOR,EQI_HAND_L,EQI_HAND_R,EQI_GARMENT,EQI_SHOES,EQI_ACC_L,EQI_ACC_R,EQI_HEAD_MID,EQI_HEAD_LOW; .@sz = getarraysize(.@eq); // Reduce getarraysize calls [Secret] for(.@i = 1; .@i < .@sz; ++.@i){ if(getequipisequiped(.@eq[.@i])){ .@menu$ = .@menu$ + F_getpositionname(.@eq[.@i]) + " ~ [ " + getequipname(.@eq[.@i]) + " ]"; .@equipped = 1; } .@menu$ = .@menu$ + ":"; } if (.@equipped == 0) { message strcharinfo(0), "I don’t think I can improve the items you have..."; getitem 6027,1; end; } .@part = .@eq[prompt(.@menu$)]; if (!getequipisequiped(.@part)) { message strcharinfo(0), "You canceled the action."; getitem 6027,1; end; } mes "[ Select Item Option ]"," "; mes "Please indicate option number","which you want to apply."; mes "See list in chat :"; dispbottom "-------------------------"; dispbottom "#3 : Str"; dispbottom "#4 : Agi"; dispbottom "#5 : Vit"; dispbottom "#6 : Int"; dispbottom "#7 : Dex"; dispbottom "#8 : Luk"; dispbottom "#9 : MaxHPrate"; dispbottom "#10 : MaxSPrate"; dispbottom "#13 : AtkRate"; dispbottom "#14 : MatkRate"; dispbottom "#25 : Sub Neutral"; dispbottom "#35 : Sub Ele_All"; dispbottom "#94 : SubRace Player"; dispbottom "#185: UnbreakableWeapon"; dispbottom "#186: UnbreakableArmor"; dispbottom "-------------------------"; next; input .@opt; if(.@opt == 0){ message strcharinfo(0), "There is no such option."; getitem 6027,1; end; } mes "[ Select Item Option ]"," "; mes "Selected Option Type : " + .@opt; //mes " "; //mes "Please indicate the value you want to apply."; //next; //input .@val; mes " "; mes "Please indicate the slot where you want to insert the option [1-4]"; next; input .@idx_real; if(.@idx_real == 0){ message strcharinfo(0), "This is not a slot."; getitem 6027,1; end; } set .@idx,.@idx_real-1; if(getequiprandomoption(.@part, .@idx, ROA_ID, getcharid(0))){ if(.@idx > 3) { mes "[ Select Item Option ]"; message strcharinfo(0), "No free slot."; getitem 6027,1; end; } } mes "[ Select Item Option ]"," "; mes "Selected :"; mes "^6A01A1"+.@opt+"^000000 Type"; //mes "^B91E1E"+.@val+"^000000 Value"; mes "^0C9610"+.@idx_real+"^000000 Slot"; close2; setrandomoption(.@part,.@idx,.@opt,1,.@idx,getcharid(0)); end; } Up Quote Link to comment Share on other sites More sharing options...
Question
Break
We need a function so that when using an item, you can select a equip, select an option from the array and specify the occupied slot.
Who can help with this?
Link to comment
Share on other sites
2 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.