Quests
public interface QuestManager extends CMLibrary
Modifier and Type | Interface | Description |
---|---|---|
static interface |
QuestManager.HolidayData |
Interface for the raw definition data for a Holiday
|
static class |
QuestManager.QMCommand |
Enum of official data types for the QuestMaker Wizard
templates.
|
Modifier and Type | Field | Description |
---|---|---|
static int |
QM_COMMAND_MASK |
MASK for QuestMaker QM COMMAND ORDINAL
|
static int |
QM_COMMAND_OPTIONAL |
MASK for QuestMaker QM COMMAND to mark it Optional
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
void |
addQuest(Quest Q) |
Given a Quest object, this will add the
object to the cache, auto-starting it
if necessary.
|
java.lang.String |
alterHoliday(java.lang.String oldName,
QuestManager.HolidayData newData) |
Given the official name of an existing holiday, and a
HolidayData data structure that was possibly altered,
this will modify the existing holiday to reflect the
new data.
|
java.util.List<java.util.List<java.lang.String>> |
breakOutMudChatVs(java.lang.String MUDCHAT,
TriadList<java.lang.String,java.lang.String,java.lang.Integer> behaviors) |
Given a list of variables and their values, and the name of a variable,
this will find the variable value that matches the variable name,
and then return the list of definitions.
|
java.lang.String |
createHoliday(java.lang.String named,
java.lang.String areaName,
boolean save) |
Attempts to create and possibly save a holiday quest script
where the holiday has the given name, and applies to the given
area (or ANY).
|
java.lang.String |
deleteHoliday(int holidayNumber) |
Given an index, this deletes the associated holiday
from the official holiday file completely.
|
void |
delQuest(Quest Q) |
Given an existing Quest in the cache, this
will stop it if necesssary, and remove it.
|
java.util.Enumeration<Quest> |
enumQuests() |
Returns an enumeration of all cached
Quest objects.
|
Quest |
fetchQuest(int i) |
Given a 0-based index into the Quest
object cache, this will return the
corresponding Quest.
|
Quest |
fetchQuest(java.lang.String qname) |
Returns the cached Quest with the given
unique name.
|
Quest |
findQuest(java.lang.String qname) |
Given a unique quest name, or partial name,
this will return the closest matching Quest
from the internal cache.
|
java.lang.StringBuffer |
getDefaultHoliData(java.lang.String named,
java.lang.String area) |
Generates a default Holiday quest script.
|
QuestManager.HolidayData |
getEncodedHolidayData(java.lang.String dataFromStepsFile) |
Given a quest script representing a Holiday, this will parse the script
and generate a HolidayData object, usually for editing.
|
java.util.List<JournalEntry> |
getHolidayEntries(boolean datedOnly) |
Returns the various holidays as journal entries, where
update is the start time, expiration is the end time,
from is the creator (usually Holidays), to is the
area list (unparsed) or ALL or "".
|
java.util.List<java.lang.String> |
getHolidayFile() |
Loads the official Holiday Quest Script, and parses it into
its constituent steps, returning the list of sub-scripts.
|
int |
getHolidayIndex(java.lang.String named) |
Given a unique holiday name, this will return
its index.
|
java.lang.String |
getHolidayName(int index) |
Given an index, this returns the unique name of the
holiday at that index.
|
java.util.List<java.util.List<java.lang.String>> |
getNextQuestScriptCommands(java.util.List<?> script,
java.lang.String cmdOnly,
int startLine) |
Given a semi-parsed quest script and a starting line, this will return all lines, minus any
JavaScript, between the startLine and the next STEP command, parsed into bits.
|
java.util.List<Quest> |
getPlayerPersistentQuests(MOB player) |
Given a player mob, this will return the list of quests
that the player has accepted and not yet completed.
|
GenericEditor.CMEval |
getQuestCommandEval(QuestManager.QMCommand command) |
This is part of the QuestMaker.
|
DVector |
getQuestTemplate(MOB mob,
java.lang.String fileToGet) |
Parses a Quest Template file into a data structure which no
human, not even me, will ever fully unravel again.
|
java.lang.String |
listHolidays(java.lang.String areaName) |
Returns a nice displayable formatted list of
all holidays and their associated areas.
|
void |
modifyHoliday(MOB mob,
int holidayNumber) |
Given a player mob and a holiday number, this allows
the given user to modify the holiday using the standard
menu system.
|
int |
numQuests() |
Returns the number of Quest objects in the
cache.
|
Quest |
objectInUse(Environmental E) |
Scans every Quest and returns the first one that is using
the given MOB, Item, Area, Room, whatever.
|
java.util.List<java.lang.String> |
parseQuestSteps(java.util.List<java.lang.String> script,
int startLine,
boolean rawLineInput) |
Given a final quest script parsed into lines, and a starting line, this will return
a list of mini-scripts broken by STEPs.
|
Quest |
questMakerCommandLine(MOB mob) |
Runs the Quest Maker Wizard process command line
version for the given mob, returning the resulting
Quest.
|
void |
save() |
Re-saves every quest in this manager to the database
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
static final int QM_COMMAND_MASK
static final int QM_COMMAND_OPTIONAL
int numQuests()
fetchQuest(int)
Quest fetchQuest(int i)
i
- the indexnumQuests()
Quest fetchQuest(java.lang.String qname)
qname
- the quest namefindQuest(String)
,
fetchQuest(int)
,
enumQuests()
Quest findQuest(java.lang.String qname)
qname
- the name of a questfetchQuest(String)
,
fetchQuest(int)
,
enumQuests()
java.util.Enumeration<Quest> enumQuests()
delQuest(Quest)
,
addQuest(Quest)
,
fetchQuest(String)
void addQuest(Quest Q)
Q
- the Quest to deletedelQuest(Quest)
,
enumQuests()
,
fetchQuest(String)
void delQuest(Quest Q)
Q
- the Quest to deleteaddQuest(Quest)
,
enumQuests()
,
fetchQuest(String)
java.lang.String listHolidays(java.lang.String areaName)
areaName
- null or all, or area namejava.lang.String deleteHoliday(int holidayNumber)
holidayNumber
- the 0-based indexgetHolidayIndex(String)
java.lang.String getHolidayName(int index)
index
- the 0-based indexgetHolidayIndex(String)
,
listHolidays(String)
int getHolidayIndex(java.lang.String named)
named
- the unique name of the holidaymodifyHoliday(MOB, int)
,
getHolidayName(int)
,
deleteHoliday(int)
,
listHolidays(String)
void modifyHoliday(MOB mob, int holidayNumber)
mob
- the player mob to do the editingholidayNumber
- the holiday number (0 based)getHolidayIndex(String)
,
alterHoliday(String, HolidayData)
,
deleteHoliday(int)
java.lang.String alterHoliday(java.lang.String oldName, QuestManager.HolidayData newData)
oldName
- the name of the existing holiday to modifynewData
- the modified holiday dataQuestManager.HolidayData
,
getHolidayFile()
,
modifyHoliday(MOB, int)
java.lang.String createHoliday(java.lang.String named, java.lang.String areaName, boolean save)
named
- the name of the holiday, unique plzareaName
- the name of the area (or ANY) the holiday occurs insave
- true to append to the official holiday filegetDefaultHoliData(String, String)
java.lang.StringBuffer getDefaultHoliData(java.lang.String named, java.lang.String area)
named
- the name of the holiday, unique plzarea
- the name of the area (or ANY) the holiday occurs increateHoliday(String, String, boolean)
java.util.List<java.lang.String> getHolidayFile() throws CMException
CMException
- a parsing error occurredgetEncodedHolidayData(String)
,
getHolidayEntries(boolean)
java.util.List<JournalEntry> getHolidayEntries(boolean datedOnly)
datedOnly
- true to only return dated/muddate entriesgetEncodedHolidayData(String)
,
getHolidayFile()
QuestManager.HolidayData getEncodedHolidayData(java.lang.String dataFromStepsFile)
dataFromStepsFile
- the holiday quest scriptQuestManager.HolidayData
,
getHolidayFile()
,
alterHoliday(String, HolidayData)
,
getHolidayEntries(boolean)
java.util.List<java.util.List<java.lang.String>> breakOutMudChatVs(java.lang.String MUDCHAT, TriadList<java.lang.String,java.lang.String,java.lang.Integer> behaviors)
MUDCHAT
- the mudchat variable name, usually "MUDCHAT"behaviors
- list of behavior variables, name, value, an integerDVector getQuestTemplate(MOB mob, java.lang.String fileToGet)
mob
- player mob, for file permission reasonsfileToGet
- the template filename to loadgetQuestTemplate(MOB, String)
,
questMakerCommandLine(MOB)
,
getQuestCommandEval(QMCommand)
Quest questMakerCommandLine(MOB mob)
mob
- the player who wants to create a QuestgetQuestTemplate(MOB, String)
,
questMakerCommandLine(MOB)
,
getQuestCommandEval(QMCommand)
GenericEditor.CMEval getQuestCommandEval(QuestManager.QMCommand command)
command
- the quest maker variable typegetQuestTemplate(MOB, String)
,
questMakerCommandLine(MOB)
,
getQuestCommandEval(QMCommand)
,
QuestManager.QMCommand
,
GenericEditor.CMEval
java.util.List<Quest> getPlayerPersistentQuests(MOB player)
player
- the player mobQuest objectInUse(Environmental E)
E
- the object to find the Quest user ofvoid save()
java.util.List<java.lang.String> parseQuestSteps(java.util.List<java.lang.String> script, int startLine, boolean rawLineInput)
script
- the final lines of the entire quest scriptstartLine
- the line to start breaking atrawLineInput
- false to manage ; line endings, true to leave rawjava.util.List<java.util.List<java.lang.String>> getNextQuestScriptCommands(java.util.List<?> script, java.lang.String cmdOnly, int startLine)
script
- the complete quest script parsedcmdOnly
- null, or a command to filter the script bystartLine
- 0 - the line in the given script to start with