File locations
Quest and mission scripts live under:Creating a quest container
Require the interaction framework and create aQuest 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
Setquest.reward at the top of the file to define what quest:complete() gives:
Variable helpers
Variables are stored inchar_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 toscripts/globals/interaction_containers.lua so the framework loads it:
Mission containers
Missions use the same structure but with aMission container:
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, useHiddenQuest:
HiddenQuest uses npcUtil.giveReward() directly instead of npcUtil.completeQuest().