-
Posted by Dimension on Sun, 26 Oct 2008 17:47:19
Hi,
Does anyone know how to get the ingame quest-ID from a quest in the questlog?
If you have the quest "Going, Going, Guano!" (Razorfen Kraul), and look at wowhead: http://www.wowhead.com/?quest=1109
You see that it have ID 1109
More websites use that ID. How to read this ID from the quest in the questlog?
Thanks! -
Posted by Dimension on Sun, 26 Oct 2008 17:47:19
Hi,
Does anyone know how to get the ingame quest-ID from a quest in the questlog?
If you have the quest "Going, Going, Guano!" (Razorfen Kraul), and look at wowhead: http://www.wowhead.com/?quest=1109
You see that it have ID 1109
More websites use that ID. How to read this ID from the quest in the questlog?
Thanks! -
Posted by morlando on Mon, 27 Oct 2008 01:24:42
Check out GetQuestLink.
-
Posted by Dimension on Mon, 27 Oct 2008 03:38:28
Hi Morlando, thank you for your fast answer.
I have seen this page, but how can I extract the questID from the questlog?
Like this?
difficultyColor, id, level, name = GetQuestLink(2)
DEFAULT_CHATFRAME:AddMessage(id)Can you please show me a working example?
Thanks!
-
Posted by jnwhiteh on Mon, 27 Oct 2008 06:49:17
You just need to do a simple pattern match on it. For example, a quest link looks like this:
|cffff8040|Hquest:207:38|h[Kurzen's Mystery]|h|r
You can use the string.match function to pull the quest id out using something like this:
/run ChatFrame1:AddMessage(string.match(GetQuestLink(2), "Hquest:(%d+)"))
This will give you the quest id of the first quest in your quest log, as a string. In order to convert it to a number you would use the
tonumber()
function. -
Posted by Dimension on Mon, 27 Oct 2008 12:05:45
That is exactly what I meant :)
Thank you very much !! -
Posted by rml on Tue, 18 Dec 2012 01:43:47
title, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questID, startEvent, displayQuestID = GetQuestLogTitle(questIndex)
where questIndex is between 1 and GetNumQuestLogEntries()