[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:guide_to_quest_dialogs

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Tue Mar 23 18:31:17 CDT 2010


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2010/03/23 18:31
User        : 
Edit Summary: 

@@ -133,8 +133,9 @@
    * Quest
    * Item
    * Token
    * Level
+   * Age
  
  == Quest ==
  
  Quest is followed by two fields, the name of the quest, and the step that the player must be at or past.
@@ -184,8 +185,49 @@
  </code>
  
  Will trigger if the player is at least at level 10, and will not trigger if they are below it.
  While you can use this to block of entire quest lines until certain levels, it is probably better in general to use this test to bypass a warning about being too weak.
+ 
+ == Age ==
+ 
+ This checks if the date of a time marker is older than the specified age.
+ 
+ there are 6 things you will want to set. 
+ 
+ The marker name, which should've been set with 'marktime' (see the post section)
+ then the time to wait in
+   * years
+   * months
+   * Days
+   * Hours
+   * Minutes
+ 
+ <code>
+ "pre" : [["age", "mymarker", "0", "0", "1", "10", "0"]],
+ </code>
+ 
+ is true if the marker "mymarker" was last marked as being set at least 1 day and 10 hours ago.
+ 
+ This time is in server time, which is accelerated from real-time, it is also the time defined in the game world. In the crossfire game world:
+ 
+   * 1 Year has 17 Months
+   * 1 Month has 35 Days
+   * 1 Day has 28 hours
+   * 1 Hour has 60 minutes
+  
+ Any attempt to check for an age of more than these values is an error - ie, 
+ 
+ This is **Wrong**:
+ <code>
+ "pre" : [["age", "mymarker", "0", "0", "36", "0", "0"]],
+ </code>
+ use this: 
+ <code>
+ "pre" : [["age", "mymarker", "0", "1", "1", "0", "0"]],
+ </code>
+ 
+ Instead
+ 
  
  === The Post Block ===
  
  After the Pre block is used to decide whether a message should trigger, the post block holds the consequences.
@@ -292,8 +334,10 @@
  
  Sets the specified token to the specified value, other rules can query this value using 'token' in the pre block.
  
  Tokens are stored in the player file, under the "location" which was specified at the top of the file. Any dialog files which point to the same location have access to the same tokens (and can affect the values they hold). Two tokens with the same name but in different locations are treated separately.
+ 
+ NB: Tokens and time markers are actually the same thing, so if you need to reset a timemarker, then you can use settoken, and set it to 0, if you do, all age checks against the marker will fail until it is set again.
  
  == connection ==
  
  Triggers the specified connection on the map
@@ -316,8 +360,21 @@
    }
  </code>
  
  will give the impression the NPC has opened a door as long as there is a door with connection 4 set in the map editor.
+ 
+ == marktime ==
+ 
+ Stores the current server time in a time token with the name specified.
+ 
+ eg
+ <code>
+ ["marktime", "mymarker"]
+ </code>
+ 
+ Stores the current time in "mymarker", you can then check this with 'age' in a 'pre' block to check how long has passed since that point.
+ 
+ This can be used for putting time limits on parts of dialog/quests etc.
  
  === The msg Block ===
  
  This is send directly to the player, if the pre conditions are matched, with the following exceptions:
@@ -335,12 +392,12 @@
  ==== How Do I? ====
  
  The following are common things to want to do, and how to go about doing them.
  
-   * Make an object either be given in a dialogue, or be found on the corpse of the NPC when killed, but not both?
- First of all, put one copy of the item in an NPC_Gift_Box (this is the copy that will be tied to the dialog), and one on the NPC directly.
- Make sure that the same messages that cause the item(s) to be given to the player, also set a quest step (if you have no suitable quest, then you can create a simple one-step quest which is hidden ** TODO **)
- Next, put an event_death listener on the NPC
- Use the script **Script not written yet** with the options **TODO** to remove the copy of the object from the monster's inventory if they are killed by a player who is past a certain stage in the given quest.
+   - Make an object either be given in a dialogue, or be found on the corpse of the NPC when killed, but not both?
+   * First of all, put one copy of the item in an NPC_Gift_Box (this is the copy that will be tied to the dialog), and one on the NPC directly.
+   * Make sure that the same messages that cause the item(s) to be given to the player, also set a quest step (if you have no suitable quest, then you can create a simple one-step quest which is hidden ** TODO **)
+   * Next, put an event_death listener on the NPC
+   * Use the script **Script not written yet** with the options **TODO** to remove the copy of the object from the monster's inventory if they are killed by a player who is past a certain stage in the given quest.
  
  Now the player can either kill the NPC and claim the item, or he can talk to him and claim the item, but can not talk to the NPC, get the item, then kill the NPC and get another copy of the item.
  


IP-Address  : 81.141.60.247
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs?rev=1269378131
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