<?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%2Fvlevel</id>
	<title>Manual:DIL Manual/vlevel - 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%2Fvlevel"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/vlevel&amp;action=history"/>
	<updated>2026-11-22T20:57:25Z</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/vlevel&amp;diff=2949&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/vlevel&amp;diff=2949&amp;oldid=prev"/>
		<updated>2026-11-14T23:14:35Z</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;= vlevel =&lt;br /&gt;
'''Field''' (integer, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.vlevel : integer&lt;br /&gt;
&lt;br /&gt;
The player's virtual level. It goes up by one with every level raised, also past &amp;lt;code&amp;gt;MORTAL_MAX_LEVEL&amp;lt;/code&amp;gt; (50), where [[Manual:DIL Manual/level|level]] stops. The experience needed for the next level, and so [[Manual:DIL Manual/exptol|exptol]], is computed from it.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null it 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; what counts is the zone of the program running on the unit, not that of a function it calls. 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 an unsigned 16-bit number: values outside 0 to 65535 wrap around. Assigning sets the number and nothing else.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer may_enter(pc : unitptr, minlvl : integer, maxlvl : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return (FALSE);&lt;br /&gt;
   return ((pc.vlevel &amp;gt;= minlvl) and (pc.vlevel &amp;lt;= maxlvl));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Checks a player against a level range, as the competitions in competition.zon do.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/level|level]]&lt;br /&gt;
* [[Manual:DIL Manual/exptol|exptol]]&lt;br /&gt;
* [[Manual:DIL Manual/exp|exp]]&lt;br /&gt;
* [[Manual:DIL Manual/reset vlevel()|reset_vlevel()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>