<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Countitem</title><link>https://sourceforge.net/p/hercules/wiki/Countitem/</link><description>Recent changes to Countitem</description><atom:link href="https://sourceforge.net/p/hercules/wiki/Countitem/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 20 Feb 2023 05:00:57 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/hercules/wiki/Countitem/feed" rel="self" type="application/rss+xml"/><item><title>Countitem modified by Brynner</title><link>https://sourceforge.net/p/hercules/wiki/Countitem/</link><description>&lt;div class="markdown_content"&gt;&lt;h2 id="syntax"&gt;Syntax&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="" href="../&amp;lt;itemid&amp;gt;"&gt;Countitem&lt;/a&gt;; &lt;/li&gt;
&lt;li&gt;&lt;a href="../" title="Itemname"&gt;Countitem&lt;/a&gt;; &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="description"&gt;Description&lt;/h2&gt;
&lt;p&gt;Countitem will return the number of items of &amp;lt;itemid&amp;gt; the invoking player&lt;br/&gt;
holds in his inventory.&lt;br/&gt;
Like in &lt;span&gt;[Getitem]&lt;/span&gt;, you can also write the name of the item ("Name"-column in&lt;br/&gt;
ItemDB).  &lt;/p&gt;
&lt;h2 id="example"&gt;Example&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mes "You have "+countitem(501)+"Apples!";
close;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Will print out the number of Apples the char holds...&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;countitem&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Apple"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt;gt&lt;/span&gt;&lt;span class="c1"&gt;;=5){&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;mes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"This will only print if you have 5 or more Apples!"&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;close&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;span&gt;[Category:Script_Command]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brynner</dc:creator><pubDate>Mon, 20 Feb 2023 05:00:57 -0000</pubDate><guid>https://sourceforge.net8607bfa605b2a7cbb378c5c29d81ca7f65ed4b34</guid></item></channel></rss>