<?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%2Fzonereset%28%29</id>
	<title>Manual:DIL Manual/zonereset() - 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%2Fzonereset%28%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/zonereset()&amp;action=history"/>
	<updated>2026-11-22T19:58:04Z</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/zonereset()&amp;diff=2989&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/zonereset()&amp;diff=2989&amp;oldid=prev"/>
		<updated>2026-11-14T23:16:53Z</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;= zonereset() =&lt;br /&gt;
'''Procedure.''' Resets a zone now.&lt;br /&gt;
&lt;br /&gt;
 zonereset(z : zoneptr)&lt;br /&gt;
&lt;br /&gt;
Runs the zone's &amp;lt;code&amp;gt;%reset&amp;lt;/code&amp;gt; section at once, as a timed reset would: what is missing is loaded again, within the limits the reset commands set. It ignores the zone's reset mode (it runs even for &amp;lt;code&amp;gt;RESET_NOT&amp;lt;/code&amp;gt; and with players in a &amp;lt;code&amp;gt;RESET_IFEMPTY&amp;lt;/code&amp;gt; zone) and doesn't change when the next timed reset comes.&lt;br /&gt;
&lt;br /&gt;
It works from any zone and on any zone. Each call is written to the zone log: &amp;quot;DIL '...' programatically resetting zone ...&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| z || zoneptr || The zone, usually from [[Manual:DIL Manual/findzone()|findzone()]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* A zone variable holding null is logged (&amp;quot;tried to call zonereset() with a null pointer&amp;quot;) and nothing happens. But &amp;lt;code&amp;gt;zonereset(findzone(name))&amp;lt;/code&amp;gt; with a name that isn't a zone stops the program with &amp;quot;Type error in zonereset&amp;quot;: put the zone in a variable and test it first.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin cmd_reset(arg : string);&lt;br /&gt;
var&lt;br /&gt;
   z : zoneptr;&lt;br /&gt;
   u : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (arg == &amp;quot;&amp;quot;)&lt;br /&gt;
   {&lt;br /&gt;
      u := self.outside;&lt;br /&gt;
      while (u.type != UNIT_ST_ROOM)&lt;br /&gt;
         u := u.outside;&lt;br /&gt;
      z := findzone(u.zone);&lt;br /&gt;
   }&lt;br /&gt;
   else&lt;br /&gt;
      z := findzone(arg);&lt;br /&gt;
&lt;br /&gt;
   if (z == null)&lt;br /&gt;
   {&lt;br /&gt;
      sendtext(&amp;quot;Could not find a zone named &amp;quot; + arg + &amp;quot;.&amp;lt;br/&amp;gt;&amp;quot;, self);&lt;br /&gt;
      quit;&lt;br /&gt;
   }&lt;br /&gt;
   sendtext(&amp;quot;Resetting zone &amp;quot; + z.name + &amp;quot;.&amp;lt;br/&amp;gt;&amp;quot;, self);&lt;br /&gt;
   zonereset(z);&lt;br /&gt;
   quit;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A god command that resets the zone named, or the zone the god is in, as &amp;lt;code&amp;gt;cmd_reset&amp;lt;/code&amp;gt; in commands.zon does.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/findzone()|findzone()]]&lt;br /&gt;
* [[Manual:DIL Manual/zoneptr|zoneptr]]&lt;br /&gt;
* [[Manual:DIL Manual/resetmode|resetmode]]&lt;br /&gt;
* [[Manual:DIL Manual/resettime|resettime]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>