Quest

An entry in the game's journal, given to one player or all players in a dimension. The server holds the quest, its progress and up to 8 objectives, so players who join late or reload still have it. Objectives with a position get a map marker while the quest is tracked. A resource's quests end when it stops, and a player's own quests end when they leave. The event questTrackingChanged(quest, player, tracked) reports tracking.

quest.give()

Quest.give(key, title, options, dimension)

Gives a quest. Throws if one with the same key, dimension and owner exists.

quest.all()

Quest.all(dimension)

All quests, or those in one dimension.

quest.find()

Quest.find(key, dimension, player)

The quest with this key, or null.

quest.getById()

Quest.getById(id)

The quest with this network id, or null.

quest.removeAll()

Quest.removeAll(dimension)

Removes all quests, or those in one dimension, and returns how many.

quest.exists

exists

False once removed.

quest.key

key

The key it was given with.

quest.title

title

The title. You can assign to it.

quest.description

description

The description. You can assign to it.

quest.type

type

'main', 'side', 'activity', 'event', 'micro' or 'racing'.

quest.progress

progress

'active', 'done' or 'failed'. You can assign to it.

quest.player

player

The owner's network id, or 0 for a quest for the whole dimension.

quest.objectiveCount

objectiveCount

The number of objectives.

quest.dimension

dimension

Its dimension.

quest.remove()

remove()

Removes the quest from all journals.

quest.setProgress()

setProgress(progress, announce)

Completes or fails the quest, or makes it active again.

quest.setObjective()

setObjective(index, objective, announce)

Replaces one objective. An index past the end is ignored.

quest.setObjectives()

setObjectives(objectives, announce)

Replaces all objectives, up to 8.

quest.objectives()

objectives()

Copies of its objectives.

quest.track()

track(player)

Makes a player, or everyone who has it, follow the quest.

quest.untrack()

untrack(player)

Makes a player, or everyone, stop following it.

quest.id

id: number

The network id.