Jump to content
  • 0

Checking Bound Item from NPC


Question

Posted

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

Posted

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.
Posted


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;

}

Posted

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;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...