Skip to main content

File locations

Quest and mission scripts live under:
Each quest or mission is a single Lua file that creates a container object, defines its sections, and registers itself.

Creating a quest container

Require the interaction framework and create a Quest object with the area and quest ID:

Quest status constants

The status argument in check is one of these values:

Container helpers

The container object exposes helper methods for variable management and quest state transitions.

Quest lifecycle

quest:complete() calls npcUtil.completeQuest() internally and returns true on success (i.e., when the player has inventory space for any reward items).

Quest reward table

Set quest.reward at the top of the file to define what quest:complete() gives:

Variable helpers

Variables are stored in char_var with the prefix Quest[<areaId>][<questId>].

Bit variable helpers

For tracking multiple boolean flags in a single variable:

Defining sections

A quest’s sections are defined as an array at the end of the file:

Registering the container

Add the quest to scripts/globals/interaction_containers.lua so the framework loads it:
The name used in !reloadquest must match exactly the filename as required in interaction_containers.lua. It is case-sensitive.

Mission containers

Missions use the same structure but with a Mission container:
The Mission class has mission:complete() which calls npcUtil.completeMission() and supports the same reward params, plus rank, rankPoints, and nextMission.

Hidden quests

For quests that do not appear in the quest log, use HiddenQuest:
HiddenQuest uses npcUtil.giveReward() directly instead of npcUtil.completeQuest().