com.GameInterface.QuestsBase

com.GameInterface.QuestsBase

Important concepts

Tier == MainQuest in GC == Quest in the quest tool.  Task == Quest in GC == Task in the quest tool.  Goal == QuestGoal in GC == Goal in the quest tool.

A Mission consist of several Tiers linked together.  One Tier consist of one or many Tasks and each Task consist of one or many Goals.  You can not see the list of Tasks, only the CurrentTask.

Summary
com.GameInterface.QuestsBaseTier == MainQuest in GC == Quest in the quest tool.
Functions
DeleteCurrentQuestOfMainQuestDelete a tier.
AcceptQuestFromQuestgiverTell the questgiver that you would like to start the quest in question.
GetQuestRequest infop about this quest
GetQuestGiver
GetQuestByQuestGiverID
GetAllAbandonedQuestsThis will get an array containing the current missions.
GetMainQuestIDByQuestIDReturns the ID of the main quest for the quest identified by @a questID, or quests::INVALID_MAINQUEST_ID on error.
GetMainQuestLevelReturns the level restriction of the main quest
GetAllActiveQuestsThis will get an array containing the current missions.
GetAllCompletedQuestsThis will get an array of all completed missions.
GetAllCompletedQuestsByRegionThis will get an object containing arrays of completed missions per playfield.
GetAllQuestsOnCooldownThis will get an array of all missions on cooldown
GetAllActiveChallenges
GetAllCompletedChallenges
IsMissionActiveReturn true if a mission is active.
IsMissionPausedReturn true if a mission is paused.
IsChallengeMissionReturn true if a mission is a challenge.
ShareQuest
ShareQuestUnderMouse
PauseQuest
ShowQuestOnMap
AcceptQuestReward
IsSwitchNecessary
ShowMedia
CloseMedia
ShowQuestTaskMedia
GetSolvedTextForQuest
MissionReportWindowOpened
GetAllRewardsGet all uncollected quest rewards.
GetAllChallengeRewardsGet all uncollected challenge rewards.
AnyUnsentReportsReturns true or false depening if there are any unsubmitted reports with rewards pending
Variables
SignalQuestAvailableYou get this signal when someone has requested seeing the list of available quests for a given object.
SignalGoalProgressYou get this signal when something causes the given quest to progress.
SignalGoalPhaseUpdatedYou get this signal when something causes the given quest to update its phase
SignalGoalFinishedYou get this signal when a goal is completed.
SignalQuestEventDifferent events sent from Task.
SignalTaskAddedThis is called when you get a new task.
SignalMissionRemovedYou get this signal when a tier is removed from the list.
SignalPlayerTiersChangedTODO: Document the rest
SignalQuestChanged
SignalTierCompletedFired when you complete a tier.
SignalTierFailedFired when you’ve failed a tier.
SignalMissionCompletedFired when you complete a mission.
SignalMissionFailedFired when you’ve failed a tier.
SignalCompletedQuestsChangedFired when you’ve failed a tier.
SignalQuestCooldownChangedFired when a quest cooldown changes.
SignalQuestGiverEnterVicinityTriggered when you come within 30meter of a questgiver.
SignalQuestGiverLeaveVicinityTriggered when a questgiver leaves your 30m vicinity.
SignalGoalTimeLimitChangedTriggered when a goal updates its timelimit
SignalQuestRewardMakeChoiceTriggered when there is a quest reward to choose.
SignalQuestRewardInventorySpace
SignalQuestRewardAcceptAcknowledged
SignalSendMissionReportTriggered when player hits key combo to open the quest reward window(s)
SignalOpenMissionWindowTriggered from gamecode when player uses an npc that has quests @param: ID32

Functions

DeleteCurrentQuestOfMainQuest

public static function DeleteCurrentQuestOfMainQuest(
   mainQuestTemplateID: Number
) : Void

Delete a tier.

Parameters

tier:Number The tier to delete.

AcceptQuestFromQuestgiver

public static function AcceptQuestFromQuestgiver(
   mainQuestTemplateID: Number,
   questGiverID: ID32
) : Void

Tell the questgiver that you would like to start the quest in question.  If you got the quest, you should also get a “QuestAdded” signal.

Parameters

idQuestGiver:Number The quest in question.
questGiverType:Number The type of the questgiver dynel.
questGiverInstance:Number The instance of the questgiver dynel.

GetQuest

public static function GetQuest(questID: Number,
includeGoals: Boolean,
isFromQuestGiver: Boolean) : Quest

Request infop about this quest

GetQuestGiver

public static function GetQuestGiver(questGiverID: ID32,
includeQuests: Boolean) : QuestGiver

GetQuestByQuestGiverID

public static function GetQuestByQuestGiverID(questGiverID: Number) : Quest

GetAllAbandonedQuests

public static function GetAllAbandonedQuests() : Array

This will get an array containing the current missions.

GetMainQuestIDByQuestID

public static function GetMainQuestIDByQuestID(questID: Number) : Number

Returns the ID of the main quest for the quest identified by @a questID, or quests::INVALID_MAINQUEST_ID on error.

GetMainQuestLevel

public static function GetMainQuestLevel(questID: Number) : Number

Returns the level restriction of the main quest

GetAllActiveQuests

public static function GetAllActiveQuests() : Array

This will get an array containing the current missions.

GetAllCompletedQuests

public static function GetAllCompletedQuests() : Array

This will get an array of all completed missions.

GetAllCompletedQuestsByRegion

public static function GetAllCompletedQuestsByRegion() : Object

This will get an object containing arrays of completed missions per playfield.

GetAllQuestsOnCooldown

public static function GetAllQuestsOnCooldown() : Array

This will get an array of all missions on cooldown

GetAllActiveChallenges

public static function GetAllActiveChallenges() : Array

GetAllCompletedChallenges

public static function GetAllCompletedChallenges() : Array

IsMissionActive

public static function IsMissionActive(missionTemplateId: Number) : Boolean

Return true if a mission is active.

IsMissionPaused

public static function IsMissionPaused(missionTemplateId: Number) : Boolean

Return true if a mission is paused.

IsChallengeMission

public static function IsChallengeMission(missionTemplateId: Number) : Boolean

Return true if a mission is a challenge.

ShareQuest

public static function ShareQuest(questID: Number) : Void

ShareQuestUnderMouse

public static function ShareQuestUnderMouse(questId: Number) : Void

PauseQuest

public static function PauseQuest(questId: Number) : Void

ShowQuestOnMap

public static function ShowQuestOnMap(questID: Number) : Void

AcceptQuestReward

public static function AcceptQuestReward(taskInstance: Number,
index: Number) : Void

IsSwitchNecessary

public static function IsSwitchNecessary(questID: Number) : Boolean

ShowMedia

public static function ShowMedia(rdbType: Number,
rdbID: Number) : Void

CloseMedia

public static function CloseMedia(rdbID: Number) : Void

ShowQuestTaskMedia

public static function ShowQuestTaskMedia(questTaskID: Number) : Void

GetSolvedTextForQuest

public static function GetSolvedTextForQuest(mainQuestID: Number,
questID: Number)

MissionReportWindowOpened

public static function MissionReportWindowOpened() : Void

GetAllRewards

public static function GetAllRewards() : Array

Get all uncollected quest rewards.

Returns

Array of objects with m_QuestTaskID:Number, m_Rewards:Array, m_OptionalRewards:Array

GetAllChallengeRewards

public static function GetAllChallengeRewards() : Array

Get all uncollected challenge rewards.

Returns

Array of objects with m_QuestTaskID:Number, m_Rewards:Array, m_OptionalRewards:Array

AnyUnsentReports

public static function AnyUnsentReports() : Boolean

Returns true or false depening if there are any unsubmitted reports with rewards pending

Returns

Boolean: Are there quests with reward pending

Variables

SignalQuestAvailable

public static var SignalQuestAvailable: Signal

You get this signal when someone has requested seeing the list of available quests for a given object.  This could be triggered by the actionscript or by gamecode.  You get 1 signal per available quest from this questGiverType/questGiverInstance.

Parameters

idQuestGiver:Number The quest giver id.  Points at exactly 1 quest.
questName:String The name of the quest.
mainQuestType:Number The type of quest.  (TODO: figure out the types?  Changes in the plan.)
unused:Number Unused.
questGiverType:Number The type of the questgiver dynel.
questGiverInstance:Number The instance of the questgiver dynel.
tier:Number The quest tier.

SignalGoalProgress

public static var SignalGoalProgress: Signal

You get this signal when something causes the given quest to progress.  This is triggered by gamecode for instance when you kill a monster or pick up an item in the form of having complete 4 of 10.  Note that if a goals SolvedTimes == RepeatCount, then the goal is done.

Parameters

tierId:Number The id of the main quest.
goalId:Number The id of the goal.
solvedTimes:Number The new solved count.
repeatCount:Number The number of times to repeate until done.

SignalGoalPhaseUpdated

public static var SignalGoalPhaseUpdated: Signal

You get this signal when something causes the given quest to update its phase

Parameters

tierId:Number The id of the main quest.

SignalGoalFinished

public static var SignalGoalFinished: Signal

You get this signal when a goal is completed.  This is triggered by gamecode for instance when you kill a monster or pick up an item in the form of having complete 4 of 10.

Parameters

tierId:Number The id of the tier.
goalId:Number The id of the goal.

SignalQuestEvent

public static var SignalQuestEvent: Signal

Different events sent from Task. e_QuestEvent_Expired, - A task expired. e_QuestEvent_Completed, - A task was completed. e_QuestEvent_Failed, - A task failed. e_QuestEvent_Removed, - When you get this, the playertiers list is already updated. e_QuestEvent_RewardChanged, e_QuestEvent_UntrainCraft

SignalTaskAdded

public static var SignalTaskAdded: Signal

This is called when you get a new task.  So it would be called when you just got a new tier, and when a task is completed and there exist more tasks for the given tier.  The task number is not important as we only operate with current task.

Parameters

tierId:Number The id of the tier.

SignalMissionRemoved

public static var SignalMissionRemoved

You get this signal when a tier is removed from the list.  Note that this does not say anything about the tier being completed or failed.  That info does not seem to exist.  Checking the last questevent status might give a clue.

Parameters

tierId:Number The id of the main quest.

SignalPlayerTiersChanged

public static var SignalPlayerTiersChanged

TODO: Document the rest

SignalQuestChanged

public static var SignalQuestChanged

SignalTierCompleted

public static var SignalTierCompleted

Fired when you complete a tier.  TierRemoved will be sent afterwards.

Parameters

tier:Number The id of the tier.

SignalTierFailed

public static var SignalTierFailed

Fired when you’ve failed a tier.  TierRemoved will be sent afterwards.

Parameters

tier:Number The id of the tier.

SignalMissionCompleted

public static var SignalMissionCompleted

Fired when you complete a mission.

Parameters

missionid:Number The id of the mission.

SignalMissionFailed

public static var SignalMissionFailed

Fired when you’ve failed a tier.  TierRemoved will be sent afterwards.

Parameters

tier:Number The id of the mission.

SignalCompletedQuestsChanged

public static var SignalCompletedQuestsChanged

Fired when you’ve failed a tier.  TierRemoved will be sent afterwards.

Parameters

tier:Number The id of the mission.

SignalQuestCooldownChanged

public static var SignalQuestCooldownChanged

Fired when a quest cooldown changes.

Parameters

tier:Number
tier:Number

SignalQuestGiverEnterVicinity

public static var SignalQuestGiverEnterVicinity: Signal

Triggered when you come within 30meter of a questgiver.  Then use this info to call RequestAvailableQuests to see if it has any quests for you.  Note that the c++ ASQuest class must have been setup correctly to use this feature.

Parameters

type:Number The type of the quest giver.
instance:Number The instance of the quest giver.

SignalQuestGiverLeaveVicinity

public static var SignalQuestGiverLeaveVicinity: Signal

Triggered when a questgiver leaves your 30m vicinity.  Either caused by distance, death, or playfield shift.

Parameters

type:Number The type of the quest giver.
instance:Number The instance of the quest giver.

SignalGoalTimeLimitChanged

public static var SignalGoalTimeLimitChanged: Signal

Triggered when a goal updates its timelimit

Parameters

goalID:Number The goal template id

SignalQuestRewardMakeChoice

public static var SignalQuestRewardMakeChoice: Signal

Triggered when there is a quest reward to choose.

SignalQuestRewardInventorySpace

public static var SignalQuestRewardInventorySpace: Signal

SignalQuestRewardAcceptAcknowledged

public static var SignalQuestRewardAcceptAcknowledged: Signal

SignalSendMissionReport

public static var SignalSendMissionReport: Signal

Triggered when player hits key combo to open the quest reward window(s)

SignalOpenMissionWindow

public static var SignalOpenMissionWindow: Signal

Triggered from gamecode when player uses an npc that has quests @param: ID32

public static function DeleteCurrentQuestOfMainQuest(
   mainQuestTemplateID: Number
) : Void
Delete a tier.
public static function AcceptQuestFromQuestgiver(
   mainQuestTemplateID: Number,
   questGiverID: ID32
) : Void
Tell the questgiver that you would like to start the quest in question.
public static function GetQuest(questID: Number,
includeGoals: Boolean,
isFromQuestGiver: Boolean) : Quest
Request infop about this quest
public static function GetQuestGiver(questGiverID: ID32,
includeQuests: Boolean) : QuestGiver
public static function GetQuestByQuestGiverID(questGiverID: Number) : Quest
public static function GetAllAbandonedQuests() : Array
This will get an array containing the current missions.
public static function GetMainQuestIDByQuestID(questID: Number) : Number
Returns the ID of the main quest for the quest identified by @a questID, or quests::INVALID_MAINQUEST_ID on error.
public static function GetMainQuestLevel(questID: Number) : Number
Returns the level restriction of the main quest
public static function GetAllActiveQuests() : Array
This will get an array containing the current missions.
public static function GetAllCompletedQuests() : Array
This will get an array of all completed missions.
public static function GetAllCompletedQuestsByRegion() : Object
This will get an object containing arrays of completed missions per playfield.
public static function GetAllQuestsOnCooldown() : Array
This will get an array of all missions on cooldown
public static function GetAllActiveChallenges() : Array
public static function GetAllCompletedChallenges() : Array
public static function IsMissionActive(missionTemplateId: Number) : Boolean
Return true if a mission is active.
public static function IsMissionPaused(missionTemplateId: Number) : Boolean
Return true if a mission is paused.
public static function IsChallengeMission(missionTemplateId: Number) : Boolean
Return true if a mission is a challenge.
public static function ShareQuest(questID: Number) : Void
public static function ShareQuestUnderMouse(questId: Number) : Void
public static function PauseQuest(questId: Number) : Void
public static function ShowQuestOnMap(questID: Number) : Void
public static function AcceptQuestReward(taskInstance: Number,
index: Number) : Void
public static function IsSwitchNecessary(questID: Number) : Boolean
public static function ShowMedia(rdbType: Number,
rdbID: Number) : Void
public static function CloseMedia(rdbID: Number) : Void
public static function ShowQuestTaskMedia(questTaskID: Number) : Void
public static function GetSolvedTextForQuest(mainQuestID: Number,
questID: Number)
public static function MissionReportWindowOpened() : Void
public static function GetAllRewards() : Array
Get all uncollected quest rewards.
public static function GetAllChallengeRewards() : Array
Get all uncollected challenge rewards.
public static function AnyUnsentReports() : Boolean
Returns true or false depening if there are any unsubmitted reports with rewards pending
public static var SignalQuestAvailable: Signal
You get this signal when someone has requested seeing the list of available quests for a given object.
public static var SignalGoalProgress: Signal
You get this signal when something causes the given quest to progress.
public static var SignalGoalPhaseUpdated: Signal
You get this signal when something causes the given quest to update its phase
public static var SignalGoalFinished: Signal
You get this signal when a goal is completed.
public static var SignalQuestEvent: Signal
Different events sent from Task.
public static var SignalTaskAdded: Signal
This is called when you get a new task.
public static var SignalMissionRemoved
You get this signal when a tier is removed from the list.
public static var SignalPlayerTiersChanged
TODO: Document the rest
public static var SignalQuestChanged
public static var SignalTierCompleted
Fired when you complete a tier.
public static var SignalTierFailed
Fired when you’ve failed a tier.
public static var SignalMissionCompleted
Fired when you complete a mission.
public static var SignalMissionFailed
Fired when you’ve failed a tier.
public static var SignalCompletedQuestsChanged
Fired when you’ve failed a tier.
public static var SignalQuestCooldownChanged
Fired when a quest cooldown changes.
public static var SignalQuestGiverEnterVicinity: Signal
Triggered when you come within 30meter of a questgiver.
public static var SignalQuestGiverLeaveVicinity: Signal
Triggered when a questgiver leaves your 30m vicinity.
public static var SignalGoalTimeLimitChanged: Signal
Triggered when a goal updates its timelimit
public static var SignalQuestRewardMakeChoice: Signal
Triggered when there is a quest reward to choose.
public static var SignalQuestRewardInventorySpace: Signal
public static var SignalQuestRewardAcceptAcknowledged: Signal
public static var SignalSendMissionReport: Signal
Triggered when player hits key combo to open the quest reward window(s)
public static var SignalOpenMissionWindow: Signal
Triggered from gamecode when player uses an npc that has quests @param: ID32
Close