[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:guide_to_quest_dialogs
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu Mar 25 12:18:51 CDT 2010
A page in your DokuWiki was added or changed. Here are the details:
Date : 2010/03/25 12:18
User : cavehippo
Edit Summary: Add some general advice
@@ -545,8 +545,34 @@
if the player were not at either step 0 or 1 in this example, then nothing would happen when the event triggered.
NB: Be careful about binding to event_pickup for items that are not taken away as part of a quest soon afterwards, especially for restartable quests, an event_pickup will return
+
+ ===== General Principles =====
+
+ * If you have a 'takeitem' instruction in a dialog's post block, you should always have a matching 'item' check in the 'pre' block. - possible exception, if you want to take '0' (ie, all) of an item, whether the player has it or not.
+
+ * "takeitem", "money", "0" will work, but don't expect it to win you friends.
+
+ * if you are updating a quest as part of a dialog, and you want to only make a quest go forward, not backwards, then you can 'shield' the quest advance rule by putting a similar rule just above it. ie:
+
+ <code>
+ {
+ "match" : ["cookie"],
+ "pre" : [["quest", "cookiequest", "30"]],
+ "post" : [],
+ "msg" : ["I already gave you a cookie."]
+ },{
+ "match" : ["cookie"],
+ "pre" : [["quest", "cookiequest", "20"]],
+ "post" : [["quest", "cookiequest", "30"], ["giveitem", "cookie"]],
+ "msg" : ["Well done, have a cookie."]
+ }
+ </code>
+
+ This will only give the player one cookie when they do the quest (with more possible later if it is a restartable quest.
+
+ * If you have a quest item that the player is given and which they will need later in the quest, then attach the script "python/dialog/questessentialuntil.py" to an event_drop for the object. This will make the player unable to drop the item while they are early on in the quest, and if they pass a stage where it is no longer needed, it will disappear when they drop it. You probably shouldn't use this for a quest reward.
===== How Do I? =====
The following are common things to want to do, and how to go about doing them.
IP-Address : 81.141.60.247
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs?rev=1269535272
New Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list