API GetQuestLogLeaderBoard

From Wowpedia
Jump to: navigation, search

Returns information about a quest objective.

description, objectiveType, isCompleted = GetQuestLogLeaderBoard(i, [questIndex])


Number - Index of the quest objective to query, ascending from 1 to GetNumQuestLeaderBoards(questIndex).
Optional Number - Index of the quest log entry to query, ascending from 1 to GetNumQuestLogEntries. If not provided or invalid, defaults to the currently selected quest (via SelectQuestLogEntry)

Return values

String - Text description of the objective, e.g. "0/3 Monsters slain"
String - A token describing objective type, one of "item", "object", "monster", "reputation", "log", "event", "player", or "progressbar".
Boolean - 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 A [80P Daily] 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, A [31] The Thandol Span that had an "object" objective.
  • The description return value can be incomplete under some circumstances, with localized item or NPC names missing from the text.

See also