Thread Tools Display Modes
10/03/17, 12:33 PM   #1
ObjectMetadata
 
ObjectMetadata's Avatar
Join Date: Oct 2017
Posts: 7
Getting the name or the ID of the current tracked quest

Hi guys,
I'm struggling to find a function to get the name and/or the ID of the quest I'm currently tracking. I looked through the API but i could not find anything
Do any of you know which function I have to use?
Thanks!
  Reply With Quote
10/03/17, 12:52 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Why?

journalIndex is not enought?
  Reply With Quote
10/03/17, 12:58 PM   #3
ObjectMetadata
 
ObjectMetadata's Avatar
Join Date: Oct 2017
Posts: 7
Thanks for your reply!
How do I use journalIndex? It's always nil when I print it
  Reply With Quote
10/03/17, 01:40 PM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ObjectMetadata View Post
Thanks for your reply!
How do I use journalIndex? It's always nil when I print it
Its not that easy.
You should use some tool addons like zgoo.

Lua Code:
  1. for i = 1,QUEST_TRACKER:GetNumTracked() do
  2.     local entry = QUEST_TRACKER:GetTrackedByIndex(i)
  3.     d(GetJournalQuestName(entry:GetJournalIndex()))
  4. end
  Reply With Quote
10/03/17, 01:51 PM   #5
ObjectMetadata
 
ObjectMetadata's Avatar
Join Date: Oct 2017
Posts: 7
Hi votan,
your solution prints all quests that are currently tracked. However I just need the ID of the one quest that is currently displayed in the top right corner, not all quests. Or am I missing something in your solution?
  Reply With Quote
10/03/17, 02:06 PM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ObjectMetadata View Post
Hi votan,
your solution prints all quests that are currently tracked. However I just need the ID of the one quest that is currently displayed in the top right corner, not all quests. Or am I missing something in your solution?
ah, yes. How stupid, I forgot:
Lua Code:
  1. for i = 1,QUEST_TRACKER:GetNumTracked() do
  2.     local entry = QUEST_TRACKER:GetTrackedByIndex(i)
  3.     if GetTrackedIsAssisted(TRACK_TYPE_QUEST, entry:GetJournalIndex()) then
  4.         d(GetJournalQuestName(entry:GetJournalIndex()))
  5.     end
  6. end
  Reply With Quote
10/03/17, 02:23 PM   #7
ObjectMetadata
 
ObjectMetadata's Avatar
Join Date: Oct 2017
Posts: 7
Yes, this works perfectly!
Thanks a lot!!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Getting the name or the ID of the current tracked quest

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