Modifier and Type | Class | Description |
---|---|---|
protected static class |
DefaultQuest.JScriptQuest |
|
static class |
DefaultQuest.MysteryData |
MysteryData is a helper class for QuestState that stores quest
state variables for the parsing of quests that make use of the
"mystery" variables (mystery as in Sherlock Holmes, not as in
unknown).
|
static class |
DefaultQuest.PreservedQuestObject |
Objects selected for use by a quest can be preserved or released from
quest-state to quest-state.
|
static class |
DefaultQuest.QuestState |
A quest state class maps the parse-state of a quest, since quest parsing
is highly state dependent, but the state is not explicit in the script itself.
|
Quest.MYSTERY_QCODES, Quest.QCODES, Quest.QOBJS, Quest.QuestScript, Quest.Spawn
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
author |
|
protected java.lang.String |
category |
|
protected static java.lang.String[] |
CCODES |
|
protected ScriptingEngine |
checkAcceptEng |
|
protected Behavable |
checkAcceptHost |
|
protected java.lang.String |
displayName |
|
protected boolean |
durable |
|
protected int |
duration |
|
protected boolean |
expires |
|
protected static java.util.concurrent.atomic.AtomicInteger |
globalParseId |
|
protected java.lang.String |
instructions |
|
DVector |
internalFiles |
|
protected long |
lastStartDateTime |
|
protected int |
maxWait |
|
protected int |
minPlayers |
|
protected int |
minWait |
|
protected java.lang.String |
name |
|
protected java.lang.Object[] |
objs |
|
protected int |
parseId |
|
protected java.lang.String |
playerMask |
|
protected java.lang.String |
questType |
|
protected java.lang.String |
rawScriptParameter |
|
protected int |
runLevel |
|
protected int |
spawn |
|
protected java.lang.String |
startDate |
|
protected java.util.Map<java.lang.String,java.lang.Long> |
stepEllapsedTimes |
|
protected int |
ticksRemaining |
|
protected int |
waitRemaining |
|
protected java.util.Map<java.lang.String,java.lang.Long> |
winners |
idConverter
FLAG_SUSPENDED, ROOM_REFERENCE_QCODES
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_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
Constructor | Description |
---|---|
DefaultQuest() |
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.
|
protected java.lang.String |
breakOutMaskString(java.lang.String s,
java.util.List<java.lang.String> p) |
|
boolean |
canAcceptQuest(MOB mob) |
Returns whether the given mob can accept this quest.
|
protected void |
cleanQuestStep(int preserveSkip) |
|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
void |
declareWinner(java.lang.String name) |
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.
|
protected ScriptingEngine |
ensureEngine() |
|
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.
|
void |
enterRunningState() |
|
protected void |
errorOccurred(DefaultQuest.QuestState q,
boolean quietFlag,
java.lang.String msg) |
|
protected void |
filterOutThoseInUse(java.util.List<? extends Environmental> choices,
java.lang.String choicesStr,
DefaultQuest.QuestState q,
boolean isQuiet,
boolean reselect) |
|
protected Ability |
findQuestAbility(java.lang.String abilityID) |
|
protected int |
getCodeNum(java.lang.String code) |
|
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.
|
protected int |
getLineNumberForStep(int stepNum) |
|
Quest |
getMainQuestObject() |
|
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
|
Environmental |
getQuestThing(java.util.Iterator<? extends Environmental> e,
int dex,
CMClass.CMObjectType type,
int[] num) |
|
int |
getQuestThingIndex(java.util.Iterator<? extends Environmental> i,
java.lang.String name,
CMClass.CMObjectType type,
int[] num) |
|
java.lang.StringBuffer |
getResourceFileData(java.lang.String named,
boolean showErrors) |
Quest scripts can have files of various sorts embedded
in them.
|
int |
getSaveStatIndex() |
Returns the index into the stat codes array where extra savable fields begins.
|
int |
getSpawn() |
Returns the flag denoting whether this quest spawns new ones
from its several steps and if so, by what method.
|
java.lang.String |
getStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
java.lang.String[] |
getStatCodes() |
Returns an array of the string names of those fields which are modifiable on this object at run-time by
builders.
|
int |
getTickStatus() |
A coded status for this object during the period where
its tick method is being called.
|
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 |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
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.
|
boolean |
isStat(java.lang.String code) |
An alternative means of retreiving the values of those fields on this object which are modifiable at
run-time by builders.
|
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
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
protected java.util.List<java.lang.String> |
parseFinalQuestScript(java.util.List<?> script) |
|
java.util.List<java.lang.Object> |
parseLoadScripts(java.lang.String text,
java.util.List<?> oldArgs,
java.util.List<java.lang.Object> args,
boolean showErrors) |
|
void |
parseQuestScript(java.util.List<?> script,
java.util.List<java.lang.Object> args,
int startLine) |
|
void |
parseQuestScriptWArgs(java.util.List<?> script,
java.util.List<java.lang.Object> args) |
|
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 ellapsedTime) |
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.
|
void |
runtimeRegisterStat(Environmental E,
java.lang.String stat,
java.lang.String parms,
boolean give) |
|
boolean |
sameAs(DefaultQuest E) |
|
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 newDate) |
Sets the real-life start date of this quest.
|
void |
setStartMudDate(java.lang.String newDate) |
Sets the in-game mud start date of this quest.
|
void |
setStat(java.lang.String code,
java.lang.String val) |
An alternative means of setting the values of those fields on this object which are modifiable at
run-time by builders.
|
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
|
boolean |
spawnQuest(java.lang.String script,
java.util.List<?> baseVars,
boolean reTime,
boolean onceOnly) |
|
java.lang.String |
startDate() |
Returns the unique start date of the quest.
|
boolean |
startQuest() |
This will execute the quest script.
|
boolean |
startQuestInternal() |
|
protected boolean |
startQuestOnTime() |
|
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.
|
void |
stopQuestInternal() |
|
boolean |
suspended() |
Returns whether this quest object is suspended.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
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
|
protected java.lang.String name
protected java.lang.String author
protected java.lang.String displayName
protected java.lang.String startDate
protected java.lang.String questType
protected java.lang.String category
protected java.lang.String instructions
protected int duration
protected boolean expires
protected java.lang.String rawScriptParameter
protected boolean durable
protected int minWait
protected int minPlayers
protected java.lang.String playerMask
protected int runLevel
protected int maxWait
protected int waitRemaining
protected int ticksRemaining
protected long lastStartDateTime
protected int spawn
public DVector internalFiles
protected final java.util.Map<java.lang.String,java.lang.Long> stepEllapsedTimes
protected final java.util.Map<java.lang.String,java.lang.Long> winners
protected volatile Behavable checkAcceptHost
protected volatile ScriptingEngine checkAcceptEng
protected final java.lang.Object[] objs
protected volatile int parseId
protected static final java.util.concurrent.atomic.AtomicInteger globalParseId
protected static java.lang.String[] CCODES
public java.lang.String ID()
CMObject
public java.lang.String name()
Quest
public void setName(java.lang.String newName)
Quest
setName
in interface Quest
newName
- the unique name of the questQuest.name()
public java.lang.String author()
Quest
author
in interface Quest
Quest.setAuthor(String)
public void setAuthor(java.lang.String newName)
Quest
setAuthor
in interface Quest
newName
- the author of the questQuest.author()
public java.lang.String displayName()
Quest
displayName
in interface Quest
Quest.setDisplayName(String)
public void setDisplayName(java.lang.String newName)
Quest
setDisplayName
in interface Quest
newName
- the friendly display name of the questQuest.displayName()
public java.lang.String instructions()
Quest
instructions
in interface Quest
Quest.setInstructions(String)
public void setInstructions(java.lang.String instructions)
Quest
setInstructions
in interface Quest
instructions
- the friendly third person instructions of the questQuest.instructions()
public java.lang.String questTypeDesc()
Quest
questTypeDesc
in interface Quest
Quest.setQuestTypeDesc(String)
public void setQuestTypeDesc(java.lang.String newType)
Quest
setQuestTypeDesc
in interface Quest
newType
- the descriptive type of the questQuest.questTypeDesc()
public java.lang.String questCategory()
Quest
questCategory
in interface Quest
Quest.setQuestCategory(String)
public void setQuestCategory(java.lang.String newCat)
Quest
setQuestCategory
in interface Quest
newCat
- the descriptive type of the questQuest.questCategory()
protected ScriptingEngine ensureEngine()
public boolean canAcceptQuest(MOB mob)
Quest
canAcceptQuest
in interface Quest
mob
- the mob to checkQuest.acceptQuest(MOB)
public void acceptQuest(MOB mob)
Quest
acceptQuest
in interface Quest
mob
- the mob to acceptQuest.canAcceptQuest(MOB)
public CMObject copyOf()
CMObject
public boolean suspended()
Quest
suspended
in interface Quest
Quest.setSuspended(boolean)
public void setSuspended(boolean truefalse)
Quest
setSuspended
in interface Quest
truefalse
- true if this quest object is suspendedQuest.suspended()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public java.lang.Object getDesignatedObject(java.lang.String named)
Quest
Quest.QCODES
getDesignatedObject
in interface Quest
named
- the code to return a string, object, or vector forpublic void internalQuestDelete()
Quest
internalQuestDelete
in interface Quest
public java.lang.String startDate()
Quest
startDate
in interface Quest
Quest.setStartDate(String)
,
Quest.setStartMudDate(String)
public void setStartDate(java.lang.String newDate)
Quest
setStartDate
in interface Quest
newDate
- the real-life start date of this questQuest.startDate()
,
Quest.setStartMudDate(String)
public void setStartMudDate(java.lang.String newDate)
Quest
setStartMudDate
in interface Quest
newDate
- the in-game mud start date of this questQuest.startDate()
,
Quest.setStartDate(String)
public int duration()
Quest
duration
in interface Quest
Quest.setDuration(int)
public void setDuration(int newTicks)
Quest
setDuration
in interface Quest
newTicks
- the duration, in ticks, of this questQuest.duration()
public void setCopy(boolean truefalse)
Quest
setCopy
in interface Quest
truefalse
- true if this quest object is a spawned copyQuest.isCopy()
public boolean isCopy()
Quest
isCopy
in interface Quest
Quest.setCopy(boolean)
public void setSpawn(int spawnFlag)
Quest
setSpawn
in interface Quest
spawnFlag
- the quest spawn flag infoQuest.Spawn
,
Quest.getSpawn()
public int getSpawn()
Quest
getSpawn
in interface Quest
Quest.Spawn
,
Quest.setSpawn(int)
public int minPlayers()
Quest
minPlayers
in interface Quest
Quest.setMinPlayers(int)
,
Quest.playerMask()
,
Quest.setPlayerMask(String)
public void setMinPlayers(int players)
Quest
setMinPlayers
in interface Quest
players
- minimum number of players matching player criteria requiredQuest.minPlayers()
,
Quest.playerMask()
,
Quest.setPlayerMask(String)
public int runLevel()
Quest
runLevel
in interface Quest
Quest.setRunLevel(int)
public void setRunLevel(int level)
Quest
setRunLevel
in interface Quest
level
- the run level. -1 means runs alwaysQuest.runLevel()
public java.lang.String playerMask()
Quest
playerMask
in interface Quest
MaskingLibrary
,
Quest.setMinPlayers(int)
,
Quest.minPlayers()
,
Quest.setPlayerMask(String)
public void setPlayerMask(java.lang.String mask)
Quest
setPlayerMask
in interface Quest
mask
- the zappermask that determines who counts as a playerMaskingLibrary
,
Quest.setMinPlayers(int)
,
Quest.minPlayers()
,
Quest.playerMask()
public boolean setScript(java.lang.String parm, boolean showErrors)
Quest
setScript
in interface Quest
parm
- the actual quest scriptshowErrors
- true to report file errors, false otherwiseQuest.script()
public java.lang.String script()
Quest
script
in interface Quest
Quest.setScript(String, boolean)
public void autostartup()
Quest
autostartup
in interface Quest
public void setVars(java.util.List<?> script, int startAtLine)
Quest
public java.lang.StringBuffer getResourceFileData(java.lang.String named, boolean showErrors)
Quest
getResourceFileData
in interface Quest
named
- the name of the resource path file to returnshowErrors
- true to report file errors, false otherwiseQuest
public void parseQuestScriptWArgs(java.util.List<?> script, java.util.List<java.lang.Object> args)
protected void errorOccurred(DefaultQuest.QuestState q, boolean quietFlag, java.lang.String msg)
protected java.lang.String breakOutMaskString(java.lang.String s, java.util.List<java.lang.String> p)
protected void filterOutThoseInUse(java.util.List<? extends Environmental> choices, java.lang.String choicesStr, DefaultQuest.QuestState q, boolean isQuiet, boolean reselect)
protected java.util.List<java.lang.String> parseFinalQuestScript(java.util.List<?> script)
public void parseQuestScript(java.util.List<?> script, java.util.List<java.lang.Object> args, int startLine)
public boolean spawnQuest(java.lang.String script, java.util.List<?> baseVars, boolean reTime, boolean onceOnly)
public boolean startQuest()
Quest
startQuest
in interface Quest
Quest.resetQuest(int)
,
Quest.stepQuest()
,
Quest.stopQuest()
public boolean startQuestInternal()
public void enterRunningState()
protected void cleanQuestStep(int preserveSkip)
public boolean stepQuest()
Quest
stepQuest
in interface Quest
Quest.startQuest()
,
Quest.stopQuest()
protected int getLineNumberForStep(int stepNum)
public boolean setQuestStep(int stepNum)
Quest
setQuestStep
in interface Quest
stepNum
- the step number 1...npublic void resetQuest(int firstPauseTicks)
Quest
resetQuest
in interface Quest
firstPauseTicks
- ticks to remain in stopped state before restartingQuest.startQuest()
,
Quest.stepQuest()
,
Quest.stopQuest()
public void stopQuest()
Quest
stopQuest
in interface Quest
Quest.startQuest()
,
Quest.stepQuest()
,
Quest.resetQuest(int)
public void stopQuestInternal()
public boolean enterDormantState()
Quest
enterDormantState
in interface Quest
public boolean resetWaitRemaining(long ellapsedTime)
Quest
resetWaitRemaining
in interface Quest
ellapsedTime
- the number of miliseconds already ellapsed before wait beganQuest.waitRemaining()
public int minWait()
Quest
minWait
in interface Quest
Quest.setMinWait(int)
,
Quest.waitInterval()
,
Quest.setWaitInterval(int)
public void setMinWait(int wait)
Quest
setMinWait
in interface Quest
wait
- the minimum number of ticks between attempts to run this quest.Quest.minWait()
,
Quest.waitInterval()
,
Quest.setWaitInterval(int)
public int waitInterval()
Quest
waitInterval
in interface Quest
Quest.setMinWait(int)
,
Quest.minWait()
,
Quest.setWaitInterval(int)
public void setWaitInterval(int wait)
Quest
setWaitInterval
in interface Quest
wait
- the maximum ticks, above the minimum wait, that must go byQuest.setMinWait(int)
,
Quest.minWait()
,
Quest.waitInterval()
public int waitRemaining()
Quest
waitRemaining
in interface Quest
Quest.resetWaitRemaining(long)
public Quest getMainQuestObject()
public void declareWinner(java.lang.String name)
Quest
declareWinner
in interface Quest
name
- the player nameQuest.getWinners()
,
Quest.getWinnerStr()
,
Quest.wasWinner(String)
,
Quest.setWinners(String)
,
Quest.whenLastWon(String)
public java.lang.String getWinnerStr()
Quest
getWinnerStr
in interface Quest
Quest.declareWinner(String)
,
Quest.getWinners()
,
Quest.wasWinner(String)
,
Quest.setWinners(String)
,
Quest.whenLastWon(String)
public void setWinners(java.lang.String list)
Quest
setWinners
in interface Quest
list
- a semicolon delimtied list of player namesQuest.declareWinner(String)
,
Quest.getWinners()
,
Quest.getWinnerStr()
,
Quest.wasWinner(String)
public java.util.Map<java.lang.String,java.lang.Long> getWinners()
Quest
getWinners
in interface Quest
Quest.declareWinner(String)
,
Quest.getWinnerStr()
,
Quest.wasWinner(String)
,
Quest.setWinners(String)
,
Quest.whenLastWon(String)
public boolean wasWinner(java.lang.String name)
Quest
wasWinner
in interface Quest
name
- the player nameQuest.declareWinner(String)
,
Quest.getWinners()
,
Quest.getWinnerStr()
,
Quest.setWinners(String)
,
Quest.whenLastWon(String)
public java.lang.Long whenLastWon(java.lang.String name)
Quest
whenLastWon
in interface Quest
name
- the player nameQuest.declareWinner(String)
,
Quest.getWinners()
,
Quest.getWinnerStr()
,
Quest.setWinners(String)
,
Quest.wasWinner(String)
public boolean running()
Quest
running
in interface Quest
Quest.suspended()
,
Quest.waiting()
,
Quest.startQuest()
public boolean stopping()
Quest
stopping
in interface Quest
Quest.suspended()
,
Quest.waiting()
,
Quest.running()
,
Quest.stopQuest()
public boolean waiting()
Quest
waiting
in interface Quest
Quest.suspended()
,
Quest.waiting()
,
Quest.running()
,
Quest.stopQuest()
public int ticksRemaining()
Quest
ticksRemaining
in interface Quest
Quest.minsRemaining()
,
Quest.startQuest()
public int minsRemaining()
Quest
minsRemaining
in interface Quest
Quest.ticksRemaining()
,
Quest.startQuest()
public int getTickStatus()
Tickable
getTickStatus
in interface Tickable
Tickable.tick(Tickable, int)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
protected boolean startQuestOnTime()
protected Ability findQuestAbility(java.lang.String abilityID)
public void runtimeRegisterAbility(MOB mob, java.lang.String abilityID, java.lang.String parms, boolean give)
Quest
runtimeRegisterAbility
in interface Quest
mob
- the mob receiving the abilityabilityID
- the id of the abilityparms
- any ability parametersgive
- false to remove this ability, true to replace an existing oneQuest.runtimeRegisterBehavior(PhysicalAgent, String, String, boolean)
,
Quest.runtimeRegisterEffect(PhysicalAgent, String, String, boolean)
,
Quest.runtimeRegisterObject(PhysicalAgent)
public void runtimeRegisterObject(PhysicalAgent P)
Quest
runtimeRegisterObject
in interface Quest
P
- the object added to the mapQuest.runtimeRegisterAbility(MOB, String, String, boolean)
,
Quest.runtimeRegisterBehavior(PhysicalAgent, String, String, boolean)
,
Quest.runtimeRegisterEffect(PhysicalAgent, String, String, boolean)
,
Quest
public void runtimeRegisterEffect(PhysicalAgent affected, java.lang.String abilityID, java.lang.String parms, boolean give)
Quest
runtimeRegisterEffect
in interface Quest
affected
- the object receiving the effectabilityID
- the id of the effectparms
- any effect parametersgive
- false to remove this effect, true to replace an existing oneQuest.runtimeRegisterAbility(MOB, String, String, boolean)
,
Quest.runtimeRegisterBehavior(PhysicalAgent, String, String, boolean)
,
Quest.runtimeRegisterObject(PhysicalAgent)
public void runtimeRegisterBehavior(PhysicalAgent behaving, java.lang.String behaviorID, java.lang.String parms, boolean give)
Quest
runtimeRegisterBehavior
in interface Quest
behaving
- the object receiving the behaviorbehaviorID
- the id of the behaviorparms
- any behavior parametersgive
- false to remove this behavior, true to replace an existing oneQuest.runtimeRegisterAbility(MOB, String, String, boolean)
,
Quest.runtimeRegisterEffect(PhysicalAgent, String, String, boolean)
,
Quest.runtimeRegisterObject(PhysicalAgent)
public void runtimeRegisterStat(Environmental E, java.lang.String stat, java.lang.String parms, boolean give)
public int getQuestThingIndex(java.util.Iterator<? extends Environmental> i, java.lang.String name, CMClass.CMObjectType type, int[] num)
public int getQuestMobIndex(java.lang.String name)
Quest
getQuestMobIndex
in interface Quest
name
- the given nameQuest.getQuestMobName(int)
,
Quest.getQuestMob(int)
public int getQuestRoomIndex(java.lang.String roomID)
Quest
getQuestRoomIndex
in interface Quest
roomID
- the given room idQuest.getQuestRoom(int)
,
Quest.getQuestRoomID(int)
public int getQuestItemIndex(java.lang.String name)
Quest
getQuestItemIndex
in interface Quest
name
- the given nameQuest.getQuestItem(int)
,
Quest.getQuestItemName(int)
public long getFlags()
Quest
getFlags
in interface Quest
Quest.FLAG_SUSPENDED
public void setFlags(long flags)
Quest
setFlags
in interface Quest
flags
- the flag bitmapQuest.FLAG_SUSPENDED
public java.lang.String getLastErrors()
Quest
getLastErrors
in interface Quest
public Environmental getQuestThing(java.util.Iterator<? extends Environmental> e, int dex, CMClass.CMObjectType type, int[] num)
public MOB getQuestMob(int i)
Quest
getQuestMob
in interface Quest
i
- the indexQuest.getQuestMobName(int)
,
Quest.getQuestMobIndex(String)
public Item getQuestItem(int i)
Quest
getQuestItem
in interface Quest
i
- the indexQuest.getQuestItemIndex(String)
,
Quest.getQuestItemName(int)
public Room getQuestRoom(int i)
Quest
getQuestRoom
in interface Quest
i
- the indexQuest.getQuestRoomIndex(String)
,
Quest.getQuestRoomID(int)
public java.lang.String getQuestMobName(int i)
Quest
getQuestMobName
in interface Quest
i
- the indexQuest.getQuestMob(int)
,
Quest.getQuestMobIndex(String)
public java.lang.String getQuestItemName(int i)
Quest
getQuestItemName
in interface Quest
i
- the indexQuest.getQuestItem(int)
,
Quest.getQuestItemIndex(String)
public java.lang.String getQuestRoomID(int i)
Quest
getQuestRoomID
in interface Quest
i
- the indexQuest.getQuestRoom(int)
,
Quest.getQuestRoomIndex(String)
public int getObjectInUseIndex(java.lang.String name)
Quest
getObjectInUseIndex
in interface Quest
name
- the given nameQuest.isObjectInUse(Environmental)
public boolean isObjectInUse(Environmental E)
Quest
isObjectInUse
in interface Quest
E
- the object to checkQuest.getObjectInUseIndex(String)
public java.util.List<java.lang.Object> parseLoadScripts(java.lang.String text, java.util.List<?> oldArgs, java.util.List<java.lang.Object> args, boolean showErrors)
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public int getSaveStatIndex()
Modifiable
getSaveStatIndex
in interface Modifiable
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
protected int getCodeNum(java.lang.String code)
public boolean sameAs(DefaultQuest E)
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()