Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GetQuestLogLeaderBoard

Last wiki revision 2022-07-21

Returns info for a quest objective in the quest log. description, objectiveType, isCompleted = GetQuestLogLeaderBoard(i, [questIndex])

  • i: - Index of the quest objective to query, ascending from 1 to (questIndex).
  • questIndex:Optional Number - Index of the quest log entry to query, ascending from 1 to . If not provided or invalid, defaults to the currently selected quest (via )
  • description: - Text description of the objective, e.g. "0/3 Monsters slain"
  • objectiveType: - A token describing objective type, one of "item", "object", "monster", "reputation", "log", "event", "player", or "progressbar".
  • isCompleted: - true if sub-objective is completed, false otherwise

The following function attempts to parse the description message to figure out exact progress towards the objective: function GetLeaderBoardDetails (boardIndex,questIndex) local description, objectiveType, isCompleted = GetQuestLogLeaderBoard (boardIndex,questIndex); local itemName, numItems, numNeeded = description:match("(.*):%s*([%d]+)%s*/%s*([%d]+)"); return objectiveType, itemName, numItems, numNeeded, isCompleted; end -- returns eg. "monster", "Young Nightsaber slain", 1, 7, nil

  • The type "player" was added in WotLK, which is used by No Mercy! and probably other quests.
  • The type "log" was added sometime around patch 3.3.0, and seems to have replaced many instances of "event".
  • Only ever found one quest, The Thandol Span (3) that had an "object" objective.
  • The return value can be incomplete under some circumstances, with localized item or NPC names missing from the text.
  • - A function with identical returns, but takes a QuestID argument instead of QuestLogIndex.

Source

https://warcraft.wiki.gg/wiki/API_GetQuestLogLeaderBoard · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.