<?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%2Fobjecttype</id>
	<title>Manual:DIL Manual/objecttype - 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%2Fobjecttype"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/objecttype&amp;action=history"/>
	<updated>2026-11-23T16:43:04Z</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/objecttype&amp;diff=2904&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/objecttype&amp;diff=2904&amp;oldid=prev"/>
		<updated>2026-11-14T23:12:01Z</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;= objecttype =&lt;br /&gt;
'''Field''' (integer, read/write; units: objects).&lt;br /&gt;
&lt;br /&gt;
 obj.objecttype : integer&lt;br /&gt;
&lt;br /&gt;
What kind of object it is: one of the &amp;lt;code&amp;gt;ITEM_*&amp;lt;/code&amp;gt; constants in vme.h, such as &amp;lt;code&amp;gt;ITEM_LIGHT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ITEM_WEAPON&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ITEM_CONTAINER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ITEM_DRINKCON&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ITEM_MONEY&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ITEM_TRASH&amp;lt;/code&amp;gt;. It is the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; line of the object in the zone file (usually set by a macro such as &amp;lt;code&amp;gt;LIGHT_DEF&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;CONTAINER_DEF&amp;lt;/code&amp;gt; in wmacros.h). The meaning of the object's [[Manual:DIL Manual/value|value]] array depends on it.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Assigning changes the type; the values stay as they are, so set them to match.&lt;br /&gt;
* Objects only. On a character, a room or null it fails.&lt;br /&gt;
* Stored as 0 to 255.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string obj_kind(u : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (u.type != UNIT_ST_OBJ)&lt;br /&gt;
      return (&amp;quot;not an object&amp;quot;);&lt;br /&gt;
   if (u.objecttype == ITEM_LIGHT)&lt;br /&gt;
      return (&amp;quot;a light source&amp;quot;);&lt;br /&gt;
   else if (u.objecttype == ITEM_DRINKCON)&lt;br /&gt;
      return (&amp;quot;a drink container&amp;quot;);&lt;br /&gt;
   else if (u.objecttype == ITEM_WEAPON)&lt;br /&gt;
      return (&amp;quot;a weapon&amp;quot;);&lt;br /&gt;
   return (&amp;quot;something else&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Names the kind of an object.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/value|value]]&lt;br /&gt;
* [[Manual:DIL Manual/objectflags|objectflags]]&lt;br /&gt;
* [[Manual:DIL Manual/type|type]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>