Thread Tools Display Modes
01/13/16, 07:40 AM   #1
robertjawoods
Join Date: Jan 2016
Posts: 2
Getting Offered Quest Info

Hi guys, total Addon noob here. I'm looking for a way to get the quest level or name for the quest that is being offered to me. I saw there was a function called GetOfferedQuestInfo, now that seems to me like it's what I'm after. Could anyone show me some example usage? Any help would be much appreciated.
  Reply With Quote
01/13/16, 08:49 AM   #2
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
I never actually used it, but as far as I understand it can only be used from the event callback for EVENT_QUEST_OFFERED, like this:

Code:
EVENT_MANAGER:RegisterForUpdate("AddOnName", EVENT_QUEST_OFFERED, function(event, ...)
    local dialogue, response = GetOfferedQuestInfo()

    d("Dialogue: "..dialogue)
    d("Response: "..response)
end
My suggestion is get the UI source code and search for the function name to see how it's used.
  Reply With Quote
01/13/16, 09:04 AM   #3
robertjawoods
Join Date: Jan 2016
Posts: 2
Thanks for your help, I've been looking at the docs but I couldn't find a way to turn the dialogue/response from that function into a quest id or name I can use in my search functions. I'm not actually at my home PC with TESO on it, so I'm kind of developing blind at the moment.
  Reply With Quote
01/13/16, 11:02 AM   #4
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by robertjawoods View Post
Thanks for your help, I've been looking at the docs but I couldn't find a way to turn the dialogue/response from that function into a quest id or name I can use in my search functions. I'm not actually at my home PC with TESO on it, so I'm kind of developing blind at the moment.
I'm at work right now, but I took a quick look at the Wiki and noticed some functions that does grab that kind of information about quests, but they require a journalIndex as parameter so I'm going to assume that you can't have the name of the quest unless you have accepted that quest.


Also I forgot to mention that the source code is available online. Here, I found one instance of the function we talked about:
http://esodata.uesp.net/100010/src/i...ed.lua.html#90
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Getting Offered Quest Info


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