Quest Tracker

A QUEST is, abstractly, a task that may be begun by an ACTOR and, once begun, may either succeed or fail. Generally, there is some sort of reward for completing a quest successfully, and there is occasionally punishment for failing to do so. Often completing one quest will unlock new quests, and quests may be composed of or rely on many different subquests. All of these facts inform the way the Quest Tracker implements QUESTs.

Author: Covenent@M*U*S*H
Category: Other
Features: #lambda, regexp commands.
Compatibility: PennMUSH.

Instructions

Copy and paste the below code into a compatible MUSH or MUX.

MUSHCode for Quest Tracker

@@ Project covenent_quest
@@ Version 14
@@
@@ Description:
@@ A QUEST is, abstractly, a task that may be begun by an ACTOR
@@ and, once begun, may either succeed or fail. Generally,
@@ there is some sort of reward for completing a quest
@@ successfully, and there is occasionally punishment for
@@ failing to do so. Often completing one quest will unlock new
@@ quests, and quests may be composed of or rely on many
@@ different subquests.
@@ All of these facts inform the way the Quest Tracker
@@ implements QUESTs. A quest <quest>, once created (see
@@ +quest/help add), can have various properties set (see
@@ +quest/help describe, flags, lock, subquests) which help set
@@ up its dependencies, success conditions, and accessibility
@@ by users. It may then be associated with an ACTOR (see
@@ +quest/help actors) to task the actor with completing the
@@ quest successfully.
@@ This is just a brief summary of the features Quest
@@ Tracker offers. To see all available help files, use
@@
@@ Version log:
@@ Author: Covenent <Mush>
@@ Date: Thu Mar 24 10:08:26 2011 -0500
@@ v14v
@@
@@ covenent_quest=Fixing propagation bug.
@@
@@ Readme:
@@ A way to allow easy automation of quests. See +quest/help
@@ for more information.
@@ Implementation note: for convenience, it would probably be
@@ best to run: @command/add/noparse +quest . Otherwise, you'll
@@ have to escape its arguments most of the time, or use
@@ ]+quest.
@@
@@ Language: MushCode
@@ Installer file created by RubySVC (Softcode Version Control)
@@
@@
@@
@@ Creating Rooms, Things and Exits.
@@
@@
@set me=SVC`T1f9ed0605355b043ce90:[default(SVC`T1f9ed0605355b043ce90,create(T1f9ed0605355b043ce90))]
@set me=SVC`T1cc58f93565b819fa6cf:[default(SVC`T1cc58f93565b819fa6cf,create(T1cc58f93565b819fa6cf))]
@@
@@
@@ Objects created, now setting attributes, locks, etc.
@@
@@
@@
@@ Filling out Quest Runner
@@
@parent [v(SVC`T1f9ed0605355b043ce90)]=v(SVC`T1cc58f93565b819fa6cf)
@name [v(SVC`T1f9ed0605355b043ce90)]=Quest Runner
@tel [v(SVC`T1f9ed0605355b043ce90)]=v(SVC`T1cc58f93565b819fa6cf)
@set [v(SVC`T1f9ed0605355b043ce90)]=iter(setdiff(lflags([v(SVC`T1f9ed0605355b043ce90)]),MISTRUST NO_COMMAND),!##) [setdiff(MISTRUST NO_COMMAND,lflags([v(SVC`T1f9ed0605355b043ce90)]))]
&DESCRIBE [v(SVC`T1f9ed0605355b043ce90)]=Quest Runner. This should be @parent-ed to the Quest Tracker and given to it. Do not modify directly, see +quest/help for more information.
@set [v(SVC`T1f9ed0605355b043ce90)]/DESCRIBE=no_command visual prefixmatch public nearby
@@
@@ Filling out Quest Tracker
@@
@name [v(SVC`T1cc58f93565b819fa6cf)]=Quest Tracker
@lock/Basic [v(SVC`T1cc58f93565b819fa6cf)]==%!
@tel [v(SVC`T1cc58f93565b819fa6cf)]=v(SVC`owner)
@set [v(SVC`T1cc58f93565b819fa6cf)]=iter(setdiff(lflags([v(SVC`T1cc58f93565b819fa6cf)]),TRUST VISUAL),!##) [setdiff(TRUST VISUAL,lflags([v(SVC`T1cc58f93565b819fa6cf)]))]
&_QHELP`H_SUCCESS [v(SVC`T1cc58f93565b819fa6cf)]=+quest/success <quest>\[=<message>]%r+quest/osuccess <quest>\[=<message>]%r+quest/asuccess <quest>\[=<action list>]%r%r[space(4)]These attributes contain the message shown to someone who successfully completes the quest <quest>, the message shown to others when someone successfully completes the quest, and the actions to be taken by the Quest Tracker when someone successfully completes it, respectively. A quest is defined as being successfully completed when it is stopped and its +quest/lock is a true value.%r%r[space(4)]Requirements: <quest> must be a valid quest. Note that as in +quest/lock, use '\%0' to reference the actor for the quest. Also note that the messages and action are evaluated in the sandboxed Quest Runner Object, whose @parent is the Quest Tracker Object.%r[space(4)]See also: failure, stop, lock, quests
&_QHELP`H_SUBQUESTS [v(SVC`T1cc58f93565b819fa6cf)]=+quest/subquests <quest>\[=<list of subquests>\]%r%r[space(4)]Sets the list of subquests that quest <quest>'s success condition may depend upon to <list of subquests>. This serves two purposes: it determines which quests are listed as subquests under this quest (under certain conditions) in +quest/show, and it helps automatically eliminate DEPENDENT subquests that are not listed in any active quest's subquests list. With no <list of subquests> argument, +quest/subquests <quest> clears <quest>'s subquests. In both cases, the DEPENDENT subquests and superquests of all quest instances associated with the quest <quest> are +quest/checked automatically.%r%r[space(4)]Requirements: The quest must be a valid quest, and each name in the list of subquests must either be (a) a well-formed, valid QID, or (b) the unambiguous name of an existing quest. Note that the list may be seperated by spaces (for QIDs or single-word quests) or pipes (|) if you wish to use multi-word quests. If a quest in the list already exists, it must not be the same as the current quest, and adding it as a subquest must not produce a cycle.%r%r[space(4)]See also: stop, restart, CYCLES, lock, DEPENDENT, check, NAMES
&_QHELP`H_STOP [v(SVC`T1cc58f93565b819fa6cf)]=+quest/stop <quest>=<actor>%r%r[space(4)]Turns the quest instance linking the quest <quest> and <actor> off, and sets its success condition to "success" if the quest <quest>'s lock evaluates to true at the time it is stopped (substituting <actor> for \%0), and "failure" otherwise. Note that the quest instance still exists; it is simply finished. To unlink <quest> from <actor>, use +quest/restart. Once stopped, a quest instance cannot be stopped again until it is restarted. When a quest instance is stopped, +quest/check is automatically run on on its existing DEPENDENT subquest instances and the quest instances it is a subquest of.%r%r[space(4)]Requirements: <quest> must be a valid quest, <actor> must be a valid actor, and the quest instance linking the two must not have been stopped or restarted since its most recent start.%r%rSee also: lock, qfail, qoff, qsucc, start, restart, check
&_QHELP`H_START [v(SVC`T1cc58f93565b819fa6cf)]=+quest/start <quest>=<actor>%r%r[space(4)]Creates the quest instance linking the quest <quest> and the actor <actor>, and turns the quest on. If the quest <quest> is marked DEPENDENT, the attempt to start it will fail unless there is already a quest instance linking a quest with <quest> in its subquests list to <actor>. Once started, a quest instance cannot be started again until it is restarted. When a quest instance is started, it is automatically stopped if its lock success condition is true, and +quest/check is automatically run on its DEPENDENT subquests and the quests it is a subquest of.%r%r[space(4)]Requirements: <quest> must be a valid quest, and <actor> must be a valid actor.%r%rSee also: flags, qready, qon, restart, stop, subquests, check
&_QHELP`H_RESTART [v(SVC`T1cc58f93565b819fa6cf)]=+quest/restart <quest>=<actor>%r%r[space(4)]Restarts the quest <quest> for <actor>, and any subquests that are DEPENDENT and active for <actor> and have no other superquests active.%r%r[space(4)]More technically, this commmand deletes the quest instance linking the quest <quest> and the actor <actor>. Any other quests that are affected by this (e.g. DEPENDENT quests that are not in any active subquests list for a quest associated with <actor> except for <quest>'s) will be recursively restarted as well. Restart is automatically run on any quest instance if, for any reason, it is no longer active; usually this is the result of a quest becoming DEPENDENT or a DEPENDENT quest being removed from a subquests list to which it once belonged. When restart is run on a quest instance, +quest/check is automatically run on its DEPENDENT subquests and the quests it is a subquest of.%r%r[space(4)]Requirements: <quest> must be a valid quest, <actor> must be a valid actor, and the quest instance linking the two must not have been restarted since its most recent start.%r%rSee also: flags, qready, start, stop, subquests, check
&_QHELP`H_QUESTS [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]A QUEST is, abstractly, a task that may be begun by an ACTOR and, once begun, may either succeed or fail. Generally, there is some sort of reward for completing a quest successfully, and there is occasionally punishment for failing to do so. Often completing one quest will unlock new quests, and quests may be composed of or rely on many different subquests.%r%r[space(4)]All of these facts inform the way the Quest Tracker implements QUESTs. A quest <quest>, once created (see +quest/help add), can have various properties set (see +quest/help describe, flags, lock, subquests) which help set up its dependencies, success conditions, and accessibility by users. It may then be associated with an ACTOR (see +quest/help actors) to task the actor with completing the quest successfully.%r%r[space(4)]This is just a brief summary of the features Quest Tracker offers. To see all available help files, use [ansi(h,+quest/help entries)]. If you can't find what you're looking for in the help files, try @mail-ing Covenent.%r%r[space(4)]See also: NAMES, add, start, subquests, flags, lock, commands, entries
&_QHELP`H_QSUCC [v(SVC`T1cc58f93565b819fa6cf)]=ufun\(qsucc, <quest>, <actor>)%rufun\(qfail, <quest>, <actor>)%r%r[space(4)]If the quest instance linking <quest> and <actor> does not exist, or the quest instance is not stopped, or the quest instance was stopped when its lock evaluated to false, qsucc returns 0 and qfail returns 1. Otherwise (if the quest instance stopped when its lock evaluated to true), qsucc returns 1 and qfail returns 0. These functions can be useful as part of a +quest/lock.%r%r[space(4)]Requirements: <quest> must be a valid quest, and <actor> must be a valid actor name.%r%rSee also: lock, qoff, stop
&_QHELP`H_QON [v(SVC`T1cc58f93565b819fa6cf)]=ufun\(qready, <quest>, <actor>)%rufun\(qon, <quest>, <actor>)%rufun(qoff, <quest>, <actor>)%r%r[space(4)]If the quest instance linking <quest> and <actor> does not exist, qready returns 1. If the quest instance is stopped, qoff returns 1. Otherwise (if the quest instance has been started but not stopped) qon returns 1. These three conditions are mutually exclusive. They can be used to determine whether someone is ready to start a quest, currently on a quest, or has already ended a quest.%r%r[space(4)]Requirements: <quest> must be a valid quest, and <actor> must be a valid actor name.%r%rSee also: lock, qfail, qsucc, restart, start, stop
&_QHELP`H_NAMES [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]The naming conventions of the Quest Tracker commands and functions are as follows:%r%r[space(4)]Quests (represented by <quest>) are either QIDs of the form "#Q<POSITIVE INTEGER>", without the literal < or >, or quest names, which have the same requirements as object names and additionally cannot use |, #, *, ?, /, :, ;, or `. Except when defining a quest name (for obvious reasons), quest names may be abbreviated to the shortest possible substring of the full intended name that is unambiguous. If there are multiple quests with the same name as a quest name, you will have to use a QID to refer to it. Note that QIDs are slightly more efficient so if that is a priority you should probably use them in your functions and commands wherever possible.%r%r[space(4)ACTORs are always in the form of standard DBREFs and may not be abbreviated.%r%r[space(4)]U-function names are full and cannot be abbreviated. You may need to make them more specific to reference the Quest Tracker depending on your implementation.%r%r[space(4)]For command names (of the form +quest/command) they may be abbreviated to +quest/<abbrev>, where <abbrev> is the shortest unambiguous substring that defines command from its beginning.%r%r[space(4)]Help entries (+quest/help <entry>) may include wildcards and may be abbreviated.%r%r[space(4)]See also: name, add, delete, subquests
&_QHELP`H_NAME [v(SVC`T1cc58f93565b819fa6cf)]=+quest/name <quest>\=<name>%r%r[space(4)]Sets the name for quest <quest> to <expr>. This can be useful if you have several quests with the same or similar names and wish to disambiguate them.%r%r[space(4)]Requirements: <quest> must be a valid existing quest, and <name> must be a well-formed quest name.%r%r[space(4)]See also: NAMES, add, delete, desc, subquests
&_QHELP`H_LOCK2 [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]Without an <expr> argument, +quest/lock <quest> clears <quest>'s success condition. When the success condition is cleared, the lock's success condition defaults to being true for an actor if and only if it is linked to that actor and all of its subquests have ended successfully for that actor.%r%r[space(4)]If neither the lock nor the quest's subquests are set (not the same as being set to the empty list), this defaults to being true if and only if the quest <quest> is stopped. This allows you to use the quest as a status variable (ready, started, finished) attached to a particular actor without doing anything special to make it work.%r%r[space(4)]Requirements: The quest must be a valid quest.%r%r[space(4)]See also: QSUCC(), ACTORS, QUESTS, QOFF(), subquests, check
&_QHELP`H_LOCK [v(SVC`T1cc58f93565b819fa6cf)]=+quest/lock <quest>\[=<expr>\]%r%r[space(4)]Sets the success condition for quest <quest> to <expr>. This is the conditional expression that is evaluated in the various functions that check whether a quest was successful. In order to use the name of the actor who instantiated the quest, use \%0. The lock is evaluated in the sandboxed Quest Runner Object, whose @parent is the Quest Tracker Object. When the lock is changed, for all actors associated with the quest <quest>, +quest/check is automatically run on the instances linking them to the DEPENDENT subquests of <quest> and the quests for which <quest> is a subquest.%r%r[space(4)]When a quest <quest> is stopped on an actor, the lock is checked once to set its initial success / failure, then checked again in case part of <expr> was looking at whether <quest> was stopped. As a result of this, it is in theory possible to do weird things like have a quest succeed if it is stopped unsuccessfully, but given the existence of +quest/asuccess and +quest/afailure there is no real reason to do it, and is generally advised to restrict one's exploitation of this behavior to simply not having a quest auto-stop when it is successful.%r%r[space(4)]Continued in '+quest/help lock2'.
&_QHELP`H_LIST [v(SVC`T1cc58f93565b819fa6cf)]=+quest/list \[<actor>\]%r%r[space(4)]With no arguments or with an argument that is not a valid actor (see: +quest/help ACTORS), displays a list of all defined quests in the quest tracker. When given a valid actor <actor>, displays a list of all quests defined in the quest tracker for <actor> that have not restarted since their last start. This variant also displays the status of the quest for <actor> (Started, Succeeded, or Failed) along with the time of its most recent start and the duration of the quest until it stopped (or, if it has not stopped, until the current time).%r%r[space(4)]Requirements: For the second variant, <actor> must be a valid actor.
&_QHELP`H_INFO [v(SVC`T1cc58f93565b819fa6cf)]=+quest/info <quest>%r%r[space(4)]Displays information about quest <quest> in tabular form. The information includes the quest's name, description, subquests, lock, flags, and other attributes. It does not give you information about a quest's actors, however.%r%r[space(4)]Requirements: <quest> must be a valid quest.
&_QHELP`H_HELP [v(SVC`T1cc58f93565b819fa6cf)]=This is the index to the Quest Tracker online help files.%r%rPlease try one of the following help topics:%r%r[align(>13 <60,commands%rentries%rfunctions%rquests%rnames,A list of all commands%rA list of all help entries%rA list of all functions%rAn overview of quests%rQuest Tracker naming conventions,,%b-%b)]
&_QHELP`H_FUNCTIONS [v(SVC`T1cc58f93565b819fa6cf)]=Help is available on the following Quest Tracker functions:%r%r[table(qfail qoff qon qready qsucc,12,75)]
&_QHELP`H_FLAGS [v(SVC`T1cc58f93565b819fa6cf)]=+quest/flags <quest>=\[!\]<flag1> \[\[<!>\]flag2 ...\]%r%r[space(4)]Sets and unsets flags on the quest. These flags modify the operation of various +quest functions and commands. The following flags are used:%r%r[align(>12 -3 <60,DARK%rDEPENDENT,d%re,Quest description does not show when +quest/show is run.%rSee +quest/help subquests.)]%r%r[space(4)]Requirements: The quest must be a valid quest, and each flag that is set/unset in the list of flags must be a valid flag name.
&_QHELP`H_FAILURE [v(SVC`T1cc58f93565b819fa6cf)]=+quest/failure <quest>\[=<message>]%r+quest/ofailure <queset>\[=<message>]%r+quest/afailure <quest>\[=<action list>]%r%r[space(4)]These attributes contain the message shown to someone who fails the quest <quest>, the message shown to others when someone fails the quest, and the actions to be taken by the Quest Tracker when someone fails it, respectively. A quest is defined as being failed when it is stopped and its +quest/lock is a false boolean value.%r%r[space(4)]Requirements: <quest> must be a valid quest. Note that as in +quest/lock, use '\%0' to reference the actor for the quest. Also, note that all of these attributes are evaluated in the sandboxed Quest Runner Object, whose @parent is the Quest Tracker Object%r%r[space(4)]See also: success, stop, lock, quests
@set [v(SVC`T1cc58f93565b819fa6cf)]=_QHELP`H_ENTRIES:+quest help entries:\%r\%r\[table\(sort\(regeditalli\(graball\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`entries\)\,& ?*\,\%r\)\,\(\^|\%r\)&\%b\(.*\)\,\$1\$2\)\,i\,\%r\)\,12\,75\,\%r\,\%b\)\]
&_QHELP`H_DESCRIBE [v(SVC`T1cc58f93565b819fa6cf)]=+quest/describe <quest>\[=<desc>\]%r%r[space(4)]Sets the description of the quest <quest> to <desc>. This is the string that is used in +QUEST/SHOW wherever the quest is listed. In order to use the name of the actor who instantiated the quest (if you want to use MUSHcode in your description), use \%0. Without a <desc> argument, +quest/describe <quest> clears <quest>'s description. The quest description is also used instead of its name and/or QID wherever possible (e.g. for default failure and success messages). Note that the description is evaluated in the sandboxed Quest Runner Object, whose @parent is the Quest Tracker Object.%r%r[space(4)]Requirements: <quest> must be a valid quest.%r%r[space(4)]See also: info, list, flags, stop
&_QHELP`H_DELETE [v(SVC`T1cc58f93565b819fa6cf)]=+quest/delete <quest>%r%r[space(4)]Deletes quest <quest> from the quest tracker, and destroys all instances of that quest. The quest must already be added to the quest tracker.%r%r[space(4)]See also: add, subquests, lock, stop, QSUCC()
&_QHELP`H_CYCLES2 [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]Most (if not all) of the time, it shouldn't be necessary to create cycles. Remember that subquests are there to provide hints to the Quest Tracker that when one of a quest's subquests is stopped, started, or restarted, it should probably check the quest to see if its +quest/lock is true, at which point it will stop automatically. They are NOT quests that must be completed before you can START a quest (DEPENDENT quests depend upon the quests they are subquests of to begin, not the other way around, and are automatically checked when their parents stop/stop/restart anyway). Thinking about subquests in this way can help you eliminate the majority of occasions upon which you would want to use a cycle.%r%r[space(4)]See also: subquests, lock, DEPENDENT, restart, stop
&_QHELP`H_CYCLES [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]A CYCLE is introduced when a quest (directly or indirectly) depends on itself. To give a simple example, supposed you have a quest, "Kick Walker," that has a second quest, "Be Kicked By Walker," as a subquest. Now imagine that you made "Kick Walker" a subquest of "Be Kicked By Walker." You now have a cycle--quests which (directly or indirectly) have themselves as subquests.%r%r[space(4)]Cycles are problematic for several reasons. They make it difficult to efficiently keep track of which quests should restart when a parent quest is restarted, and they make it hard for the Quest Tracker to determine the correct order in which to display quests for the users. For these reasons, users are specifically disallowed from creating cycles, at least for now.%r%r[space(4)]Continued in '+quest/help cycles2'.
@set [v(SVC`T1cc58f93565b819fa6cf)]=_QHELP`H_COMMANDS:Help is available on the following Quest Tracker commands:\%r\%r\[table\(regeditalli\(lattr\([v(SVC`T1cc58f93565b819fa6cf)]/cmd`c_?*\)\,cmd`c_\(\\\\w+\)\,lcstr\(\$1\)\)\,12\,75\)\]
&_QHELP`H_CHECK [v(SVC`T1cc58f93565b819fa6cf)]=+quest/check <quest>=<actor>%r%r[space(4)]Checks the +quest/lock for the quest instance with quest <quest> and actor <actor>. If it is true, then the quest is automatically stopped and its dependencies are +quest/checked as well. If not, only its dependencies are checked. Dependencies are defined as all the DEPENDENT subquests of <quest> that are linked to <actor>, and all of the quests linked to <actor> that include <quest> as a subquest. This command is a catchall that you should use if a lock on one of your quest's +quest/lock depends on something other than the status of quests tracked by the Quest Tracker, or depends on the status of quests associated with actors other than the one the quest instance is linked to.%r%r[space(4)]Requirements: <quest> must be a valid quest, and <actor> must be a valid actor name. <actor> need not necessarily be linked to the quest instance.%r%r[space(4)]See also: start, stop, restart, lock, subquests, functions
&_QHELP`H_ADD [v(SVC`T1cc58f93565b819fa6cf)]=+quest/add <name>%r%r[space(4)]Adds quest with name <name> to the quest tracker, as long as <name> is a valid quest name (fulfills all of the requirements of a valid attribute name, and has no `, :, /, *, ?, #, |, or ; character in it). For convenience and future compatibility, it is recommended that you use only alphanumeric symbols, spaces, and _ in your quest names.%r%r[space(4)]When the quest is created, it will report back to you with a unique QID (not to be confused with a DBREF, as it has the form "#Q<ID>"). This QID may be used to unambiguously reference the quest for the duration of its existence (i.e. until it is +quest/delete-ed). In general, for user-accessible Quest Tracker commands and functions, one may always refer to a quest either by its name (which may be ambiguous) or its QID (which is not).%r%r[space(4)]See also: delete, QUESTS, info, start, ACTORS
&_QHELP`H_ACTORS [v(SVC`T1cc58f93565b819fa6cf)]=[space(4)]An ACTOR is an object that can go on a quest. Generally, these ACTORs are players, but the quest tracker will accept any potentially valid dbref as an actor--even ones that do not exist or that you do not own. When quests are started, stopped, or restarted on an ACTOR, they modify a quest instance--a combination of a quest and an actor.%r%r[space(4)]User-defined messages and commands (e.g. +quest/describe, +quest/success) typically receive the name of the actor as '\%0'. Keep in mind that it is usually represented as a dbref, not a name. You should use \[name\(\%0\)\] instead of \%n, etc.
@set [v(SVC`T1cc58f93565b819fa6cf)]=_QHELP`GENERATOR:\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/qhelp_tbl\,AUTOMATICALLY GENERATED HELP TABLE. %bDO NOT EDIT.\[\%r\]\[\%r\]\[regeditalli\(\%0\,& \(.*?\)\(\(\%r\)\%r|\$\)\,& \$1\%r\\\[u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`h_\$1\)\\\]\$3\)\]\)\] \[set\([v(SVC`T1cc58f93565b819fa6cf)]/qhelp_tbl\,i \$ B V\)\]
@set [v(SVC`T1cc58f93565b819fa6cf)]=_QHELP`ENTRIES:& \\\%0\%r& ACTORS\%r\%r& valid\%r& add\%r\%r& commands\%r\%r& check\%r\%r& CYCLES\%r\%r& CYCLES2\%r\%r& delete\%r\%r& describe\%r\%r& entries\%r\%r& functions\%r\%r& DARK\%r& DEPENDENT\%r& flags\%r\%r& \%r& help\%r\%r& info\%r\%r& list\%r\%r& lock\%r\%r& lock2\%r\%r& name\%r\%r& NAMES\%r\%r& QFAIL\(\)\%r& QSUCC\(\)\%r\\\[u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`h_qsucc\)\\\]\%r& QREADY\(\)\%r& QOFF\(\)\%r& QON\(\)\%r\\\[u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`h_qon\)\\\]\%r& +quest\%r& QUESTS\%r\%r& restart\%r\%r& start\%r\%r& stop\%r\%r& subquests\%r\%r& asuccess\%r& osuccess\%r& success\%r\%r& afailure\%r& ofailure\%r& failure
&_QHELP [v(SVC`T1cc58f93565b819fa6cf)]=Quest tracker help files. If you do not wish to modify the help files yourself or examine how they were created, do not modify this attribute tree.
&_Q [v(SVC`T1cc58f93565b819fa6cf)]=Quest Tracker internal structure. Do not modify directly, use the +quest/* commands instead. See +quest/help for more information.
&_IQWRAP [v(SVC`T1cc58f93565b819fa6cf)]=letq(0,if(u(qid_valid,%1),%1,ulocal(qname_to_id,%1)),u(%0,%q0,%2))
&_IQSUCC [v(SVC`T1cc58f93565b819fa6cf)]=cand(u(qstarted,%0,%1),v(_q`%0`_i`%1`res))
@set [v(SVC`T1cc58f93565b819fa6cf)]=_IQSAFE:\[u\(_iqmakesafe\,\%0\)\]\[s\(ulocal\\\(\[iter\(lnum\(0\,dec\(\%+\)\)\,if\(eq\(\%i0\,0\)\,[v(SVC`T1f9ed0605355b043ce90)]/va\,v\(\%i0\)\)\,\,\\\,\)\]\\\)\)\]
&_IQREADY [v(SVC`T1cc58f93565b819fa6cf)]=not(u(qstarted,%0,%1))
&_IQON [v(SVC`T1cc58f93565b819fa6cf)]=cand(u(qstarted,%0,%1),not(u(qstopped,%0,%1)))
&_IQOFF [v(SVC`T1cc58f93565b819fa6cf)]=cand(u(qstarted,%0,%1),u(qstopped,%0,%1))
@set [v(SVC`T1cc58f93565b819fa6cf)]=_IQMAKESAFE:\[null\(parent\([v(SVC`T1f9ed0605355b043ce90)]\,[v(SVC`T1cc58f93565b819fa6cf)]\)\)\]\[attrib_set\([v(SVC`T1f9ed0605355b043ce90)]/va\,v\(\%0\)\)\]
&_IQFAIL [v(SVC`T1cc58f93565b819fa6cf)]=cand(u(qstarted,%0,%1),u(qstopped,%0,%1),not(v(_q`%0`_i`%1`res)))
&UNUSED_QID [v(SVC`T1cc58f93565b819fa6cf)]=#Q[iter(lnum(inc(words(u(allquests)))),if(not(u(is_qid,#q%i0)),%i0[ibreak()]),,)]
&SVC`ONUPDATE [v(SVC`T1cc58f93565b819fa6cf)]=@dolist [regeditalli(lattr(%0/_q`*),_q`,)]=@include %1/reset_lock=%i0
&SVC`IGNORE [v(SVC`T1cc58f93565b819fa6cf)]=qhelp_tbl _q`** va cmd`?_show
&SVC [v(SVC`T1cc58f93565b819fa6cf)]=
@set [v(SVC`T1cc58f93565b819fa6cf)]=STARTUP:@drain [v(SVC`T1cc58f93565b819fa6cf)]\; think u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`generator\,u\([v(SVC`T1cc58f93565b819fa6cf)]/_qhelp`entries\)\)\; @notify [v(SVC`T1cc58f93565b819fa6cf)]
@set [v(SVC`T1cc58f93565b819fa6cf)]=SET_QATTR:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,\%1\,\%qa\,a\;@select/inplace \[setq\(0\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`\%1\)\)\]\%qc==*\, \{@@ Set\; @select/inplace eq\(words\(\%2\)\,0\)=0\,\{@va [v(SVC`T1cc58f93565b819fa6cf)]=\%2\; @include [v(SVC`T1cc58f93565b819fa6cf)]/va\}\; &_q`\%qa`\%1 [v(SVC`T1cc58f93565b819fa6cf)]=\%qb\; @include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Set.\}\,\{@@ Clear\; @assert hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`\%1\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,No such attribute to reset.\; @select/inplace eq\(words\(\%2\)\,0\)=0\,\{@va [v(SVC`T1cc58f93565b819fa6cf)]=\%3\; @include [v(SVC`T1cc58f93565b819fa6cf)]/va\}\; &_q`\%qa`\%1 [v(SVC`T1cc58f93565b819fa6cf)]\; @include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Cleared.\}\;
&SET_FLAG [v(SVC`T1cc58f93565b819fa6cf)]=switch(%1,!*,setq(0,u(match_flag,delete(%1,0,1)))[setq(1,u(name_flag,%q0))][if(%q0,if(band(%q0,%0),u(qmsg,%q2,%q1 reset.),u(qmsg,%q2,%q1 (already) reset.)))][bnand(%0,%q0)],setq(0,u(match_flag,%1))[setq(1,u(name_flag,%q0))][if(%q0,if(band(%q0,%0),u(qmsg,%q2,%q1 (already) set.),u(qmsg,%q2,%q1 set.)))][bor(%0,%q0)])
@set [v(SVC`T1cc58f93565b819fa6cf)]=RESET_LOCK:think attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`ilock\,default\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`lock\,if\(hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`subquests\)\,switch\(words\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`subquests\)\)\,0\,1\,1\,\\u\\\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsucc\\\,\[first\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`subquests\)\)\]\\\,\\\%0\\\)\,\\cand\\\(\[map\(#lambda/strcat\(u\,\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsucc\,\\\%0\,\\\\\\\%0\)\)\,\[get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`subquests\)\]\,\%b\,\\\,\)\]\\\)\)\,u\\\([v(SVC`T1cc58f93565b819fa6cf)]/qstopped\\\,\%0\\\,\\\%0\\\)\)\)\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=RAWQINSTS:regeditalli\(lattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`_i`\)\,_q`\%0`_i`\,\)
&QUEST_DEPENDENT [v(SVC`T1cc58f93565b819fa6cf)]=1
&QUEST_DARK [v(SVC`T1cc58f93565b819fa6cf)]=2
@set [v(SVC`T1cc58f93565b819fa6cf)]=QSUCC:u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqwrap\,_iqsucc\,\%0\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QSTOPPED:hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`_i`\%1`res\)
&QSTARTED [v(SVC`T1cc58f93565b819fa6cf)]=letq(gt(v(_q`%0`_i`%1`refcnt),0))
@set [v(SVC`T1cc58f93565b819fa6cf)]=QRESTARTIH:if\(\%0\,\[setq\(0\,first\(\%0\)\,1\,rest\(\%0\)\)\] \[wipe\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%q0`_i`\%1\)\] \[iter\(u\(iquests\,\%1\,v\(_q`\%q0`subquests\)\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`_i`\%1`refcnt\,dec\(v\(_q`\%i0`_i`\%1`refcnt\)\)\)\] \[if\(u\(_iqready\,\%i0\,\%1\)\,setq\(1\,setunion\(\%q1\,\%i0\)\)\)\]\)\] \[@@\(Restart\)\] \[u\(qmsg\,\%q2\,Quest '\[u\(qfullname\,\%q0\)\]' restarted for actor '\%1'.\)\]\%q1\,\)
&QRESTARTI [v(SVC`T1cc58f93565b819fa6cf)]=fold(#lambda/u(qrestartih,\%0,%1),@@(Dummy arguments to fill up the queue)[repeat(x%b,inc(words(u(allquests))))],%0)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QREADY:u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqwrap\,_iqready\,\%0\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QON:u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqwrap\,_iqon\,\%0\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QOFF:u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqwrap\,_iqoff\,\%0\,\%1\)
&QNAME_VALID [v(SVC`T1cc58f93565b819fa6cf)]=cand(valid(name,%0),not(regmatch(%0,\[`#/*?:|;\])))
&QNAME_TO_ID [v(SVC`T1cc58f93565b819fa6cf)]=regeditalli(if(setr(0,wildgrepi(me,_q`*`name,%0)),%q0,grepi(me,_q`*`name,%0)),_q`(.*?)`name,$1)
&QMSG [v(SVC`T1cc58f93565b819fa6cf)]=pemit(%0,u(msg_format,%1))
&QLIST_FORMAT [v(SVC`T1cc58f93565b819fa6cf)]=s(align\([if(%1,20 -10 -26 -20,75)]\,\%b\%b%0\))
@set [v(SVC`T1cc58f93565b819fa6cf)]=QLISTENTRY:\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%0\)\]\[if\(\%2\,\\\,\[if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\%0\,\%1\)\,ansi\(hb\,Started\)\,\[if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsucc\,\%0\,\%1\)\,ansi\(hg\,Succeeded\)\,ansi\(hr\,Failed\)\)\]\)\]\\\,\[convsecs\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`_i`\%1`ctime\)\)\]\\\,\[timestring\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qduration\,\%0\,\%1\)\)\]\)\]
&QINSTS [v(SVC`T1cc58f93565b819fa6cf)]=filter(#lambda/u(qstarted,%0,\%0),%1)
&QINFOENTRY [v(SVC`T1cc58f93565b819fa6cf)]=if(hasattr(me/_q`%0`%1),[ansi(h,ucstr(%1))]: [if(eq(%+,3),%2,v(_q`%0`%1))]%r)
&QID_VALID [v(SVC`T1cc58f93565b819fa6cf)]=regmatchi(%0,^#q\[\[:digit:\]\]+$)
&QGOOD [v(SVC`T1cc58f93565b819fa6cf)]=u(_iqsafe,_q`%0`ilock,%1)
&QFULLNAME [v(SVC`T1cc58f93565b819fa6cf)]=[v(_q`%0`name)](%0)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QFAIL:u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqfail\,_iqsucc\,\%0\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QDURATION:sub\(if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqoff\,\%0\,\%1\)\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`_i`\%1`time\)\,secs\(\)\)\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%0`_i`\%1`ctime\)\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=QCMD:\$\^\\+quest\(/\(\\w*\)\(.*\)\)?\$:@select/inplace \%1=\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%#\,A system for tracking quests.\%r\%rQuest Tracker Object: \[name\([v(SVC`T1cc58f93565b819fa6cf)]\)\]\%r\%r\[ansi\(h\,+quest/help\)\] for help.\}\,\{@select/inplace \[regediti\(first\(if\(setr\(0\,lattr\([v(SVC`T1cc58f93565b819fa6cf)]/cmd`c_\%2\)\)\,\%q0\,lattr\([v(SVC`T1cc58f93565b819fa6cf)]/cmd`c_\%2*\)\)\)\,\^cmd`c_\,\)\]=\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%#\,Unknown command '\%2'. %bSee +quest/help commands for a list of commands.\}\,\{@select/inplace \[null\(regmatch\(get\([v(SVC`T1cc58f93565b819fa6cf)]/cmd`f_\%\$0\)\,\(.*\)\\\,\(.*\)\,1:0 2:1\)\)\]\[regmatchi\(\%3\,\%q0\,\%q1\)\]=1\,\{@select/inplace gte\(get\([v(SVC`T1cc58f93565b819fa6cf)]/semaphore\)\,0\)=1\,\{@wait \[setq\(0\,\%\$2\)\][v(SVC`T1cc58f93565b819fa6cf)]=\{@include [v(SVC`T1cc58f93565b819fa6cf)]/cmd`c_\%q0=\%#\; @notify [v(SVC`T1cc58f93565b819fa6cf)]\}\}\,\{@wait [v(SVC`T1cc58f93565b819fa6cf)]\; @include [v(SVC`T1cc58f93565b819fa6cf)]/cmd`c_\%\$2=\%#\; @notify [v(SVC`T1cc58f93565b819fa6cf)]\}\}\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/qcmd=+quest/help \%\$1\,/help \%\$2\,help\,\%b\%\$1\}\}\}
&NAME_FLAG [v(SVC`T1cc58f93565b819fa6cf)]=elements(grab(v(flag_tbl),%0 *,|),2)
&NAMES_FLAG [v(SVC`T1cc58f93565b819fa6cf)]=if(eq(,setr(0,map(lit(#lambda/elements(%0,2)),setq(0,%0)[filter(lit(#lambda/neq(0,band(first(%0),%q0))),v(flag_tbl),|)],|,%b))),*NONE*,%q0)
&MSG_FORMAT [v(SVC`T1cc58f93565b819fa6cf)]=if(%0,QUEST:[space(2)]%0)
&MATCH_FLAG [v(SVC`T1cc58f93565b819fa6cf)]=if(setr(0,first(if(setr(0,grab(v(flag_tbl),?* ?* %0,|)),%q0,grab(v(flag_tbl),?* %0 ?,|)))),%q0,u(qmsg,%q2,'%0' - I don't recognize that flag.)[0])
&IS_WILD [v(SVC`T1cc58f93565b819fa6cf)]=regmatch(%0,lit((^|[^\\])([?*])))
&IS_QUEST [v(SVC`T1cc58f93565b819fa6cf)]=cor(u(is_qid,%0),cand(u(qname_valid,%0),letq(0,u(qname_to_id,%0),cand(t(%q0),eq(1,words(%q0))))))
&IS_QID [v(SVC`T1cc58f93565b819fa6cf)]=cand(u(qid_valid,%0),hasattr(me/_q`%0))
&IS_DEPENDENT [v(SVC`T1cc58f93565b819fa6cf)]=t(band(v(QUEST_DEPENDENT),v(_q`%0`flags)))
&IS_DARK [v(SVC`T1cc58f93565b819fa6cf)]=t(band(v(QUEST_DARK),v(_q`%0`flags)))
&IS_CYCLIC [v(SVC`T1cc58f93565b819fa6cf)]=[setq(0,,1,filter(#lambda/eq(0,after(\%0,:)),setr(2,map(#lambda/strcat(\%0,:,words(v(_q`\%0`supquests))),u(allquests)))))][null(iter(%q2,if(words(%q1),[setq(0,%q0 [before(setr(3,first(%q1)),:)],1,setdiff(%q1,%q3))][iter(v(_q`[before(%q3,:)]`subquests),[setq(2,regediti(%q2,%i0:(\[\[:digit:]]+),%i0:[setr(4,dec($1))]))] [if(eq(0,%q4),setq(1,setunion(%q1,%i0:0)))])],ibreak())))]%q0
&IS_ACTOR [v(SVC`T1cc58f93565b819fa6cf)]=cor(isdbref(%0),locate(%#,%0,*X))
@set [v(SVC`T1cc58f93565b819fa6cf)]=ISTOP:&_q`\%1`_i`\%2`res [v(SVC`T1cc58f93565b819fa6cf)]=u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\%1\,\%2\)\;@@ The duplication here is necessary for quest locks that check whether a quest is stopped/succeeed/failed. %bNote that it can accurately check its own status\, so in theory you could have a lock that failed\, then succeeded\, though this seems kind of pointless.\;&_q`\%1`_i`\%2`res [v(SVC`T1cc58f93565b819fa6cf)]=if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\%1\,\%2\)\,\[setq\(0\,success\,3\,successfully completed\)\]1\,\[setq\(0\,failure\,3\,failed\)\]0\)\; &_q`\%1`_i`\%2`time [v(SVC`T1cc58f93565b819fa6cf)]=secs\(\)\;@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%1\)\]' stopped for actor '\%2'.\;@pemit \%2=\[if\(cor\(setr\(1\,u\([v(SVC`T1cc58f93565b819fa6cf)]/is_dark\,\%1\)\,2\,if\(hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`describe\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsafe\,_q`\%1`describe\,\%2\)\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`name\)\)\)\,hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`\%q0\)\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsafe\,_q`\%1`\%q0\,\%2\)\,You have \%q3 a quest: '\%q2'.\)\]\; @oemit \%2=\[if\(cor\(\%q1\,hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`o\%q0\)\)\,if\(words\(setr\(4\,u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqsafe\,_q`\%1`o\%q0\,\%2\)\)\)\,\[name\(\%2\)\] \%q4\)\,\[name\(\%2\)\] has \%q3 a quest: '\%q2'.\)\]\; @select/inplace hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`a\%q0\)=1\,\{@trigger \[u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqmakesafe\,_q`\%1`a\%q0\)\][v(SVC`T1f9ed0605355b043ce90)]/va=\%2\}\;@include [v(SVC`T1cc58f93565b819fa6cf)]/icheck\;
&IQUESTS [v(SVC`T1cc58f93565b819fa6cf)]=filter(#lambda/u(qstarted,\%0,%0),%1)
@set [v(SVC`T1cc58f93565b819fa6cf)]=INFO_OMSG:@oemit \%0=u\([v(SVC`T1cc58f93565b819fa6cf)]/msg_format\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=INFO_MSG:@pemit/silent \%0=u\([v(SVC`T1cc58f93565b819fa6cf)]/msg_format\,\%1\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=ICHECK:@select/inplace \[words\(setr\(0\,filter\(#lambda/cand\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\\\%0\,\%2\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\\\%0\,\%2\)\)\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%1`supquests\) filter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/is_dependent\,\\\%0\)\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%2`subquests\)\)\)\)\)\]=>0\,\{@dolist \%q0=\{@include [v(SVC`T1cc58f93565b819fa6cf)]/qcmd=+quest/stop \%i0=\%2\,/stop \%i0=\%2\,stop\,\%b\%i0=\%2\}\}
&HELP_FORMAT [v(SVC`T1cc58f93565b819fa6cf)]=[repeat(-,75)]%r[ansi(h,%0)]%r%1%r[repeat(-,75)]
&FLAG_TBL [v(SVC`T1cc58f93565b819fa6cf)]=2 DARK d|1 DEPENDENT e
@set [v(SVC`T1cc58f93565b819fa6cf)]=ERR_MSG:@pemit/silent \%0=u\([v(SVC`T1cc58f93565b819fa6cf)]/msg_format\,\%1\)\; @select/inplace gte\(get\([v(SVC`T1cc58f93565b819fa6cf)]/semaphore\)\,0\)=1\,@notify [v(SVC`T1cc58f93565b819fa6cf)]
&DESCRIBE [v(SVC`T1cc58f93565b819fa6cf)]=Quest Tracker.%r%rFor help information type "+quest/help <topic>"
&CMD`F_SUCCESS [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_SUBQUESTS [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_STOP [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?= ?(.*)$,1:a 2:b
&CMD`F_START [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?= ?(.*)$,1:a 2:b
&CMD`F_RESTART [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?= ?(.*)$,1:a 2:b
&CMD`F_OSUCCESS [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_OFAILURE [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_NAME [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_LOCK [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_LIST [v(SVC`T1cc58f93565b819fa6cf)]=^( (.+?))?$,2:a
&CMD`F_INFO [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+)$,1:a
&CMD`F_HELP [v(SVC`T1cc58f93565b819fa6cf)]=^ (.*)$,1:a
&CMD`F_FLAGS [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))$,1:a 2:c 3:b
&CMD`F_FAILURE [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_DESCRIBE [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_DELETE [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+)$,1:a
&CMD`F_CHECK [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?= ?(.*)$,1:a 2:b
&CMD`F_ASUCCESS [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_AFAILURE [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+?) ?(= ?(.*))?$,1:a 2:c 3:b
&CMD`F_ADD [v(SVC`T1cc58f93565b819fa6cf)]=^ (.+)$,1:a
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_SUCCESS:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,success
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_SUBQUESTS:@include \[setq\(1\,u\([v(SVC`T1cc58f93565b819fa6cf)]/allqinsts\,\%qa\)\)\][v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,subquests\,\{lit\(@select/inplace \%qb=*\,\{@break \[setr\(2\,filter\(#lambda/ncand\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qid_valid\,\\\%0\)\,neq\(comp\(\\\%0\,\\\%qa\,I\)\,0\)\)\,\[setr\(b\,iter\(\%qb\,if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qid_valid\,\%i0\)\,\%i0\,letq\(0\,ulocal\([v(SVC`T1cc58f93565b819fa6cf)]/qname_to_id\,\%i0\)\,if\(cand\(t\(\%q0\)\,eq\(1\,words\(\%q0\)\)\)\,\%q0\,\%i0\)\)\)\,if\(strmatch\(\%qb\,*|*\)\,|\,\%b\)\,\%b\)\)\]\,\%b\,\%b\)\)\]=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,The following subquest names are not valid for quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]': '\%q2'. %bSee +quest/help subquests for usage.\; &_q`\%qa`subquests [v(SVC`T1cc58f93565b819fa6cf)] = \[setq\(2\,hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`subquests\)\)\]\[setunion\(\%q0\,\%qb\)\]\; think \[iter\(filter\([v(SVC`T1cc58f93565b819fa6cf)]/is_qid\,setdiff\(\%qb\,\%q0\)\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\,setunion\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\)\,\%qa\)\)\] \[iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qinsts\,\%i0\,\%q1\)\,attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\,inc\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\)\)\)\)\]\)\]\; @@ Check for cycles: did we introduce one while adding subquests? %bIf so\, restore the old subquests and terminate.\; @assert eq\(words\(u\([v(SVC`T1cc58f93565b819fa6cf)]/allquests\)\)\,words\(ulocal\([v(SVC`T1cc58f93565b819fa6cf)]/is_cyclic\)\)\)= \{think \[iter\(filter\([v(SVC`T1cc58f93565b819fa6cf)]/is_qid\,setdiff\(\%qb\,\%q0\)\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\,setdiff\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\)\,\%qa\)\)\] \[iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qinsts\,\%i0\,\%q1\)\,attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\,dec\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\)\)\)\)\]\)\]\; @select/inplace \%q2=1\,&_q`\%qa`subquests [v(SVC`T1cc58f93565b819fa6cf)]=\%q0\,&_q`\%qa`subquests [v(SVC`T1cc58f93565b819fa6cf)]\; @include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Error: Changing subquests for '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' to '\%qb' created a cycle. %bSee +quest/help cycles for more information.\}\}\)\}\; @@ If not\, remove subquests as necessary\; @select/inplace \%qc==*\,\{&_q`\%qa`subquests [v(SVC`T1cc58f93565b819fa6cf)]=setunion\(\%qb\,\)\}\; think \[setq\(2\,\%0\)\] \[iter\(filter\([v(SVC`T1cc58f93565b819fa6cf)]/is_qid\,setdiff\(\%q0\,\%qb\)\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\,setdiff\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`supquests\)\,\%qa\)\)\] \[iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qinsts\,\%i0\,\%q1\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\,dec\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i1`_i`\%i0`refcnt\)\)\)\] \[if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqready\,\%i1\,\%i0\)\,ulocal\([v(SVC`T1cc58f93565b819fa6cf)]/qrestarti\,\%i1\,\%i0\)\)\]\)\]\)\]\;@include [v(SVC`T1cc58f93565b819fa6cf)]/reset_lock=\%qa\; @dolist u\([v(SVC`T1cc58f93565b819fa6cf)]/allqinsts\,\%qa\)=\{@include [v(SVC`T1cc58f93565b819fa6cf)]/icheck=\%0\,\%qa\,\%i0\}
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_STOP:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,stop\,\%qa\,a\;@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\%qa\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Actor '\%qb' is not currently on quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]'. %bSee +quest/help stop for usage.\;@include [v(SVC`T1cc58f93565b819fa6cf)]/istop=\%0\,\%qa\,\%qb
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_START:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,start\,\%qa\,a\;@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/is_actor\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Name '\%qb' is not a valid actor ID. %bSee +quest/help start for usage.\;@break u\([v(SVC`T1cc58f93565b819fa6cf)]/qstarted\,\%qa\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,\[if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\%qa\,\%qb\)\,Actor '\%qb' is already on quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]'.\,Quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' has already ended for actor '\%qb'.\)\] %bTo restart\\\, use +quest/restart.\;&_q`\%qa`_i`\%qb [v(SVC`T1cc58f93565b819fa6cf)]=Quest instance internal structure. %bDo not modify directly\, use the +quest/* commands and q* functions instead. %bSee +quest/help for more information.\;&_q`\%qa`_i`\%qb`refcnt [v(SVC`T1cc58f93565b819fa6cf)]=add\(words\(u\([v(SVC`T1cc58f93565b819fa6cf)]/iquests\,\%qb\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`supquests\)\)\)\,if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/is_dependent\,\%qa\)\,0\,1\)\)\;&_q`\%qa`_i`\%qb`ctime [v(SVC`T1cc58f93565b819fa6cf)]=secs\(\)\;@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/qstarted\,\%qa\,\%qb\)=\{@wipe [v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%qb\; @include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' cannot start for actor '\%qb' \(missing dependency\). %bSee +quest/help subquests for more information.\}\;think iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/iquests\,\%qb\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`subquests\)\)\,attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`_i`\%qb`refcnt\,inc\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%i0`_i`\%qb`refcnt\)\)\)\)\;@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' started for actor '\%qb'.\;@select/inplace t\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\%qa\,\%qb\)\)=1\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/istop=\%0\,\%qa\,\%qb\}\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/icheck=\%0\,\%qa\,\%qb\}\;
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_RESTART:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,restart\,\%qa\,a\;@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/is_actor\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Name '\%qb' is not a valid actor ID. %bSee +quest/help restart for usage.\;@assert hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' does not exist with actor '\%qb'. %bTo start\\\, use +quest/start.\;think \[setq\(2\,\%0\)\]\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qrestarti\,\%qa\,\%qb\)\]\; @include [v(SVC`T1cc58f93565b819fa6cf)]/icheck=\%0\,\%qa\,\%b
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_OSUCCESS:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,osuccess
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_OFAILURE:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,ofailure
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_NAME:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,name\,\{@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/qname_valid\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Name '\%qb' is not a valid quest name. %bSee +quest/help name for usage.\}\,\{@break 1=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Give it what new name?\}
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_LOCK:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,lock\; @include [v(SVC`T1cc58f93565b819fa6cf)]/reset_lock=\%qa\; @dolist u\([v(SVC`T1cc58f93565b819fa6cf)]/allqinsts\,\%qa\)=\{@select/inplace cand\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\%qa\,\%i0\)\,t\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\%qa\,\%i0\)\)\)=1\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/istop=\%0\,\%qa\,\%i0\}\}
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_LIST:@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,List \[if\(setr\(1\,u\([v(SVC`T1cc58f93565b819fa6cf)]/is_actor\,\%qa\)\)\,for actor "\%qa"\,of all quests\)\]:\[setq\(0\,if\(\%q1\,sortkey\(#lambda/add\(if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\\\%0\,\%qa\)\,secs\(\)\,0\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qduration\,\\\%0\,\%qa\)\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/alliquests\,\%qa\)\,-n\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/allquests\)\)\)\]\%r\[if\(\%q0\,\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qlist_format\,\[ansi\(u\,NAME\)\]\[if\(\%q1\,\\\,\[ansi\(u\,STATUS\)\]\\\,\[ansi\(u\,START TIME\)\]\\\,\[ansi\(u\,DURATION\)\]\)\]\,\%q1\)\]\%r\[iter\(\%q0\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qlist_format\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qlistentry\,\%i0\,\%qa\,\%q1\)\,\%q1\)\,\,\%r\)\]\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qlist_format\,*NONE*\)\)\]
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_INFO:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,info\,\%qa\,a\; @include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Info for '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]':\%rName: \[get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`name\)\]\%rFlags: \[u\([v(SVC`T1cc58f93565b819fa6cf)]/names_flag\,get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`flags\)\)\]\[trim\(\%r\[map\(#lambda/u\([v(SVC`T1cc58f93565b819fa6cf)]/qinfoentry\,\%qa\,\\\%0\)\,lock subquests afailure asuccess describe failure ofailure osuccess success\,\%b\,\)\]\,\%r\,r\)\]
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_HELP:@pemit/silent \%0=\[setq\(0\,get\([v(SVC`T1cc58f93565b819fa6cf)]/qhelp_tbl\)\)\]\[switch\(words\(setr\(1\,if\(setr\(2\,u\([v(SVC`T1cc58f93565b819fa6cf)]/is_wild\,\%qa\)\)\,matchall\(\%q0\,&\%b\%qa\,\%r\,\%b\)\,first\(matchall\(\%q0\,&\%b\%qa*\,\%r\)\,\%r\)\)\)\)\,>1\,u\([v(SVC`T1cc58f93565b819fa6cf)]/msg_format\,Here are the entries which match '\%qa':\%r\[sort\(filterbool\(#lambda/t\(\\\%0\)\,map\(#lambda/delete\(\\\%0\,0\,2\)\,elements\(\%q0\,\%q1\,\%r\)\,\%r\)\,\%r\)\,i\,\%r\,\\\,\%b\)\]\)\,1\,u\([v(SVC`T1cc58f93565b819fa6cf)]/help_format\,ucstr\(delete\(elements\(\%q0\,\%q1\,\%r\)\,0\,2\)\)\,s\(null\(regmatchi\(extract\(\%q0\,\%q1\,words\(\%q0\,\%r\)\,\%r\)\,\(?\\:\^|\%r\)\(?\\:& .*?\%r\)*\(\\\[\^&\].*\(?\\:\%r|\$\)?\)\(?\\:\%r|\$\)\,1:2\)\)\%q2\)\)\,u\([v(SVC`T1cc58f93565b819fa6cf)]/msg_format\,if\(\%q2\,No entries matching '\%qa' were found.\,No entry for '\%qa'\)\)\)\]
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_FLAGS:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,flags\,\%qa\,a\;@break eq\(comp\(\%qc\,=\)\,0\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,What do you want to set?\;&_q`\%qa`flags [v(SVC`T1cc58f93565b819fa6cf)]=\[setq\(0\,u\([v(SVC`T1cc58f93565b819fa6cf)]/is_dependent\,\%qa\)\,2\,\%0\)\] \[localize\(\[fold\([v(SVC`T1cc58f93565b819fa6cf)]/set_flag\,\%qb\, get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`flags\)\)\]\)\]\;@select/inplace comp\(\%q0\,u\([v(SVC`T1cc58f93565b819fa6cf)]/is_dependent\,\%qa\)\,N\)=1\,think iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/allqinsts\,\%qa\)\,attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%i0`refcnt\,inc\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%i0`refcnt\)\)\)\)\,-1\,think iter\(u\([v(SVC`T1cc58f93565b819fa6cf)]/allqinsts\,\%qa\)\,\[attrib_set\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%i0`refcnt\,dec\(get\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`_i`\%i0`refcnt\)\)\)\]if\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqready\,\%qa\,\%i0\)\,ulocal\([v(SVC`T1cc58f93565b819fa6cf)]/qrestarti\,\%qa\,\%i0\)\)\)
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_FAILURE:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,failure
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_DESCRIBE:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,describe
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_DELETE:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,delete\,\%qa\,a\;@select/inplace hasattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa`subquests\)=1\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/qcmd=+quest/subquests \%qa\,/subquests \%qa\,subquests\,\%b\%qa\}\; @wait \[setq\(0\,u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\)\][v(SVC`T1cc58f93565b819fa6cf)]=\{@wipe [v(SVC`T1cc58f93565b819fa6cf)]/_q`\%qa\; @notify [v(SVC`T1cc58f93565b819fa6cf)]\}\; @include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Quest '\%q0' deleted.
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_CHECK:@include [v(SVC`T1cc58f93565b819fa6cf)]/chk_quest=\%0\,check\,\%qa\,a\;@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/is_actor\,\%qb\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Actor '\%qb' is not a valid actor. %bSee +quest/help check for usage.\;@select cand\(u\([v(SVC`T1cc58f93565b819fa6cf)]/_iqon\,\%qa\,\%qb\)\,t\(u\([v(SVC`T1cc58f93565b819fa6cf)]/qgood\,\%qa\,\%qb\)\)\)=1\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/istop=\%0\,\%qa\,\%qb\}\,\{@include [v(SVC`T1cc58f93565b819fa6cf)]/icheck=\%0\,\%qa\,\%qb\}\;@include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Check for quest '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' on actor '\%qb' complete.
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_ASUCCESS:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,asuccess
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_AFAILURE:@include [v(SVC`T1cc58f93565b819fa6cf)]/set_qattr=\%0\,afailure
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD`C_ADD:@assert u\([v(SVC`T1cc58f93565b819fa6cf)]/qname_valid\,\%qa\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Name '\[u\([v(SVC`T1cc58f93565b819fa6cf)]/qfullname\,\%qa\)\]' is not a valid quest name. %bSee +quest/help add for usage.\;think attrib_set\(_q`\[setr\(0\,u\([v(SVC`T1cc58f93565b819fa6cf)]/unused_qid\)\)\]\)`[v(SVC`T1cc58f93565b819fa6cf)] = Quest internal structure. %bDo not modify directly\, use the +quest/* commands instead. %bSee +quest/help for more information.\;&_q`\%q0`name [v(SVC`T1cc58f93565b819fa6cf)] = \%qa\; &_q`\%q0`flags [v(SVC`T1cc58f93565b819fa6cf)] = 0\; &_q`\%q0`_i [v(SVC`T1cc58f93565b819fa6cf)] = Quest instance tracker internal structure. %bDo not modify directly\, use the +quest/* commands instead. %bSee +quest/help for more information.\; &_q`\%q0`supquests [v(SVC`T1cc58f93565b819fa6cf)]=setunion\(regeditalli\(regrepi\([v(SVC`T1cc58f93565b819fa6cf)]\,_q`\%q0`subquests\,\\\\b\%q0\\\\b\)\,lit\(\\b_q`\(?P<quest>\\S*\)`subquests\)\,\$<quest>\)\,\)\; @include [v(SVC`T1cc58f93565b819fa6cf)]/reset_lock=\%q0\; @include [v(SVC`T1cc58f93565b819fa6cf)]/info_msg=\%0\,Quest '\%q0' created.
&CMD`C_ [v(SVC`T1cc58f93565b819fa6cf)]=Dummy command.
@set [v(SVC`T1cc58f93565b819fa6cf)]=CMD:Quest Tracker commands are stored here. %bDo not access directly\, use the +quest/* commands instead. %bIf you must @trigger or @include a command\, use the following syntax \(where <parameters> is everything following the /command\, including spaces\): \[@trigger|@include\] [v(SVC`T1cc58f93565b819fa6cf)]/qcmd=+quest/<command name><parameters>\,/<command name><parameters>\,<command name>\,<parameters>
@set [v(SVC`T1cc58f93565b819fa6cf)]=CHK_QUEST:@select/inplace u\([v(SVC`T1cc58f93565b819fa6cf)]/is_qid\,setr\(\%3\,\%2\)\)=0\,\{@break u\([v(SVC`T1cc58f93565b819fa6cf)]/qid_valid\,\%2\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Quest '\%2' not found. %bSee +quest/help \%1 for usage.\; @assert u\([v(SVC`T1cc58f93565b819fa6cf)]/qname_valid\,\%2\)=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,'\%2' is not a valid quest name. %bSee +quest/help \%1 for usage.\; @select/inplace words\(setr\(\%3\,ulocal\([v(SVC`T1cc58f93565b819fa6cf)]/qname_to_id\,\%2\)\)\)=0\,\{@break 1=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,Quest \[r\(\%3\)\] '\%2' not found. %bSee +quest/help \%1 for usage.\}\,>1\,\{@break 1=@include [v(SVC`T1cc58f93565b819fa6cf)]/err_msg=\%0\,I don't know which quest '\%2' you mean!\}\}\;
@set [v(SVC`T1cc58f93565b819fa6cf)]=ALLQUESTS:regeditalli\(lattr\([v(SVC`T1cc58f93565b819fa6cf)]/_q`*\)\,_q`\,\)
&ALLQINSTS [v(SVC`T1cc58f93565b819fa6cf)]=u(qinsts,%0,u(rawqinsts,%0))
&ALLIQUESTS [v(SVC`T1cc58f93565b819fa6cf)]=u(iquests,%0,u(allquests))
@set [v(SVC`T1cc58f93565b819fa6cf)]/_QHELP=no_command no_inherit regexp no_debug branch
@set [v(SVC`T1cc58f93565b819fa6cf)]/_Q=no_command branch
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQWRAP=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQSUCC=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQSAFE=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQREADY=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQON=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQOFF=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQMAKESAFE=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/_IQFAIL=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/UNUSED_QID=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/SVC=branch
@set [v(SVC`T1cc58f93565b819fa6cf)]/STARTUP=no_command prefixmatch
@set [v(SVC`T1cc58f93565b819fa6cf)]/SET_QATTR=no_command no_inherit debug no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/SET_FLAG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/RESET_LOCK=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/RAWQINSTS=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QUEST_DEPENDENT=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QUEST_DARK=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QSUCC=no_command debug no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QSTOPPED=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QSTARTED=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QRESTARTIH=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QRESTARTI=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QREADY=no_command no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QON=no_command no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QOFF=no_command debug no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QNAME_VALID=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QNAME_TO_ID=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QMSG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QLIST_FORMAT=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QLISTENTRY=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QINSTS=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QINFOENTRY=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QID_VALID=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QGOOD=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QFAIL=no_command no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QDURATION=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/QCMD=regexp no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/NAME_FLAG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/NAMES_FLAG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/MSG_FORMAT=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/MATCH_FLAG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_WILD=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_QUEST=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_QID=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_DEPENDENT=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_DARK=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_CYCLIC=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IS_ACTOR=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/ISTOP=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/IQUESTS=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/INFO_OMSG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/INFO_MSG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/ICHECK=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/HELP_FORMAT=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/FLAG_TBL=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/ERR_MSG=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/DESCRIBE=no_command visual prefixmatch public nearby
@set [v(SVC`T1cc58f93565b819fa6cf)]/CMD`C_SUBQUESTS=no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/CMD`C_LIST=no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/CMD=no_command no_inherit no_debug branch
@set [v(SVC`T1cc58f93565b819fa6cf)]/ALLQUESTS=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/ALLQINSTS=no_command no_inherit no_debug
@set [v(SVC`T1cc58f93565b819fa6cf)]/ALLIQUESTS=no_command no_inherit no_debug
@@
@@ Triggering all startups, oncreates, onupdates.
@@
@trigger [v(SVC`T1cc58f93565b819fa6cf)]/SVC`ONUPDATE
@trigger [v(SVC`T1cc58f93565b819fa6cf)]/STARTUP