<?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%2Fposition</id>
	<title>Manual:DIL Manual/position - 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%2Fposition"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/position&amp;action=history"/>
	<updated>2026-11-23T21:41:32Z</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/position&amp;diff=2951&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/position&amp;diff=2951&amp;oldid=prev"/>
		<updated>2026-11-14T23:14:41Z</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;= position =&lt;br /&gt;
'''Field''' (integer, read/write; units: characters; also on a cmdptr).&lt;br /&gt;
&lt;br /&gt;
 ch.position : integer&lt;br /&gt;
 c.position : integer&lt;br /&gt;
&lt;br /&gt;
On a character: the position, a &amp;lt;code&amp;gt;POSITION_&amp;lt;/code&amp;gt; constant from vme.h: &amp;lt;code&amp;gt;POSITION_DEAD&amp;lt;/code&amp;gt; (0), &amp;lt;code&amp;gt;POSITION_MORTALLYW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_INCAP&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_STUNNED&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_SLEEPING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_RESTING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_SITTING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_FIGHTING&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;POSITION_STANDING&amp;lt;/code&amp;gt; (8). Each is more awake than the one before, so &amp;lt;code&amp;gt;ch.position &amp;gt;= POSITION_RESTING&amp;lt;/code&amp;gt; means awake and able to act.&lt;br /&gt;
&lt;br /&gt;
On a &amp;lt;code&amp;gt;cmdptr&amp;lt;/code&amp;gt;: the lowest position in which the command can be used, from &amp;lt;code&amp;gt;vme/etc/commands.def&amp;lt;/code&amp;gt;. The command interpreter compares it with the character's position.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* On an object, a room or null it fails.&lt;br /&gt;
* No access level is needed to assign it. Assigning sets the number and nothing else: it does not start or stop a fight, and nothing checks the value. [[Manual:DIL Manual/position update()|position_update()]] sets it from the hit points: stunned, incapacitated, mortally wounded or dead at 0 hit points or less, and standing again for a character with hit points who was stunned or worse.&lt;br /&gt;
* Assigning it on a cmdptr changes the command for everybody until the next reboot.&lt;br /&gt;
* Stored as an 8-bit number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer may_use(pc : unitptr, cmdname : string);&lt;br /&gt;
var&lt;br /&gt;
   c : cmdptr;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   c := getcmd(cmdname);&lt;br /&gt;
   if (c == null)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   return ((pc.level &amp;gt;= c.level) and (pc.position &amp;gt;= c.position));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells whether a character's level and position allow a command, the two checks the command interpreter makes.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/position update()|position_update()]]&lt;br /&gt;
* [[Manual:DIL Manual/level|level]]&lt;br /&gt;
* [[Manual:DIL Manual/getcmd()|getcmd()]]&lt;br /&gt;
* [[Manual:DIL Manual/defaultpos|defaultpos]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>