Skip to content
Haru edited this page Oct 19, 2016 · 1 revision

Syntax

Description

Countitem will return the number of items of <itemid></itemid> the invoking player holds in his inventory.
Like in getitem, you can also write the name of the item ("Name"-column in ItemDB).

Example

mes &amp;quot&#59;You have &amp;quot&#59;+countitem(501)+&amp;quot&#59;Apples&amp;&#35;33&#59;&amp;quot&#59;&amp;&#35;59&#59;
close&amp;&#35;59&#59;
Will print out the number of Apples the char holds...
if(countitem(&amp;quot&#59;Apple&amp;quot&#59;)&amp;gt&#59;&amp;&#35;61&#59;5)&amp;&#35;123&#59;
 mes &amp;quot&#59;This will only print if you have 5 or more Apples&amp;&#35;33&#59;&amp;quot&#59;&amp;&#35;59&#59;
 close&amp;&#35;59&#59;
&amp;&#35;125&#59;

Category:Script_Command

Clone this wiki locally