CreateQuest
Defines a quest - its name, description, kind and objectives.
Nobody has the quest yet: give it to players with StartPlayerQuest or SetPlayerQuest. Refused for a definition
without a name, a name over 96 characters, a description over 2000, more than 16 objectives, an objective text over 160
characters, a diary line over 400, an unknown kind, a marker that is not one, or a key that is not 1-64 letters, digits
and _ . : - or is another quest’s already; the 1024th quest is the last.
Syntax
Section titled “Syntax”CreateQuest(definition)| Parameter | Type | |
|---|---|---|
definition |
table | {key =, name =, description =, kind = "main" | "side" | "task", objectives = {...}} (the intro above) |
Returns
Section titled “Returns”number - the quest’s id; nil and the reason when refused
Example
Section titled “Example”ERRAND = CreateQuest({ key = "abbots_errand", name = "The Abbot's Errand", description = "Brother Anselm needs a trusted hand.", kind = "side", objectives = { {text = "Speak with the abbot", log = "He waits in the chapter house.", doneLog = "I spoke with the abbot.", marker = {x = 1290, y = 1050, z = 26}}, {text = "Fetch the ledger from the cellar", log = "The ledger lies somewhere in the cellar."}, "Bring the ledger back", },})See also
Section titled “See also”UpdateQuest · DestroyQuest · StartPlayerQuest · GetQuestInfo · the Quests group of the index
