Jump to content
  • 0

Checking Bound Item from NPC


Reducto

Question


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

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.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  231
  • Reputation:   9
  • Joined:  12/16/11
  • Last Seen:  

NO, I mean to check the player if he/she is having a bounditem

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  


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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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;
Link to comment
Share on other sites

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.

×
×
  • Create New...