SetPlayerQuestObjective
Sets one objective’s state for a player.
"active" shows the objective (and its marker), "updated" keeps it open with the HUD’s “updated” banner, "done" ticks
it off, "failed" crosses it, "hidden" takes it out of the journal. Refused for a quest the player does not hold, an
objective the quest does not have or an unknown state.
Syntax
Section titled “Syntax”SetPlayerQuestObjective(pid, id, objective, state [, silent])| Parameter | Type | |
|---|---|---|
pid |
number | the player |
id |
number|string | the quest’s id or key |
objective |
number | the objective’s number, from 1 |
state |
string | "hidden", "active", "updated", "done" or "failed" |
silent |
boolean | true = no HUD banner (optional) |
Returns
Section titled “Returns”boolean, string - accepted; the reason when not
Example
Section titled “Example”function OnPlayerEnterZone(pid, zone) if zone == CHAPTER_HOUSE and GetPlayerQuest(pid, ERRAND) then SetPlayerQuestObjective(pid, ERRAND, 1, "done") SetPlayerQuestObjective(pid, ERRAND, 2, "active") endendSee also
Section titled “See also”StartPlayerQuest · CompletePlayerQuest · GetPlayerQuest · the Quests group of the index
