Difference between revisions of "Countbound"

From Hercules Wiki
Jump to: navigation, search
(Created page with "== Syntax == * getitembound <item id>,<amount>,<bound type>{,<account ID>}; * getitembound "<item name>",<amount>,<bound type>{,<account ID>}; * getitembound2 <ite...")
 
Line 1: Line 1:
 
== Syntax ==
 
== Syntax ==
* [[getitembound]] <item id>,<amount>,<bound type>{,<account ID>};
 
* [[getitembound]] "<item name>",<amount>,<bound type>{,<account ID>};
 
* [[getitembound2]] <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>;
 
* [[getitembound2]] "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>,<bound type>;
 
 
* [[countbound]] ({<bound type>})
 
* [[countbound]] ({<bound type>})
  
Line 20: Line 16:
 
  mes getitemname(@bound_items[.@i]);
 
  mes getitemname(@bound_items[.@i]);
 
  close;
 
  close;
 +
== See Also ==
 +
* [[getitembound]]
 +
* [[getitembound]]
 +
* [[getitembound2]]
 +
* [[getitembound2]]
  
 
[[Category:Script Command]]
 
[[Category:Script Command]]

Revision as of 04:30, 5 December 2013

Contents

Syntax

  • countbound ({<bound type>})

Description

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

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;

See Also