<?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%2Fprompt</id>
	<title>Manual:DIL Manual/prompt - 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%2Fprompt"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/prompt&amp;action=history"/>
	<updated>2026-11-23T23:02:11Z</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/prompt&amp;diff=2931&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/prompt&amp;diff=2931&amp;oldid=prev"/>
		<updated>2026-11-14T23:13:24Z</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;= prompt =&lt;br /&gt;
'''Field''' (string, read/write; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.prompt : string&lt;br /&gt;
&lt;br /&gt;
The player's prompt template, as set with the &amp;lt;code&amp;gt;prompt&amp;lt;/code&amp;gt; command. It can hold codes such as &amp;lt;code&amp;gt;%hp%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%maxhp%&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%mana%&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;%endurance%&amp;lt;/code&amp;gt;; the default is &amp;lt;code&amp;gt;&amp;quot;%mana%m/%endurance%e/%hp%h&amp;amp;gt; &amp;quot;&amp;lt;/code&amp;gt;. An empty template gives an empty prompt.&lt;br /&gt;
&lt;br /&gt;
The prompt is drawn by &amp;lt;code&amp;gt;send_prompt@update&amp;lt;/code&amp;gt;, a DIL program on the player, which reads the template once when it starts. After changing &amp;lt;code&amp;gt;.prompt&amp;lt;/code&amp;gt;, restart that program, as the &amp;lt;code&amp;gt;prompt&amp;lt;/code&amp;gt; command in commands.zon does.&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;
* Assigning &amp;lt;code&amp;gt;&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; or null clears it.&lt;br /&gt;
* A player with a &amp;lt;code&amp;gt;$noprompt&amp;lt;/code&amp;gt; extra can't change it with the command.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin set_prompt(pc : unitptr, s : string);&lt;br /&gt;
var&lt;br /&gt;
   i : integer;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (pc.type != UNIT_ST_PC)&lt;br /&gt;
      return;&lt;br /&gt;
   pc.prompt := s;&lt;br /&gt;
   i := dildestroy(&amp;quot;send_prompt@update&amp;quot;, pc);&lt;br /&gt;
   dilcopy(&amp;quot;send_prompt@update&amp;quot;, pc);&lt;br /&gt;
   return;&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Changes a player's prompt and restarts the program that draws it, as the &amp;lt;code&amp;gt;prompt&amp;lt;/code&amp;gt; command does in commands.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/dildestroy()|dildestroy()]]&lt;br /&gt;
* [[Manual:DIL Manual/dilcopy()|dilcopy()]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>