[Crossfire-wiki] [Crossfire DokuWiki] page changed: cfdialog
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Sun Oct 28 09:57:46 CDT 2007
A page in your DokuWiki was added or changed. Here are the details:
Date : 2007/10/28 09:57
User : ryo
Edit Summary: update
@@ -25,10 +25,9 @@
* **Preconditions** are flags that must match for the rule to be triggered. Each precondition has a name and a value. The default value of a precondition is "0". The flags are stored into each player, and will survive between gaming sessions. They are useful to set the point in a dialog reached by a player - you can see those as an "NPC memory". All conditions must have a name and a value. The ":" and ";" characters are forbidden. For a rule to be triggered, all the player's flags should match the preconditions. If you give "*" as the value for a precondition, it means that there is no need to match it. A precondition is a list in the form: [key, value]. All preconditions are stored in a list. Note that you can use any string you want for the condition values, provided it doesn't contain ";" or ":".
* **Postconditions** are the status changes to apply to the player's conditions after the rule has been triggered. Their format is similar to preconditions. A value of "*" means that the condition will not be touched.
- * A **prefunction** is an optional callback function that will be called when a rule's preconditions are all matched, but before the rule is validated. The callback can do additional tests, and should return 1 to allow the rule
- to be selected, 0 to block the rule. The function arguments are the player and the actual rule being tested.
+ * A **prefunction** is an optional callback function that will be called when a rule's preconditions are all matched, but before the rule is validated. The callback can do additional tests, and should return 1 to allow the rule to be selected, 0 to block the rule. The function arguments are the player and the actual rule being tested.
* A **postfunction** is an optional callback that is called when a rule has been applied, and after the message is said. It can do additional custom .processing. The function arguments are the player and the actual rule having been used.
Once you have defined your rules, you have to assemble them into a dialog. Each dialog involves somebody who triggers it, somebody who answers, and has a unique name so it cannot be confused with other dialogs.
IP-Address : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/cfdialog?rev=1193583333
New Revision: http://wiki.metalforge.net/doku.php/cfdialog
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list