<?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%2Fcost</id>
	<title>Manual:DIL Manual/cost - 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%2Fcost"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/cost&amp;action=history"/>
	<updated>2026-11-22T22:18:27Z</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/cost&amp;diff=2907&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/cost&amp;diff=2907&amp;oldid=prev"/>
		<updated>2026-11-14T23:12:10Z</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;= cost =&lt;br /&gt;
'''Field''' (integer, read/write; units: objects).&lt;br /&gt;
&lt;br /&gt;
 obj.cost : integer&lt;br /&gt;
&lt;br /&gt;
What the object is worth, in the money's base unit (an iron piece is &amp;lt;code&amp;gt;IRON_MULT&amp;lt;/code&amp;gt;, 10; a gold piece &amp;lt;code&amp;gt;GOLD_MULT&amp;lt;/code&amp;gt;; vme.h). It is the &amp;lt;code&amp;gt;cost&amp;lt;/code&amp;gt; line of the object in the zone file, given there as coins, e.g. &amp;lt;code&amp;gt;cost 2 GOLD_PIECE&amp;lt;/code&amp;gt;. [[Manual:DIL Manual/moneystring()|moneystring()]] turns it into text.&lt;br /&gt;
&lt;br /&gt;
For a pile of coins (&amp;lt;code&amp;gt;ITEM_MONEY&amp;lt;/code&amp;gt;) it is the number of coins in the pile instead: the commands that split and merge money in baseget.zon use it that way.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Objects only. On a character, a room or null it fails.&lt;br /&gt;
* Stored unsigned: don't assign a negative number.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin string price_of(item : unitptr);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (item.type != UNIT_ST_OBJ)&lt;br /&gt;
      return (&amp;quot;&amp;quot;);&lt;br /&gt;
   return (moneystring(item.cost, TRUE));&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The price of an item as text.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/rent|rent]]&lt;br /&gt;
* [[Manual:DIL Manual/moneystring()|moneystring()]]&lt;br /&gt;
* [[Manual:DIL Manual/purse()|purse()]]&lt;br /&gt;
* [[Manual:DIL Manual/transfermoney()|transfermoney()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>