GetQuestByKey
The id of the quest with a key.
A quest’s id lasts until the server restarts; its key is the mode’s own. A mode saves its players’ quests by key and finds each one again with this - or hands the key itself to any quest function, which takes either.
Syntax
Section titled “Syntax”GetQuestByKey(key)| Parameter | Type | |
|---|---|---|
key |
string | the quest’s key, as given to CreateQuest (upper and lower case differ) |
Returns
Section titled “Returns”number - the quest’s id; nil when no quest has the key
Example
Section titled “Example”local id = GetQuestByKey("abbots_errand")if id then StartPlayerQuest(pid, id) endSee also
Section titled “See also”CreateQuest · GetPlayerQuests · SetPlayerQuest · the Quests group of the index
