<?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%2Flifespan</id>
	<title>Manual:DIL Manual/lifespan - 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%2Flifespan"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/lifespan&amp;action=history"/>
	<updated>2026-11-23T23:09:09Z</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/lifespan&amp;diff=2799&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/lifespan&amp;diff=2799&amp;oldid=prev"/>
		<updated>2026-11-14T22:59:21Z</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;= lifespan =&lt;br /&gt;
'''Field''' (integer, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.lifespan : integer&lt;br /&gt;
&lt;br /&gt;
How old, in mud years, the player can grow. It is set when the character is made, from the race's lifespan in races.def plus a dice roll. youth.zon compares it with the player's age, &amp;lt;code&amp;gt;(realtime - pc.birth) / SECS_PER_MUD_YEAR&amp;lt;/code&amp;gt;.&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;
* Only a program in a zone with access level 0 (the fourth column of &amp;lt;code&amp;gt;vme/etc/zonelist&amp;lt;/code&amp;gt;) can assign it. Elsewhere vmc accepts the assignment, but at run time the program logs &amp;quot;DIL SERIOUS: ... Type error in lvalue assignemt&amp;quot; and stops. Reading works in every zone.&lt;br /&gt;
* Stored as a 16-bit unsigned number: values outside 0 to 65535 wrap around.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer too_old(pc : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   if (pc.level &amp;gt;= IMMORTAL_LEVEL)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   return ((realtime - pc.birth) &amp;gt; (pc.lifespan * SECS_PER_MUD_YEAR));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells whether a mortal player has outlived the lifespan, as in youth.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/birth|birth]]&lt;br /&gt;
* [[Manual:DIL Manual/realtime|realtime]]&lt;br /&gt;
* [[Manual:DIL Manual/access|access]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>