ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Getting the name or the ID of the current tracked quest (https://www.esoui.com/forums/showthread.php?t=7393)

ObjectMetadata 10/03/17 12:33 PM

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!

Ayantir 10/03/17 12:52 PM

Why?

journalIndex is not enought?

ObjectMetadata 10/03/17 12:58 PM

Thanks for your reply!
How do I use journalIndex? It's always nil when I print it

votan 10/03/17 01:40 PM

Quote:

Originally Posted by ObjectMetadata (Post 32818)
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

ObjectMetadata 10/03/17 01:51 PM

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?

votan 10/03/17 02:06 PM

Quote:

Originally Posted by ObjectMetadata (Post 32820)
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

ObjectMetadata 10/03/17 02:23 PM

Yes, this works perfectly!
Thanks a lot!! :)


All times are GMT -6. The time now is 12:20 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI