<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fnpccount</id>
	<title>Manual:DIL Manual/npccount - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fnpccount"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/npccount&amp;action=history"/>
	<updated>2026-11-23T22:07:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/npccount&amp;diff=2860&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/npccount&amp;diff=2860&amp;oldid=prev"/>
		<updated>2026-11-14T23:09:13Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= npccount =&lt;br /&gt;
'''Field''' (integer, read-only; on a zoneptr).&lt;br /&gt;
&lt;br /&gt;
 z.npccount : integer&lt;br /&gt;
&lt;br /&gt;
Meant to be the number of NPCs the zone defines, but the server never counts them: it is always 0. To count the copies of one NPC in the game, use [[Manual:DIL Manual/loadcount|loadcount]].&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* It can't be assigned (vmc: &amp;quot;Illegal lvalue&amp;quot;).&lt;br /&gt;
* On a null zoneptr it fails.&lt;br /&gt;
* [[Manual:DIL Manual/roomcount|roomcount]] does count the zone's rooms.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string zone_npcs(z : zoneptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (z == null)&lt;br /&gt;
      return (&amp;quot;&amp;quot;);&lt;br /&gt;
   return (z.name + &amp;quot;: &amp;quot; + itoa(z.npccount) + &amp;quot; NPCs.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells how many NPCs a zone has; it shows 0 until the server counts them.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/roomcount|roomcount]]&lt;br /&gt;
* [[Manual:DIL Manual/objcount|objcount]]&lt;br /&gt;
* [[Manual:DIL Manual/npcs|npcs]]&lt;br /&gt;
* [[Manual:DIL Manual/loadcount|loadcount]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>