API:SetTrackQuest
From RoR Wiki
UI Lua API · Game functions
Version: WAR 1.4.8
Adds a quest to the quest tracker or removes it.
SetTrackQuest(questId, track)
Arguments
- questId
number– Id of a quest in the player's quest log.- track
boolean–trueto track the quest,falseto stop tracking it.
Returns
Nothing.
Details
- If the player does not have a quest with that id, nothing happens.
- The client keeps 10 tracker slots. Tracking a quest when all 10 are taken does nothing; the stock UI checks
EA_Window_QuestTracker.IsTrackerFull()first and shows an error instead. - Tracking a quest that is already tracked, or untracking one that is not, changes nothing in the list.
- When the list changes, the client sends the new tracker state to the server, refreshes the quest's map pins, sets
GameData.Player.questsDirtytotrueand notifies the UI that quest data changed. trackmust be a real boolean. Passingnilor a number raises an Invalid Parameters error.- The function needs at least two arguments and only reads the last two.
Errors
None besides the Invalid Parameters argument check.
Example
From easystem_utils/source/questutils.lua:
SetTrackQuest( questData.id, not questData.tracking )
