<?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%2Fzone</id>
	<title>Manual:DIL Manual/zone - 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%2Fzone"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/zone&amp;action=history"/>
	<updated>2026-11-22T20:51:57Z</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/zone&amp;diff=2901&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/zone&amp;diff=2901&amp;oldid=prev"/>
		<updated>2026-11-14T23:11:52Z</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;= zone =&lt;br /&gt;
'''Field''' (string, read-only; units: all).&lt;br /&gt;
&lt;br /&gt;
 u.zone : string&lt;br /&gt;
&lt;br /&gt;
The name of the zone the unit is in now: the zone of the room at the top of whatever holds it. A sword carried by a player from Midgaard into the arena gives &amp;quot;arena&amp;quot;. The zone a unit was defined in is [[Manual:DIL Manual/zoneidx|zoneidx]] instead.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Read-only: vmc refuses an assignment (&amp;quot;Illegal lvalue&amp;quot;).&lt;br /&gt;
* For a room it is the room's own zone, unless the room is inside another unit: then it is the zone at the top.&lt;br /&gt;
* [[Manual:DIL Manual/findzone()|findzone()]] turns the name into a zoneptr, e.g. &amp;lt;code&amp;gt;zonereset(findzone(self.zone))&amp;lt;/code&amp;gt; as in function.zon.&lt;br /&gt;
* On null it fails.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin zone_shout(msg : string);&lt;br /&gt;
var&lt;br /&gt;
   pc : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   pc := ghead();&lt;br /&gt;
   while (pc.type == UNIT_ST_PC)&lt;br /&gt;
   {&lt;br /&gt;
      if ((pc.zone == self.zone) and (pc.position &amp;gt; POSITION_SLEEPING))&lt;br /&gt;
         sendtext(msg + &amp;quot;&amp;lt;br/&amp;gt;&amp;quot;, pc);&lt;br /&gt;
      pc := pc.gnext;&lt;br /&gt;
   }&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sends a message to every player awake in the zone the NPC is in, as an NPC's shout in comm.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/zoneidx|zoneidx]]&lt;br /&gt;
* [[Manual:DIL Manual/findzone()|findzone()]]&lt;br /&gt;
* [[Manual:DIL Manual/outside|outside]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>