Quest structure. Quests are described in detail in Quests article.

Fields

read only chain:ChainCore

Quest chain.

read only chainid:Int

Quest chain ID.

read only checks:Array<Dynamic>

Quest checks.

read only hasTimer:Bool

If set to true, quest has timer.

read only id:Int

Quest ID.

read only isVisible:Bool

If true, this quest should be visible to the players.

read only locale:LocaleMap<{note:String, name:String}>

Localization map.

read only name:String

Quest name.

read only note:String

Quest description.

read only params:Dynamic

Quest parameters.

read only requires:Array<Dynamic>

Quest requirements.

read only results:Array<Dynamic>

Quest results.

timerValue:Int

Timer value (in minutes).

read only vars:Array<_QuestVariable>

Internal quest variables.

Methods

dump (userQuests:UserQuestsCore, lang:String):Dynamic

Stores quest data into an anonymous object for client response.

Returns:

Anonymous object with quest parameters.

getMax (name:String):Int

Returns maximum value for quest variable.

Parameters:

name

Variable name.

Returns:

Maximum variable value.

getVar (name:String):_QuestVariable

Returns quest variable by its name.

Parameters:

name

Variable name.

type

Variable type.

Returns:

Variable value. Returns null, if this variable is not found.

hasCheck (name:String):Bool

Returns true, if this quest has a completion check with a given name.

Parameters:

name

Completion check name.

Returns:

True, if this quest has this completion check. False otherwise.

hasVar (name:String, ?type:String):Bool

Returns true, if this quest has a variable with given name and type.

Parameters:

name

Variable name.

type

Variable type.

Returns:

True, if this quest has this variable. False otherwise.