Quester
Provides quest interaction and management functionality.
Functions
core.quester.get_quest_state(quest_id: number) -> number
Returns the quest state for the specified quest.
Quest States:
-1- Not available0- Available1- In progress2- Completed
core.quester.start_quest(npc_id: number, quest_id: number) -> boolean
Attempts to start the quest with the specified NPC. Check quest state first with get_quest_state().
Returns: true if the request was sent, false if the NPC is present on the current map but the player is out of interaction range.
INFO
If the NPC isn't on the current map, the call still proceeds — this supports auto-complete flows that don't require a live NPC. Proximity is only enforced when the NPC is actually spawned.
No Auto-Teleport
Proximity is checked, not corrected. Position the character within range before calling — this function will not teleport you to the NPC.
core.quester.complete_quest(npc_id: number, quest_id: number) -> boolean
Attempts to complete the quest with the specified NPC. Check if completable first with can_complete_quest().
Returns: true if the request was sent, false if the NPC is present on the current map but the player is out of interaction range.
INFO
If the NPC isn't on the current map, the call still proceeds — this supports auto-complete flows that don't require a live NPC. Proximity is only enforced when the NPC is actually spawned.
No Auto-Teleport
Proximity is checked, not corrected. Position the character within range before calling — this function will not teleport you to the NPC.
core.quester.can_complete_quest(npc_id: number, quest_id: number) -> boolean
Returns true if quest requirements are met and can be completed.
NPC Dialogue Selection
The quester uses a queue system for handling NPC dialogue choices and text inputs.
Advanced: on_dialog callback
For full dialog control (reading dialog text, inspecting choices, conditionally responding), use the on_dialog callback instead. It fires before the queue system and lets scripts intercept, respond to, or block dialogs dynamically.
core.quester.queue_npc_selection(selection: string)
Enqueues a dialogue option substring. When the NPC dialogue appears with auto NPC enabled, the option containing this substring will be selected. For text input prompts, the queued string will be used as the answer.
core.quester.clear_npc_selection()
Clears the entire NPC selection queue.