com.planet_ink.coffee_mud.Common.interfaces
Interface Quest

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Modifiable, Tickable
All Known Implementing Classes:
DefaultQuest

public interface Quest
extends Tickable, CMCommon, Modifiable

A quest object manages the details and text for a single descriptive script that is scheduled and, when directed, spawns, creates, watches, shuts down, and cleans up the various objects, subsidiary quests, and existing objects modifications related to this Quest. To the user, a quest is a task the user must complete for reward. To the Archon, a quest is something that adds content to an area at particular times, or under particular circumstances.

See Also:
QuestManager

Nested Class Summary
static class Quest.QuestScript
          A Quest script contains strings, and options, which are mini-quest scripts of strings.
 
Field Summary
static int FLAG_SUSPENDED
          A quest flag @see getFlags()
static java.lang.String[] MYSTERY_QCODES
          The list of basic mystery quest objects defined in an iterative fashion during quest script execution
static java.lang.String[] QCODES
          The list of BASIC non-iterative variable codes that pertain to a quest object
static java.lang.String[] QOBJS
          The list of basic quest objects defined in an iterative fashion during quest script execution
static java.lang.String[] ROOM_REFERENCE_QCODES
          the list of room-related mystery quest objects defined in an iterative fashion during quest script execution
static int SPAWN_ANY
          A quest spawn flag denoting that this quest attempts to spawn every step at once
static java.lang.String[] SPAWN_DESCS
          Descriptions of the several quest step spawn flags
static int SPAWN_FIRST
          A quest spawn flag denoting that this quest spawns only its first step
static int SPAWN_NO
          A quest spawn flag denoting that this quest does not spawn its steps
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BEAMWEAPON, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
 
Method Summary
 java.lang.String author()
          Returns the author of the quest
 void autostartup()
          After a quest is added to the list of quests, this method is called to put the quest into its initial wait state, and get it thread time.
 void declareWinner(java.lang.String mobName)
          Registers the given player name as having won this quest.
 java.lang.String displayName()
          Returns the friendly display name of the quest
 int duration()
          Returns the duration, in ticks of this quest.
 boolean enterDormantState()
          A dormant state is the state where a quest is no longer running, but is not, or has not yet, been scheduled to wait for another run time.
 java.lang.Object getDesignatedObject(java.lang.String named)
          From the given official quest variable name, it derives either an object or a vector of objects that reflect it.
 long getFlags()
          Returns flag bitmap
 int getObjectInUseIndex(java.lang.String name)
          Returns the index of a room, mob, or item of the given name in use by this quest.
 Item getQuestItem(int i)
          Returns the item in use by this quest at the given index
 int getQuestItemIndex(java.lang.String name)
          Returns the index of a item of the given name in use by this quest
 java.lang.String getQuestItemName(int i)
          Returns the name of the item in use by this quest at the given index
 MOB getQuestMob(int i)
          Returns the mob in use by this quest at the given index
 int getQuestMobIndex(java.lang.String name)
          Returns the index of a mob of the given name in use by this quest
 java.lang.String getQuestMobName(int i)
          Returns the name of the mob in use by this quest at the given index
 Room getQuestRoom(int i)
          Returns the room in use by this quest at the given index
 java.lang.String getQuestRoomID(int i)
          Returns the id of the room in use by this quest at the given index
 int getQuestRoomIndex(java.lang.String roomID)
          Returns the index of a room of the given id in use by this quest
 java.lang.StringBuffer getResourceFileData(java.lang.String named, boolean showErrors)
          Quest scripts can have files of various sorts embedded in them.
 int getSpawn()
          Returns the flag denoting whether this quest spawns new ones from its several steps and if so, by what method.
 java.util.Map<java.lang.String,java.lang.Long> getWinners()
          Returns the names of all the winners of this quest
 java.lang.String getWinnerStr()
          Returns a semicolon delimited string of all the winners of this quest
 void internalQuestDelete()
          If any files are embedded and cached inside this quest script, this method will clear them from resources and memory.
 boolean isCopy()
          Returns whether this quest object is a spawned copy
 boolean isObjectInUse(Environmental E)
          Returns whether the exact given object is in use by this quest.
 int minPlayers()
          The minimum number of players matching player criteria required before this quest will start
 int minsRemaining()
          Returns the number of minutes before this quest will go from a running state to a stopped state.
 int minWait()
          Returns the minimum number of ticks between attempts to run this quest.
 java.lang.String name()
          Returns the unique name of the quest
 java.lang.String playerMask()
          Returns the zappermask that determines who counts as an elligible player for the purposes of the minPlayer setting.
 void resetQuest(int firstPauseTicks)
          this will stop executing of the quest script.
 boolean resetWaitRemaining(long minusEllapsed)
          Sets the number of ticks before this quest will attempt to start.
 int runLevel()
          Returns the run level.
 boolean running()
          Returns whether this quest is in a running state
 void runtimeRegisterAbility(MOB mob, java.lang.String abilityID, java.lang.String parms, boolean give)
          they are called when you want the quest engine to be aware of a a quest-specific object thats being added to the map, so that it can be cleaned up later.
 void runtimeRegisterBehavior(PhysicalAgent behaving, java.lang.String behaviorID, java.lang.String parms, boolean give)
          Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later.
 void runtimeRegisterEffect(PhysicalAgent affected, java.lang.String abilityID, java.lang.String parms, boolean give)
          Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later.
 void runtimeRegisterObject(PhysicalAgent P)
          Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later.
 java.lang.String script()
          Returns the unparsed quest script as a single happy string.
 void setAuthor(java.lang.String newName)
          Sets the author of the quest
 void setCopy(boolean truefalse)
          Sets whether this quest object is a spawned copy
 void setDisplayName(java.lang.String newName)
          Sets the friendly display name of the quest
 void setDuration(int newTicks)
          Sets the duration, in ticks of this quest.
 void setFlags(long flags)
          Sets the flag bitmap
 void setMinPlayers(int players)
          Sets minimum number of players matching player criteria required before this quest will start
 void setMinWait(int wait)
          Sets the minimum number of ticks between attempts to run this quest.
 void setName(java.lang.String newName)
          Sets the unique name of the quest
 void setPlayerMask(java.lang.String mask)
          Sets the zappermask that determines who counts as an elligible player for the purposes of the minPlayer setting.
 void setRunLevel(int level)
          Sets the run level.
 boolean setScript(java.lang.String parm, boolean showErrors)
          Sets the quest script.
 void setSpawn(int spawnFlag)
          Sets the flag denoting whether this quest spawns new ones from its several steps and if so, by what method.
 void setStartDate(java.lang.String newName)
          Sets the real-life start date of this quest.
 void setStartMudDate(java.lang.String newName)
          Sets the in-game mud start date of this quest.
 void setSuspended(boolean truefalse)
          Sets whether this quest object is suspended.
 void setVars(java.util.List<?> script, int startAtLine)
          Accepts a pre-parsed quest script and extracts certain non-iterative variables, such as the quest name and similar variables.
 void setWaitInterval(int wait)
          Sets the maximum ticks, above the minimum wait, that must go by before an attempt to run a quest.
 void setWinners(java.lang.String list)
          Sets the list of player names that have won this quest
 java.lang.String startDate()
          Returns the unique start date of the quest.
 boolean startQuest()
          This will execute the quest script.
 boolean stepQuest()
          This method is called when a quest is done with a particular step in a multi-step quest.
 boolean stopping()
          Returns whether this quest is in a midway stopping state
 void stopQuest()
          this will stop executing of the quest script.
 boolean suspended()
          Returns whether this quest object is suspended.
 int ticksRemaining()
          Returns the number of ticks before this quest will go from a running state to a stopped state.
 boolean waiting()
          Returns whether this quest is in a wait state between runs
 int waitInterval()
          Returns the maximum ticks, above the minimum wait, that must go by before an attempt to run a quest.
 int waitRemaining()
          Returns the number of ticks before this quest will attempt to start.
 boolean wasWinner(java.lang.String name)
          Returns whether a player of the given name has won this quest
 java.lang.Long whenLastWon(java.lang.String name)
          Returns when a player of the given name last won this quest or null
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

SPAWN_NO

static final int SPAWN_NO
A quest spawn flag denoting that this quest does not spawn its steps

See Also:
Constant Field Values

SPAWN_FIRST

static final int SPAWN_FIRST
A quest spawn flag denoting that this quest spawns only its first step

See Also:
Constant Field Values

SPAWN_ANY

static final int SPAWN_ANY
A quest spawn flag denoting that this quest attempts to spawn every step at once

See Also:
Constant Field Values

SPAWN_DESCS

static final java.lang.String[] SPAWN_DESCS
Descriptions of the several quest step spawn flags


FLAG_SUSPENDED

static final int FLAG_SUSPENDED
A quest flag @see getFlags()

See Also:
Constant Field Values

QCODES

static final java.lang.String[] QCODES
The list of BASIC non-iterative variable codes that pertain to a quest object


QOBJS

static final java.lang.String[] QOBJS
The list of basic quest objects defined in an iterative fashion during quest script execution


MYSTERY_QCODES

static final java.lang.String[] MYSTERY_QCODES
The list of basic mystery quest objects defined in an iterative fashion during quest script execution


ROOM_REFERENCE_QCODES

static final java.lang.String[] ROOM_REFERENCE_QCODES
the list of room-related mystery quest objects defined in an iterative fashion during quest script execution

Method Detail

name

java.lang.String name()
Returns the unique name of the quest

Specified by:
name in interface CMObject
Specified by:
name in interface Tickable
Returns:
the unique name of the quest
See Also:
setName(String)

setName

void setName(java.lang.String newName)
Sets the unique name of the quest

Parameters:
newName - the unique name of the quest
See Also:
name()

author

java.lang.String author()
Returns the author of the quest

Returns:
the author of the quest
See Also:
setAuthor(String)

setAuthor

void setAuthor(java.lang.String newName)
Sets the author of the quest

Parameters:
newName - the author of the quest
See Also:
author()

displayName

java.lang.String displayName()
Returns the friendly display name of the quest

Returns:
the friendly display name of the quest
See Also:
setDisplayName(String)

setDisplayName

void setDisplayName(java.lang.String newName)
Sets the friendly display name of the quest

Parameters:
newName - the friendly display name of the quest
See Also:
displayName()

startDate

java.lang.String startDate()
Returns the unique start date of the quest. The format is either MONTH-DAY for real life dates, or MUDDAY MONTH-DAY for mudday based dates.

Returns:
the unique formatted start date of the quest
See Also:
setStartDate(String), setStartMudDate(String)

setStartDate

void setStartDate(java.lang.String newName)
Sets the real-life start date of this quest. The format is MONTH-DAY.

Parameters:
newName - the real-life start date of this quest
See Also:
startDate(), setStartMudDate(String)

setStartMudDate

void setStartMudDate(java.lang.String newName)
Sets the in-game mud start date of this quest. The format is MONTH-DAY.

Parameters:
newName - the in-game mud start date of this quest
See Also:
startDate(), setStartDate(String)

duration

int duration()
Returns the duration, in ticks of this quest. A value of 0 means the quest runs indefinitely.

Returns:
the duration, in ticks, of this quest
See Also:
setDuration(int)

setDuration

void setDuration(int newTicks)
Sets the duration, in ticks of this quest. A value of 0 means the quest runs indefinitely.

Parameters:
newTicks - the duration, in ticks, of this quest
See Also:
duration()

suspended

boolean suspended()
Returns whether this quest object is suspended. A suspended quest is always in a stopped state.

Returns:
true if this quest object is suspended
See Also:
setSuspended(boolean)

setSuspended

void setSuspended(boolean truefalse)
Sets whether this quest object is suspended. A suspended quest should always in a stopped state.

Parameters:
truefalse - true if this quest object is suspended
See Also:
suspended()

setScript

boolean setScript(java.lang.String parm,
                  boolean showErrors)
Sets the quest script. This may be semicolon-separated instructions, or a LOAD command followed by the quest script path.

Parameters:
parm - the actual quest script
showErrors - true to report file errors, false otherwise
Returns:
true
See Also:
script()

setVars

void setVars(java.util.List<?> script,
             int startAtLine)
Accepts a pre-parsed quest script and extracts certain non-iterative variables, such as the quest name and similar variables.

Parameters:
script - the parsed quest script
startAtLine - which line of the script to start at
See Also:
Quest

script

java.lang.String script()
Returns the unparsed quest script as a single happy string.

Returns:
the unparsed quest script as a single happy string.
See Also:
setScript(String, boolean)

startQuest

boolean startQuest()
This will execute the quest script. If the quest is running, it will call stopQuest first to shut it down. It will spawn its subquests and subsections if necessary.

Returns:
whether the quest was successfully started
See Also:
resetQuest(int), stepQuest(), stopQuest()

stopQuest

void stopQuest()
this will stop executing of the quest script. It will clean up any objects or mobs which may have been loaded, restoring map mobs to their previous state. If the quest is autorandom, it will restart the waiting process

See Also:
startQuest(), stepQuest(), resetQuest(int)

resetQuest

void resetQuest(int firstPauseTicks)
this will stop executing of the quest script. It will clean up any objects or mobs which may have been loaded, restoring map mobs to their previous state. It will then enter a stopped-paused state for the given ticks. Any start failures after that will cause the pause time to be doubled before the next try.

Parameters:
firstPauseTicks - ticks to remain in stopped state before restarting
See Also:
startQuest(), stepQuest(), stopQuest()

internalQuestDelete

void internalQuestDelete()
If any files are embedded and cached inside this quest script, this method will clear them from resources and memory.


stepQuest

boolean stepQuest()
This method is called when a quest is done with a particular step in a multi-step quest. This method will clean up any objects from the current step or previous steps and attempt to start up the next step in the quest. If there are no more steps, or the quest is only 1 step, stopQuest() will be called.

Returns:
true if another step was started, false otherwise
See Also:
startQuest(), stopQuest()

enterDormantState

boolean enterDormantState()
A dormant state is the state where a quest is no longer running, but is not, or has not yet, been scheduled to wait for another run time. This may result in a quest being deleted if it was a spawned temporary quest.

Returns:
true if it is in a dormant state, or false if quest was deleted

setCopy

void setCopy(boolean truefalse)
Sets whether this quest object is a spawned copy

Parameters:
truefalse - true if this quest object is a spawned copy
See Also:
isCopy()

isCopy

boolean isCopy()
Returns whether this quest object is a spawned copy

Returns:
whether this quest object is a spawned copy
See Also:
setCopy(boolean)

setSpawn

void setSpawn(int spawnFlag)
Sets the flag denoting whether this quest spawns new ones from its several steps and if so, by what method.

Parameters:
spawnFlag - the quest spawn flag info
See Also:
SPAWN_ANY, SPAWN_FIRST, SPAWN_NO, SPAWN_DESCS, getSpawn()

getSpawn

int getSpawn()
Returns the flag denoting whether this quest spawns new ones from its several steps and if so, by what method.

Returns:
the quest spawn flag info
See Also:
SPAWN_ANY, SPAWN_FIRST, SPAWN_NO, SPAWN_DESCS, setSpawn(int)

getResourceFileData

java.lang.StringBuffer getResourceFileData(java.lang.String named,
                                           boolean showErrors)
Quest scripts can have files of various sorts embedded in them. This method will return the text of any such files of the given name, if they were embedded, or if not, it will attempt to open the file in the filesystem and return that one instead.

Parameters:
named - the name of the resource path file to return
showErrors - true to report file errors, false otherwise
Returns:
the text of the file, if found.
See Also:
Quest

getObjectInUseIndex

int getObjectInUseIndex(java.lang.String name)
Returns the index of a room, mob, or item of the given name in use by this quest.

Parameters:
name - the given name
Returns:
the index of a room, mob, or item of the given name
See Also:
isObjectInUse(Environmental)

isObjectInUse

boolean isObjectInUse(Environmental E)
Returns whether the exact given object is in use by this quest.

Parameters:
E - the object to check
Returns:
true if its in use, false otherwise
See Also:
getObjectInUseIndex(String)

getDesignatedObject

java.lang.Object getDesignatedObject(java.lang.String named)
From the given official quest variable name, it derives either an object or a vector of objects that reflect it.

Parameters:
named - the code to return a string, object, or vector for
Returns:
a string, mob, item, room, vector, etc..
See Also:
QOBJS

getQuestMobIndex

int getQuestMobIndex(java.lang.String name)
Returns the index of a mob of the given name in use by this quest

Parameters:
name - the given name
Returns:
the index of a mob of the given name in use by this quest
See Also:
getQuestMobName(int), getQuestMob(int)

getQuestMob

MOB getQuestMob(int i)
Returns the mob in use by this quest at the given index

Parameters:
i - the index
Returns:
the mob in use by this quest at the given index
See Also:
getQuestMobName(int), getQuestMobIndex(String)

getQuestMobName

java.lang.String getQuestMobName(int i)
Returns the name of the mob in use by this quest at the given index

Parameters:
i - the index
Returns:
the name of the mob in use by this quest at the given index
See Also:
getQuestMob(int), getQuestMobIndex(String)

getQuestItemIndex

int getQuestItemIndex(java.lang.String name)
Returns the index of a item of the given name in use by this quest

Parameters:
name - the given name
Returns:
the index of a item of the given name in use by this quest
See Also:
getQuestItem(int), getQuestItemName(int)

getQuestItem

Item getQuestItem(int i)
Returns the item in use by this quest at the given index

Parameters:
i - the index
Returns:
the item in use by this quest at the given index
See Also:
getQuestItemIndex(String), getQuestItemName(int)

getQuestItemName

java.lang.String getQuestItemName(int i)
Returns the name of the item in use by this quest at the given index

Parameters:
i - the index
Returns:
the name of the item in use by this quest at the given index
See Also:
getQuestItem(int), getQuestItemIndex(String)

getQuestRoomIndex

int getQuestRoomIndex(java.lang.String roomID)
Returns the index of a room of the given id in use by this quest

Parameters:
roomID - the given room id
Returns:
the index of a room of the given id in use by this quest
See Also:
getQuestRoom(int), getQuestRoomID(int)

getQuestRoom

Room getQuestRoom(int i)
Returns the room in use by this quest at the given index

Parameters:
i - the index
Returns:
the room in use by this quest at the given index
See Also:
getQuestRoomIndex(String), getQuestRoomID(int)

getQuestRoomID

java.lang.String getQuestRoomID(int i)
Returns the id of the room in use by this quest at the given index

Parameters:
i - the index
Returns:
the id of the room in use by this quest at the given index
See Also:
getQuestRoom(int), getQuestRoomIndex(String)

runtimeRegisterAbility

void runtimeRegisterAbility(MOB mob,
                            java.lang.String abilityID,
                            java.lang.String parms,
                            boolean give)
they are called when you want the quest engine to be aware of a a quest-specific object thats being added to the map, so that it can be cleaned up later. Ditto for abilities, affects, and behaviors. this method should only be used WHILE a quest script is being interpreted

Parameters:
mob - the mob receiving the ability
abilityID - the id of the ability
parms - any ability parameters
give - false to remove this ability, true to replace an existing one
See Also:
runtimeRegisterBehavior(PhysicalAgent, String, String, boolean), runtimeRegisterEffect(PhysicalAgent, String, String, boolean), runtimeRegisterObject(PhysicalAgent)

runtimeRegisterObject

void runtimeRegisterObject(PhysicalAgent P)
Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later. this method should only be used WHILE a quest script is being interpreted

Parameters:
P - the object added to the map
See Also:
runtimeRegisterAbility(MOB, String, String, boolean), runtimeRegisterBehavior(PhysicalAgent, String, String, boolean), runtimeRegisterEffect(PhysicalAgent, String, String, boolean), Quest

runtimeRegisterEffect

void runtimeRegisterEffect(PhysicalAgent affected,
                           java.lang.String abilityID,
                           java.lang.String parms,
                           boolean give)
Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later. This is called to add an effect to the given object. this method should only be used WHILE a quest script is being interpreted

Parameters:
affected - the object receiving the effect
abilityID - the id of the effect
parms - any effect parameters
give - false to remove this effect, true to replace an existing one
See Also:
runtimeRegisterAbility(MOB, String, String, boolean), runtimeRegisterBehavior(PhysicalAgent, String, String, boolean), runtimeRegisterObject(PhysicalAgent)

runtimeRegisterBehavior

void runtimeRegisterBehavior(PhysicalAgent behaving,
                             java.lang.String behaviorID,
                             java.lang.String parms,
                             boolean give)
Called when you want the quest engine to be aware of a quest specific object that is being added to the map, so that it can be cleaned up later. This is called to add a behavior to the given object. this method should only be used WHILE a quest script is being interpreted

Parameters:
behaving - the object receiving the behavior
behaviorID - the id of the behavior
parms - any behavior parameters
give - false to remove this behavior, true to replace an existing one
See Also:
runtimeRegisterAbility(MOB, String, String, boolean), runtimeRegisterEffect(PhysicalAgent, String, String, boolean), runtimeRegisterObject(PhysicalAgent)

declareWinner

void declareWinner(java.lang.String mobName)
Registers the given player name as having won this quest. The name may be prefixed with a "-" to undeclare the winner (for player deletes).

Parameters:
mobName - the player name
See Also:
getWinners(), getWinnerStr(), wasWinner(String), setWinners(String), whenLastWon(String)

getWinners

java.util.Map<java.lang.String,java.lang.Long> getWinners()
Returns the names of all the winners of this quest

Returns:
the names of all the winners of this quest and last time won
See Also:
declareWinner(String), getWinnerStr(), wasWinner(String), setWinners(String), whenLastWon(String)

getWinnerStr

java.lang.String getWinnerStr()
Returns a semicolon delimited string of all the winners of this quest

Returns:
a semicolon delimited string of all the winners of this quest
See Also:
declareWinner(String), getWinners(), wasWinner(String), setWinners(String), whenLastWon(String)

wasWinner

boolean wasWinner(java.lang.String name)
Returns whether a player of the given name has won this quest

Parameters:
name - the player name
Returns:
true if a player of the given name has won this quest
See Also:
declareWinner(String), getWinners(), getWinnerStr(), setWinners(String), whenLastWon(String)

whenLastWon

java.lang.Long whenLastWon(java.lang.String name)
Returns when a player of the given name last won this quest or null

Parameters:
name - the player name
Returns:
true if a player of the given name has won this quest
See Also:
declareWinner(String), getWinners(), getWinnerStr(), setWinners(String), wasWinner(String)

setWinners

void setWinners(java.lang.String list)
Sets the list of player names that have won this quest

Parameters:
list - a semicolon delimtied list of player names
See Also:
declareWinner(String), getWinners(), getWinnerStr(), wasWinner(String)

minPlayers

int minPlayers()
The minimum number of players matching player criteria required before this quest will start

Returns:
minimum number of players matching player criteria required
See Also:
setMinPlayers(int), playerMask(), setPlayerMask(String)

setMinPlayers

void setMinPlayers(int players)
Sets minimum number of players matching player criteria required before this quest will start

Parameters:
players - minimum number of players matching player criteria required
See Also:
minPlayers(), playerMask(), setPlayerMask(String)

runLevel

int runLevel()
Returns the run level. -1 means runs always, otherwise, this quest will always defer to running quests of equal or lower run level. Higher, therefore, is weaker.

Returns:
the run level. -1 means runs always
See Also:
setRunLevel(int)

setRunLevel

void setRunLevel(int level)
Sets the run level. -1 means runs always, otherwise, this quest will always defer to running quests of equal or lower run level. Higher, therefore, is weaker.

Parameters:
level - the run level. -1 means runs always
See Also:
runLevel()

playerMask

java.lang.String playerMask()
Returns the zappermask that determines who counts as an elligible player for the purposes of the minPlayer setting.

Returns:
the zappermask that determines who counts as a player
See Also:
MaskingLibrary, setMinPlayers(int), minPlayers(), setPlayerMask(String)

setPlayerMask

void setPlayerMask(java.lang.String mask)
Sets the zappermask that determines who counts as an elligible player for the purposes of the minPlayer setting.

Parameters:
mask - the zappermask that determines who counts as a player
See Also:
MaskingLibrary, setMinPlayers(int), minPlayers(), playerMask()

minWait

int minWait()
Returns the minimum number of ticks between attempts to run this quest.

Returns:
the minimum number of ticks between attempts to run this quest.
See Also:
setMinWait(int), waitInterval(), setWaitInterval(int)

setMinWait

void setMinWait(int wait)
Sets the minimum number of ticks between attempts to run this quest.

Parameters:
wait - the minimum number of ticks between attempts to run this quest.
See Also:
minWait(), waitInterval(), setWaitInterval(int)

waitInterval

int waitInterval()
Returns the maximum ticks, above the minimum wait, that must go by before an attempt to run a quest. This is therefore, the random part.

Returns:
the maximum ticks, above the minimum wait, that must go by
See Also:
setMinWait(int), minWait(), setWaitInterval(int)

setWaitInterval

void setWaitInterval(int wait)
Sets the maximum ticks, above the minimum wait, that must go by before an attempt to run a quest. This is therefore, the random part.

Parameters:
wait - the maximum ticks, above the minimum wait, that must go by
See Also:
setMinWait(int), minWait(), waitInterval()

autostartup

void autostartup()
After a quest is added to the list of quests, this method is called to put the quest into its initial wait state, and get it thread time.


running

boolean running()
Returns whether this quest is in a running state

Returns:
true if the quest is running, false if stopped
See Also:
suspended(), waiting(), startQuest()

stopping

boolean stopping()
Returns whether this quest is in a midway stopping state

Returns:
true if the quest is in the processess of stopping
See Also:
suspended(), waiting(), running(), stopQuest()

waiting

boolean waiting()
Returns whether this quest is in a wait state between runs

Returns:
true if this quest is in a wait state between runs
See Also:
suspended(), waiting(), running(), stopQuest()

ticksRemaining

int ticksRemaining()
Returns the number of ticks before this quest will go from a running state to a stopped state.

Returns:
the numer of ticks the quest will keep running
See Also:
minsRemaining(), startQuest()

minsRemaining

int minsRemaining()
Returns the number of minutes before this quest will go from a running state to a stopped state.

Returns:
the numer of minutes the quest will keep running
See Also:
ticksRemaining(), startQuest()

waitRemaining

int waitRemaining()
Returns the number of ticks before this quest will attempt to start. A number greater than or equal to 0 means the quest is currently in a stopped state.

Returns:
the number of ticks before this quest will attempt to start.
See Also:
resetWaitRemaining(long)

resetWaitRemaining

boolean resetWaitRemaining(long minusEllapsed)
Sets the number of ticks before this quest will attempt to start. A number greater than or equal to 0 means the quest is currently in a stopped state.

Parameters:
minusEllapsed - the number of miliseconds already ellapsed before wait began
Returns:
true if the quest is successfully put into a non-running wait state
See Also:
waitRemaining()

getFlags

long getFlags()
Returns flag bitmap

Returns:
the flag bitmap
See Also:
FLAG_SUSPENDED

setFlags

void setFlags(long flags)
Sets the flag bitmap

Parameters:
flags - the flag bitmap
See Also:
FLAG_SUSPENDED