Skip to content
f3re edited this page Feb 9, 2015 · 5 revisions

QuestManager

  • The QuestManager is a lua metatable that exposes functions that return quest data from the client
  • Quest data can be returned in the form of primitives or Quest, Step, and Condition metatables
  • All list indices start at 1
  • Global constants of the form X_Y_Z can be found at http://wiki.esoui.com/Constant_Values

Quest Table Attributes

name
Returns Quest Name (string).
id
Returns Quest ID (number).
journalindex
Returns Quest journal index (number).
currentstep
Returns the currently active Quest step index(number).
stepcount
Returns the total step count for the Quest (number).
currentcondition
Returns the currently active Quest condition index(number).
stepcount
Returns the total condition count for the Quest (number).

QuestStep Table Attributes

id
Returns QuestStep ID (number).

QuestCondition Table Attributes

id
Returns QuestCondition ID (number).
type
Returns QuestCondition type (number) corresponding to global constant QUEST_CONDITION_TYPE_
iscomplete
Returns (bool) true if the QuestCondition has been completed and false otherwise.
pos
Returns a (table) containing the (x,y,z) position of the QuestCondition.
--- ### QuestManager Functions - Example usage: ```lua local quest = QuestManager:Get(questID) if ( quest ) then d("Quest journal index: ".. tostring(quest.journalindex).. " Quest name : "..tostring(quest.name)) end ```
:Get(questid)
Returns the Quest (table) matching the questid.
:GetByIndex(number)
Returns the Quest (table) which is at index "number" in the journal.
:HasQuest(questid)
Returns true if the Quest matching questid is in the journal and false otherwise.
:HasCompletedQuest(questid)
Returns true if the Quest matching questid has already been completed and false otherwise.
:GetQuestId(journalindex)
Returns the questid (number) for the Quest at "journalindex".
:GetQuestJournalIndex(questid)
Returns the journalindex (number) for the Quest matching "questid".
:GetQuestStep(journalindex, stepindex)
Returns the QuestStep (table) for QuestStep "stepindex" for the Quest at "journalindex" .
:GetQuestCondition(journalindex, stepindex, conditionindex)
Returns the QuestCondition (table) for QuestCondition "conditionindex" and QuestStep "stepindex" for the Quest at "journalindex" .
:GetNearestQuestCondition()
Returns a (table) containing journalindex, stepindex, conditionindex for the nearest incomplete quest condition .
Clone this wiki locally