Countitem - HerculesWS/Hercules GitHub Wiki
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).
mes &quot;You have &quot;+countitem(501)+&quot;Apples&#33;&quot;&#59; close&#59;Will print out the number of Apples the char holds...
if(countitem(&quot;Apple&quot;)&gt;&#61;5)&#123; mes &quot;This will only print if you have 5 or more Apples&#33;&quot;&#59; close&#59; &#125;