I was checking if there is NPC script that can be used to check a player currently EQUIPPED ITEM if it is bounded or rental.
I found countbound(), However it only checks the inventory. Not the equipped item. May I ask if there is a way to check the EQUIPPED item if bounded or a rental.
setarray .@indices[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW;
for (.@i = 1; .@i<=3; ++.@i) {
if (getequipisequiped(.@indices[.@i])) {
.@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]";
.@equipped = 1;
}
.@menu$ = .@menu$ + ":";
}
if (.@equipped == 0) {
mes "["+ .@npc_name$ +"]";
mes "You need to wear headgears that I can costume...";
close;
}
if (countitem(50026) < 1){
mes "You do not have the Costume Ticket from your inventory.";
close;
}
mes "["+ .@npc_name$ +"]";
mes "Please select what to convert.";
mes "^FF0000 Take note: ^0000FF";
mes "^0B27F3 I cannot convert items that has a refine OR a card inserted. ^0000FF";
next;
.@part = .@indices[ select(.@menu$) ];
if (!getequipisequiped(.@part)) {
mes "["+ .@npc_name$ +"]";
mes "You're not wearing anything there...";
close;
}
set .@equip_id,getequipid(.@Part);
if( countbound() ){
for( set .@i,0; .@i < getarraysize( @bound_items ); set .@i,.@i+1 )
if( @bound_items[.@i] == .@equip_id ){
mes "This is bounded items.";
close;
}
}
Question
darking123
I was checking if there is NPC script that can be used to check a player currently EQUIPPED ITEM if it is bounded or rental.
I found countbound(), However it only checks the inventory. Not the equipped item. May I ask if there is a way to check the EQUIPPED item if bounded or a rental.
setarray .@indices[1], EQI_HEAD_TOP, EQI_HEAD_MID, EQI_HEAD_LOW; for (.@i = 1; .@i<=3; ++.@i) { if (getequipisequiped(.@indices[.@i])) { .@menu$ = .@menu$ + F_getpositionname(.@indices[.@i]) + "-[" + getequipname(.@indices[.@i]) + "]"; .@equipped = 1; } .@menu$ = .@menu$ + ":"; } if (.@equipped == 0) { mes "["+ .@npc_name$ +"]"; mes "You need to wear headgears that I can costume..."; close; } if (countitem(50026) < 1){ mes "You do not have the Costume Ticket from your inventory."; close; } mes "["+ .@npc_name$ +"]"; mes "Please select what to convert."; mes "^FF0000 Take note: ^0000FF"; mes "^0B27F3 I cannot convert items that has a refine OR a card inserted. ^0000FF"; next; .@part = .@indices[ select(.@menu$) ]; if (!getequipisequiped(.@part)) { mes "["+ .@npc_name$ +"]"; mes "You're not wearing anything there..."; close; } set .@equip_id,getequipid(.@Part); if( countbound() ){ for( set .@i,0; .@i < getarraysize( @bound_items ); set .@i,.@i+1 ) if( @bound_items[.@i] == .@equip_id ){ mes "This is bounded items."; close; } }
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.