<?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%2Fdrunk</id>
	<title>Manual:DIL Manual/drunk - 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%2Fdrunk"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/drunk&amp;action=history"/>
	<updated>2026-11-22T23:26:02Z</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/drunk&amp;diff=2927&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/drunk&amp;diff=2927&amp;oldid=prev"/>
		<updated>2026-11-14T23:13:12Z</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;= drunk =&lt;br /&gt;
'''Field''' (integer, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.drunk : integer&lt;br /&gt;
&lt;br /&gt;
How drunk the player is: 0 is sober. Drinks and some food with a &amp;lt;code&amp;gt;&amp;quot;drunk&amp;quot;&amp;lt;/code&amp;gt; value raise it, and the &amp;lt;code&amp;gt;stomach@update&amp;lt;/code&amp;gt; program lowers it every mud hour (faster while asleep). update.zon's &amp;lt;code&amp;gt;gain_cond&amp;lt;/code&amp;gt; keeps it between 0 and 24 and tells the player: &amp;quot;getting tipsy&amp;quot; above 3, &amp;quot;very light headed&amp;quot; above 7, &amp;quot;seeing double&amp;quot; above 11.&lt;br /&gt;
&lt;br /&gt;
Drunkenness shows in the game through DIL: &amp;lt;code&amp;gt;score&amp;lt;/code&amp;gt; says &amp;quot;You are drunk!&amp;quot; above 10 (commands.zon), speech is slurred by &amp;lt;code&amp;gt;drunk_speech&amp;lt;/code&amp;gt; in comm.zon, and climbing gets harder by 5 per point (basemove.zon).&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* Players only. On an NPC, an object, a room or null the field fails.&lt;br /&gt;
* A value of 48 or more is never changed by &amp;lt;code&amp;gt;gain_cond&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Stored as an 8-bit signed number: values outside -128 to 127 wrap around.&lt;br /&gt;
* Assigning it directly skips the messages; to make a player drunker with the usual messages, use the drink code's &amp;lt;code&amp;gt;gain_cond&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer climb_diff(pc : unitptr, base : integer);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.drunk &amp;gt; 0)&lt;br /&gt;
   {&lt;br /&gt;
      act(&amp;quot;Climbing under influence isn't easy.&amp;quot;, A_SOMEONE, pc, null, null, TO_CHAR);&lt;br /&gt;
      return (base + 5 * pc.drunk);&lt;br /&gt;
   }&lt;br /&gt;
   return (base);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Makes a climb harder for a drunk player, as &amp;lt;code&amp;gt;climb&amp;lt;/code&amp;gt; does in basemove.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/full|full]]&lt;br /&gt;
* [[Manual:DIL Manual/thirst|thirst]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>