java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Modifiable, TickableDefaultQuestpublic interface Quest extends Tickable, CMCommon, Modifiable
QuestManager| Modifier and Type | Interface | Description |
|---|---|---|
static class |
Quest.MYSTERY_QCODES |
The list of basic mystery quest objects defined in an iterative fashion during quest script execution
|
static class |
Quest.QCODES |
The list of BASIC non-iterative variable codes that pertain to a quest object
|
static class |
Quest.QOBJS |
The list of basic quest objects defined in an iterative fashion during quest script execution
|
static class |
Quest.QuestScript |
A Quest script contains strings, and options, which
are mini-quest scripts of strings.
|
static class |
Quest.Spawn |
Quest step spawning options
|
| Modifier and Type | Field | Description |
|---|---|---|
static int |
FLAG_SUSPENDED |
A quest flag @see
getFlags() |
static java.lang.String[] |
ROOM_REFERENCE_QCODES |
the list of room-related mystery quest objects defined in an iterative fashion during quest script execution
|
idConverterSTATUS_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_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, 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_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET| Modifier and Type | Method | Description |
|---|---|---|
void |
acceptQuest(MOB mob) |
Causes the given mob to accept the quest.
|
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.
|
boolean |
canAcceptQuest(MOB mob) |
Returns whether the given mob can accept this quest.
|
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
|
java.lang.String |
getLastErrors() |
If errors occured on the last start of this quest, this will
return those messages.
|
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
|
java.lang.String |
instructions() |
Returns the friendly third person instructions of the 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
eligible player for the purposes of the minPlayer setting.
|
java.lang.String |
questCategory() |
Returns the descriptive 'category' of the quest.
|
java.lang.String |
questTypeDesc() |
Returns the descriptive 'type' of the quest.
|
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 |
setInstructions(java.lang.String instructions) |
Sets the friendly third person instructions of the quest
|
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
eligible player for the purposes of the minPlayer setting.
|
void |
setQuestCategory(java.lang.String newCat) |
Sets the descriptive 'category' of the quest.
|
boolean |
setQuestStep(int stepNum) |
This is a utility method that will stop the current running
quest step, if necessary, and clean it up.
|
void |
setQuestTypeDesc(java.lang.String newType) |
Sets the descriptive 'type' of the quest.
|
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
|
copyOf, ID, initializeClass, newInstancegetSaveStatIndex, getStat, getStatCodes, isStat, setStatgetTickStatus, tickstatic final int FLAG_SUSPENDED
getFlags()static final java.lang.String[] ROOM_REFERENCE_QCODES
java.lang.String name()
name in interface CMObjectname in interface TickablesetName(String)void setName(java.lang.String newName)
newName - the unique name of the questname()java.lang.String author()
setAuthor(String)void setAuthor(java.lang.String newName)
newName - the author of the questauthor()java.lang.String questTypeDesc()
setQuestTypeDesc(String)void setQuestTypeDesc(java.lang.String newType)
newType - the descriptive type of the questquestTypeDesc()java.lang.String questCategory()
setQuestCategory(String)void setQuestCategory(java.lang.String newCat)
newCat - the descriptive type of the questquestCategory()java.lang.String displayName()
setDisplayName(String)void setDisplayName(java.lang.String newName)
newName - the friendly display name of the questdisplayName()java.lang.String instructions()
setInstructions(String)void setInstructions(java.lang.String instructions)
instructions - the friendly third person instructions of the questinstructions()boolean canAcceptQuest(MOB mob)
mob - the mob to checkacceptQuest(MOB)void acceptQuest(MOB mob)
mob - the mob to acceptcanAcceptQuest(MOB)java.lang.String startDate()
setStartDate(String),
setStartMudDate(String)void setStartDate(java.lang.String newName)
newName - the real-life start date of this queststartDate(),
setStartMudDate(String)void setStartMudDate(java.lang.String newName)
newName - the in-game mud start date of this queststartDate(),
setStartDate(String)int duration()
setDuration(int)void setDuration(int newTicks)
newTicks - the duration, in ticks, of this questduration()boolean suspended()
setSuspended(boolean)void setSuspended(boolean truefalse)
truefalse - true if this quest object is suspendedsuspended()boolean setScript(java.lang.String parm,
boolean showErrors)
parm - the actual quest scriptshowErrors - true to report file errors, false otherwisescript()void setVars(java.util.List<?> script,
int startAtLine)
script - the parsed quest scriptstartAtLine - which line of the script to start atQuestjava.lang.String script()
setScript(String, boolean)boolean startQuest()
resetQuest(int),
stepQuest(),
stopQuest()void stopQuest()
startQuest(),
stepQuest(),
resetQuest(int)void resetQuest(int firstPauseTicks)
firstPauseTicks - ticks to remain in stopped state before restartingstartQuest(),
stepQuest(),
stopQuest()void internalQuestDelete()
boolean stepQuest()
startQuest(),
stopQuest()boolean setQuestStep(int stepNum)
stepNum - the step number 1...nboolean enterDormantState()
void setCopy(boolean truefalse)
truefalse - true if this quest object is a spawned copyisCopy()boolean isCopy()
setCopy(boolean)void setSpawn(int spawnFlag)
spawnFlag - the quest spawn flag infoQuest.Spawn,
getSpawn()int getSpawn()
Quest.Spawn,
setSpawn(int)java.lang.StringBuffer getResourceFileData(java.lang.String named,
boolean showErrors)
named - the name of the resource path file to returnshowErrors - true to report file errors, false otherwiseQuestint getObjectInUseIndex(java.lang.String name)
name - the given nameisObjectInUse(Environmental)boolean isObjectInUse(Environmental E)
E - the object to checkgetObjectInUseIndex(String)java.lang.Object getDesignatedObject(java.lang.String named)
Quest.QCODESnamed - the code to return a string, object, or vector forint getQuestMobIndex(java.lang.String name)
name - the given namegetQuestMobName(int),
getQuestMob(int)MOB getQuestMob(int i)
i - the indexgetQuestMobName(int),
getQuestMobIndex(String)java.lang.String getQuestMobName(int i)
i - the indexgetQuestMob(int),
getQuestMobIndex(String)int getQuestItemIndex(java.lang.String name)
name - the given namegetQuestItem(int),
getQuestItemName(int)Item getQuestItem(int i)
i - the indexgetQuestItemIndex(String),
getQuestItemName(int)java.lang.String getQuestItemName(int i)
i - the indexgetQuestItem(int),
getQuestItemIndex(String)int getQuestRoomIndex(java.lang.String roomID)
roomID - the given room idgetQuestRoom(int),
getQuestRoomID(int)Room getQuestRoom(int i)
i - the indexgetQuestRoomIndex(String),
getQuestRoomID(int)java.lang.String getQuestRoomID(int i)
i - the indexgetQuestRoom(int),
getQuestRoomIndex(String)void runtimeRegisterAbility(MOB mob, java.lang.String abilityID, java.lang.String parms, boolean give)
mob - the mob receiving the abilityabilityID - the id of the abilityparms - any ability parametersgive - false to remove this ability, true to replace an existing oneruntimeRegisterBehavior(PhysicalAgent, String, String, boolean),
runtimeRegisterEffect(PhysicalAgent, String, String, boolean),
runtimeRegisterObject(PhysicalAgent)void runtimeRegisterObject(PhysicalAgent P)
P - the object added to the mapruntimeRegisterAbility(MOB, String, String, boolean),
runtimeRegisterBehavior(PhysicalAgent, String, String, boolean),
runtimeRegisterEffect(PhysicalAgent, String, String, boolean),
Questvoid runtimeRegisterEffect(PhysicalAgent affected, java.lang.String abilityID, java.lang.String parms, boolean give)
affected - the object receiving the effectabilityID - the id of the effectparms - any effect parametersgive - false to remove this effect, true to replace an existing oneruntimeRegisterAbility(MOB, String, String, boolean),
runtimeRegisterBehavior(PhysicalAgent, String, String, boolean),
runtimeRegisterObject(PhysicalAgent)void runtimeRegisterBehavior(PhysicalAgent behaving, java.lang.String behaviorID, java.lang.String parms, boolean give)
behaving - the object receiving the behaviorbehaviorID - the id of the behaviorparms - any behavior parametersgive - false to remove this behavior, true to replace an existing oneruntimeRegisterAbility(MOB, String, String, boolean),
runtimeRegisterEffect(PhysicalAgent, String, String, boolean),
runtimeRegisterObject(PhysicalAgent)void declareWinner(java.lang.String mobName)
mobName - the player namegetWinners(),
getWinnerStr(),
wasWinner(String),
setWinners(String),
whenLastWon(String)java.util.Map<java.lang.String,java.lang.Long> getWinners()
declareWinner(String),
getWinnerStr(),
wasWinner(String),
setWinners(String),
whenLastWon(String)java.lang.String getWinnerStr()
declareWinner(String),
getWinners(),
wasWinner(String),
setWinners(String),
whenLastWon(String)boolean wasWinner(java.lang.String name)
name - the player namedeclareWinner(String),
getWinners(),
getWinnerStr(),
setWinners(String),
whenLastWon(String)java.lang.Long whenLastWon(java.lang.String name)
name - the player namedeclareWinner(String),
getWinners(),
getWinnerStr(),
setWinners(String),
wasWinner(String)void setWinners(java.lang.String list)
list - a semicolon delimtied list of player namesdeclareWinner(String),
getWinners(),
getWinnerStr(),
wasWinner(String)int minPlayers()
setMinPlayers(int),
playerMask(),
setPlayerMask(String)void setMinPlayers(int players)
players - minimum number of players matching player criteria requiredminPlayers(),
playerMask(),
setPlayerMask(String)int runLevel()
setRunLevel(int)void setRunLevel(int level)
level - the run level. -1 means runs alwaysrunLevel()java.lang.String playerMask()
MaskingLibrary,
setMinPlayers(int),
minPlayers(),
setPlayerMask(String)void setPlayerMask(java.lang.String mask)
mask - the zappermask that determines who counts as a playerMaskingLibrary,
setMinPlayers(int),
minPlayers(),
playerMask()int minWait()
setMinWait(int),
waitInterval(),
setWaitInterval(int)void setMinWait(int wait)
wait - the minimum number of ticks between attempts to run this quest.minWait(),
waitInterval(),
setWaitInterval(int)int waitInterval()
setMinWait(int),
minWait(),
setWaitInterval(int)void setWaitInterval(int wait)
wait - the maximum ticks, above the minimum wait, that must go bysetMinWait(int),
minWait(),
waitInterval()void autostartup()
boolean running()
suspended(),
waiting(),
startQuest()boolean stopping()
suspended(),
waiting(),
running(),
stopQuest()boolean waiting()
suspended(),
waiting(),
running(),
stopQuest()int ticksRemaining()
minsRemaining(),
startQuest()int minsRemaining()
ticksRemaining(),
startQuest()int waitRemaining()
resetWaitRemaining(long)boolean resetWaitRemaining(long minusEllapsed)
minusEllapsed - the number of miliseconds already ellapsed before wait beganwaitRemaining()long getFlags()
FLAG_SUSPENDEDvoid setFlags(long flags)
flags - the flag bitmapFLAG_SUSPENDEDjava.lang.String getLastErrors()