<?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%2Fvalue</id>
	<title>Manual:DIL Manual/value - 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%2Fvalue"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/value&amp;action=history"/>
	<updated>2026-11-22T21:24:42Z</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/value&amp;diff=2905&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/value&amp;diff=2905&amp;oldid=prev"/>
		<updated>2026-11-14T23:12:04Z</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;= value =&lt;br /&gt;
'''Field''' (integer, read/write; units: objects).&lt;br /&gt;
&lt;br /&gt;
 obj.value[i] : integer&lt;br /&gt;
&lt;br /&gt;
The object's five numbers, &amp;lt;code&amp;gt;value[0]&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;value[4]&amp;lt;/code&amp;gt;, set with &amp;lt;code&amp;gt;value[i]&amp;lt;/code&amp;gt; lines in the zone file. What they mean depends on the [[Manual:DIL Manual/objecttype|objecttype]]; the macros in wmacros.h show it. For example:&lt;br /&gt;
* &amp;lt;code&amp;gt;ITEM_LIGHT&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;LIGHT_DEF&amp;lt;/code&amp;gt;): value[0] hours left to burn (&amp;lt;code&amp;gt;INFINITE_BURNTIME&amp;lt;/code&amp;gt;, -1, for ever), value[1] how bright.&lt;br /&gt;
* &amp;lt;code&amp;gt;ITEM_DRINKCON&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;LIQ_DEF&amp;lt;/code&amp;gt;): value[0] how much liquid is in it (the most is the [[Manual:DIL Manual/capacity|capacity]]), value[3] poison.&lt;br /&gt;
* &amp;lt;code&amp;gt;ITEM_FOOD&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;FOOD_DEF&amp;lt;/code&amp;gt;): value[0] how filling, value[3] poison.&lt;br /&gt;
* Potions, scrolls, wands and staffs: value[0] the spell power.&lt;br /&gt;
(The table in the comments of vme.h for &amp;lt;code&amp;gt;ITEM_DRINKCON&amp;lt;/code&amp;gt; is out of date; &amp;lt;code&amp;gt;LIQ_DEF&amp;lt;/code&amp;gt; is what the zones use.)&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Objects only. On a character, a room or null, or with an index outside 0 to 4, it fails.&lt;br /&gt;
* Values are signed 32-bit numbers.&lt;br /&gt;
* Changing the liquid in a drink container doesn't change its weight: use [[Manual:DIL Manual/set weight|set_weight()]] as well.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin refill(lamp : unitptr, hours : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if ((lamp.type != UNIT_ST_OBJ) or (lamp.objecttype != ITEM_LIGHT))&lt;br /&gt;
      return;&lt;br /&gt;
   if (lamp.value[0] == INFINITE_BURNTIME)&lt;br /&gt;
      return;&lt;br /&gt;
   lamp.value[0] := lamp.value[0] + hours;&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Adds hours of fuel to a lamp unless it burns for ever.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/objecttype|objecttype]]&lt;br /&gt;
* [[Manual:DIL Manual/capacity|capacity]]&lt;br /&gt;
* [[Manual:DIL Manual/vals|vals]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>