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)
Attempts to start the quest with the specified NPC. Check quest state first with get_quest_state().
core.quester.complete_quest(npc_id: number, quest_id: number)
Attempts to complete the quest with the specified NPC. Check if completable first with can_complete_quest().
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.
core.quester.queue_npc_selection(selection: string)
Enqueues a dialogue option substring. When the NPC dialogue appears, 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.