Lore archive · Warcraft Wiki, 2023 dump
API QuestPOIGetIconInfo
Last wiki revision 2022-08-03
Returns WorldMap POI icon information for the given quest. completed, posX, posY, objective = QuestPOIGetIconInfo(questId)
- questId: - you can get this from the quest link or from GetQuestLogTitle(questLogIndex).
- completed: - is the quest completed (the icon is a question mark).
- posX: (between 0 and 1 inclusive) - the X position where the icon is shown on the map.
- posY: (between 0 and 1 inclusive) - the Y position where the icon is shown on the map.
- objective: - which is sometimes negative and doesn't appear to have anything to do with the quest's actual objectives.
local playerX, playerY = GetPlayerMapPosition("player") local _, questX, questY = QuestPOIGetIconInfo(12345) local diffX, diffY = abs(playerX - questX), abs(playerY - questY) local distanceToTarget = math.sqrt(math.pow(diffX, 2) + math.pow(diffY, 2)) print("You are ", floor(distanceToTarget * 100), " clicks from the target location.")
You are 42 clicks from the target location.
Source
https://warcraft.wiki.gg/wiki/API_QuestPOIGetIconInfo · 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.