Reply
Thread Tools Display Modes
Unread 12-20-10, 03:47 AM   #1
Platine
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 8
quest ID

When I talking with npc and receiving any quest, I can use functions: GetTitleText(), GetQuestText(), GetObjectiveText(), etc.
I need received actuel quest ID coresponded to GetTitleText(). How function can I used ?
Quest is not yet in my QuestLog.

Last edited by Platine : 12-20-10 at 03:49 AM.
Platine is offline   Reply With Quote
Unread 12-20-10, 11:22 AM   #2
Ketho
A Molten Giant
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 570
afaik, you first need to have the Quest in your Quest Log to extract the ID from the UI escape sequence

this breaks the UI escape sequence to reveal the Quest ID:
Code:
/run print(strreplace(" [QuestLink] ", "\124", "!"))
alternatively, you can print all the Quest IDs in the quest log with this macro script:
Code:
/run for i = 1, GetNumQuestLogEntries() do if GetQuestLink(i) then print(strreplace(GetQuestLink(i), "\124", "!")) end; end
No idea, how wowhead datamines the quests that you can't have in your questlog though

Edit: Ailea has a better solution ><
__________________

Last edited by Ketho : 12-20-10 at 12:02 PM.
Ketho is offline   Reply With Quote
Unread 12-20-10, 11:50 AM   #3
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 317
A combination of registering for QUEST_DETAIL and then calling GetQuestID() perhaps?

http://wowprogramming.com/docs/events/QUEST_DETAIL
http://wowprogramming.com/docs/api/GetQuestID
__________________
Oh, the simulated horror!
Ailae is offline   Reply With Quote
Unread 12-21-10, 10:05 AM   #4
Platine
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 8
Yes, this is it!

Function GetQuestId() currently does not exist. (?)

Lua error - Message: Interface\AddOns\xxx\xxx.lua:107: attempt to call global 'GetQuestID' (a nil value)

In addition, some sources say, to call the function with parameter http://www.theromwiki.com/API:GetQuestId, but it changes nothing.

If the quest is in Quest Log, simply call the function:
http://wowprogramming.com/docs/api/GetQuestLogTitle
questID return direct from this function.
Platine is offline   Reply With Quote
Unread 12-21-10, 12:05 PM   #5
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 317
Yeah, sure if it's in your log that's a whole other story. I thought you meant you needed the ID _before_ it was in your log.

Dunno why you get errors. Doing /dump GetQuestID() in-game gives 0 on login (as is expected). If I target one of the Winterveil NPCs, Furmund in this case, and do /dump again I get 6964 which seems to be the right one when compared to wowhead.
__________________
Oh, the simulated horror!
Ailae is offline   Reply With Quote
Unread 12-21-10, 02:59 PM   #6
Platine
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 8
Confirm, I need questID _before_ it was in quest log.

Probably the error caused by the server on which I check.
Thank you for your time.
Platine is offline   Reply With Quote
Reply

Go BackWoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » quest ID

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off