Area Building

· Home
· Overview
· Helps
· Mobiles
· Objects
· Rooms
· Resets

· Shops
· Specials
· Time
· Weather
· Scripts


#QUESTS sections

Script QUESTS are a very powerful addition to the script system. QUESTS allow you to keep track of how an individual player is progressing along a quest or storyline. Right now quests must be defined in a separate file, altho inline quests will be added to areas where the quest doesnot overlap areas.

Format:  

#QUESTS
#<quest vnum>
<short description>~
<long description>
~
<failure description>
~
<expiration description>
~
<number of states>
<state description for each state>~
<repeatable on remort (0/1)>
<expiration time in seconds>
@init~
{
  declare global variables
}
~
|
#

<quest vnum> This is the VNUM for this quest. Since there are far fewer quests than anything else in the mud, quests will be numbered as the area vnum/10. i.e. If the area has the vnum range from 8000 - 8200, the quests will have the range between 800 and 820.

<short description> This is what you see when typing "quests" or "quests all". This is the title of the quest.

<long description> This is an expanded description of the quest that is only visable to the immortals through the showquest command.

<failure description> This message can be printed to the character if the fail the quest due to a time restriction. This happend automatically once the mud time passes the end time of the quest. If there is no end time (no time limit on the quest) the failure message is never printed. This can be blank in either case if you do not want a message displayed.

<expiration description> This is a message the is displayed whenever the expiration time of the quest passes.

<number of states> This is an integer that determines how many states this quest will have. Quests should always have at least two states, started and compelted.

<state descriptions> There should be one description line (followed by a ~) for each state. If there are only two states, there will be two description lines.

<repeatable on remort> This option (0 for false, 1 for true) determines if this quest stays with a player once they remort or not. If this is false, then the quest will remain on the player through the remort process, otherwise it will be removed, alowing the player to get and complete this quest again in their new life.

<expiration time> This is the time in seconds from the start time of the quest to the time the quest expires. If a quest expires, the expiration description is shown to the player, and the quest data is removed from the player, alowing the player to go back and start the quest again. It makes no difference if the quest was complete or not. The start time of the quest is automatically asigned when a player is given the quest (via mpgivequest, or givequest). The expiration time is then added to this time. So if you wanted a quest to expire one week (real time) after the quest was given, then the expiration time would be 604800. (60 seconds x 60 minutes x 24 hours x 7 days).

@init~ This init script allows you to define quest variables. Only declare statements can go in here, and all variables need to be global.

Example: 

#1
The bartender's brew.~
Fetch the bartender the ingredients to make his brew. Make sure he has
enough barrels to store his brew in, and help him get the brew to
market.
~
You have failed to help the bartender in time.
~
You think the bartender might need some more help by now.
~
4
Find the bartender hops, barley, yeast and spring water.~
Get the bartender 10 barrels to store his brew in.~
Help the bartender fight his way past street thugs to get his brew to market.~
Complete! You have successfully helped the bartender with his brew!~
1
604800
@init~
{
 declare global $gothops number
 declare global $gotbarley number
 declare global $gotyeast number
 declare global $gotwater number
 declare global $numbarrels number
}
~
|