Reducto Posted October 21, 2013 Posted October 21, 2013 Hello, is there a way to check if a player is decarding a bounditem? If the player is decarding a bound item. The decarding will not continue. The npc will say sorry I can't decard Bounditems Thank you. Quote
Patskie Posted October 21, 2013 Posted October 21, 2013 This? *getinventorylist; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_id[] - array of item ids. @inventorylist_amount[] - their corresponding item amounts. @inventorylist_equip[] - whether the item is equipped or not. @inventorylist_refine[] - for how much it is refined. @inventorylist_identify[] - whether it is identified. @inventorylist_attribute[] - whether it is broken. @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific craftsman. @inventorylist_expire[] - expire time (Unix time stamp). 0 means never expires. @inventorylist_bound[] - whether it is bound to the character @inventorylist_count - the number of items in these lists. Quote
Reducto Posted October 21, 2013 Author Posted October 21, 2013 NO, I mean to check the player if he/she is having a bounditem Quote
Patskie Posted October 21, 2013 Posted October 21, 2013 prontera,150,150,0 script Sample 100,{ getinventorylist; for ( set .@i, 0; .@i < @inventorylist_count; set .@i, .@i + 1 ) if ( @inventorylist_bound[.@i] ) message strcharinfo(0),"You have bound items in your inventory"; end; } Quote
Euphy Posted October 21, 2013 Posted October 21, 2013 Alternately, see 'countbound': *countbound({<bound type>}) This function will return the number of bounded items in the character's inventory, and sets an array @bound_items[] containing all item IDs of the counted items. If a bound type is specified, only those items will be counted. For a list of bound types see 'getitembound'. Example: mes "You currently have "+countbound()+" bounded items."; next; mes "The list of bounded items include:"; for(set .@i,0; .@i<getarraysize(@bound_items); set .@i,.@i+1) mes getitemname(@bound_items[.@i]); close; Quote
Question
Reducto
Hello,
is there a way to check if a player is decarding a bounditem? If the player is decarding a bound item. The decarding will not continue. The npc will say sorry I can't decard Bounditems
Thank you.
4 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.