<?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%2Fquests</id>
	<title>Manual:DIL Manual/quests - 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%2Fquests"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/quests&amp;action=history"/>
	<updated>2026-11-22T17:49:58Z</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/quests&amp;diff=2932&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/quests&amp;diff=2932&amp;oldid=prev"/>
		<updated>2026-11-14T23:13:27Z</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;= quests =&lt;br /&gt;
'''Field''' (extraptr, read-only; units: PC).&lt;br /&gt;
&lt;br /&gt;
 pc.quests : extraptr&lt;br /&gt;
&lt;br /&gt;
The player's quest list: a list of extras, like &amp;lt;code&amp;gt;.extra&amp;lt;/code&amp;gt;, saved with the player. Each quest is an extra whose first name is the quest string, e.g. &amp;lt;code&amp;gt;&amp;quot;Guard Quest Ongoing&amp;quot;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;Guard Quest Complete&amp;quot;&amp;lt;/code&amp;gt;, and whose description is the text the &amp;lt;code&amp;gt;quests&amp;lt;/code&amp;gt; command shows next to it. Zones also keep other markers here (Midgaard's police academy, for one).&lt;br /&gt;
&lt;br /&gt;
The field itself can't be assigned (vmc says &amp;quot;Illegal lvalue&amp;quot;), but the list it gives can be changed: pass it to [[Manual:DIL Manual/addextra()|addextra()]] and [[Manual:DIL Manual/subextra()|subextra()]], test it with &amp;lt;code&amp;gt;&amp;quot;name&amp;quot; in pc.quests&amp;lt;/code&amp;gt; and pick an entry with &amp;lt;code&amp;gt;pc.quests.[&amp;quot;name&amp;quot;]&amp;lt;/code&amp;gt;.&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;
* Use quests.zon's functions rather than hand-made extras: &amp;lt;code&amp;gt;qstSetOngoing@quests&amp;lt;/code&amp;gt; adds the &amp;quot;&amp;amp;lt;name&amp;amp;gt; Ongoing&amp;quot; entry and shows the &amp;quot;New Quest&amp;quot; banner, &amp;lt;code&amp;gt;qstOngoing@quests&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;qstComplete@quests&amp;lt;/code&amp;gt; give the entry names, and &amp;lt;code&amp;gt;hasQuest@quests&amp;lt;/code&amp;gt; tests for one. Then the &amp;lt;code&amp;gt;quests&amp;lt;/code&amp;gt; command shows every quest the same way.&lt;br /&gt;
* An &amp;lt;code&amp;gt;extraptr&amp;lt;/code&amp;gt; variable holding one of its entries becomes null at every &amp;lt;code&amp;gt;wait&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;pause&amp;lt;/code&amp;gt;; look the entry up again afterwards.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer quest_state(pc : unitptr, qname : string);&lt;br /&gt;
external&lt;br /&gt;
   string qstOngoing@quests(qname : string);&lt;br /&gt;
   string qstComplete@quests(qname : string);&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   if (qstComplete@quests(qname) in pc.quests)&lt;br /&gt;
      return (2);&lt;br /&gt;
   if (qstOngoing@quests(qname) in pc.quests)&lt;br /&gt;
      return (1);&lt;br /&gt;
   return (0);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Tells whether a player has a quest done (2), under way (1) or not at all (0), using the names from quests.zon.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/info|info]]&lt;br /&gt;
* [[Manual:DIL Manual/extra|extra]]&lt;br /&gt;
* [[Manual:DIL Manual/addextra()|addextra()]]&lt;br /&gt;
* [[Manual:DIL Manual/subextra()|subextra()]]&lt;br /&gt;
* [[Manual:DIL Manual/in|in]]&lt;br /&gt;
* [[Manual:DIL Manual/extraptr|extraptr]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>