<?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%2Fhometown</id>
	<title>Manual:DIL Manual/hometown - 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%2Fhometown"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/hometown&amp;action=history"/>
	<updated>2026-11-24T00:01:55Z</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/hometown&amp;diff=2853&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/hometown&amp;diff=2853&amp;oldid=prev"/>
		<updated>2026-11-14T23:08: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;= hometown =&lt;br /&gt;
'''Field''' (string, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.hometown : string&lt;br /&gt;
&lt;br /&gt;
The symbolic name of the player's home room, such as &amp;lt;code&amp;gt;&amp;quot;temple@udgaard&amp;quot;&amp;lt;/code&amp;gt;. The game puts the player there when entering the game with no saved room to return to, and when a dead player's spirit comes back. If the string doesn't name a room, the server uses its default entry room instead. A new player gets &amp;lt;code&amp;gt;&amp;quot;temple@udgaard&amp;quot;&amp;lt;/code&amp;gt; from basis.zon; clans.zon changes it when a player joins or leaves a clan.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails.&lt;br /&gt;
* Any zone can assign it. Nothing checks the value: assign the name of a room that exists. Assigning &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; or null leaves the player without a hometown, so the default entry room is used.&lt;br /&gt;
* It is saved with the player.&lt;br /&gt;
* To get the room, use &amp;lt;code&amp;gt;findroom(pc.hometown)&amp;lt;/code&amp;gt;; it returns null when there is no such room.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin send_home(pc : unitptr);&lt;br /&gt;
var&lt;br /&gt;
   room : unitptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return;&lt;br /&gt;
   room := findroom(pc.hometown);&lt;br /&gt;
   if (room == null)&lt;br /&gt;
      room := findroom(&amp;quot;temple@udgaard&amp;quot;);&lt;br /&gt;
   if (pc.outside != room)&lt;br /&gt;
      link(pc, room);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Moves a player to the home room, or to the Udgaard temple when the hometown is not a room, as death.zon does with a returning spirit.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/findroom()|findroom()]]&lt;br /&gt;
* [[Manual:DIL Manual/link()|link()]]&lt;br /&gt;
* [[Manual:DIL Manual/lastroom|lastroom]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>