View Single Post
02/17/18, 04:35 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
1. How can I close a chatter?
When you seach the lua source for the string "goodbye" you will find the following line:
https://github.com/esoui/esoui/blob/...hared.lua#L395
Lua Code:
  1. self:PopulateChatterOption(optionCount, function() self:CloseChatter() end, farewell, CHATTER_GOODBYE, nil, isImportant, nil, importantOptions)
Here we see how the goodbye dialog option is added. We also see that when the option is selected, it will execute self:CloseChatter()
This means INTERACTION:CloseChatter() and GAMEPAD_INTERACTION:CloseChatter() will close the dialog, depending on the UI mode that is currently used (PC or gamepad)

2. How to open the quest reward container?
These two addons open containers, so you can probably learn how to do it by looking at their code:
http://www.esoui.com/downloads/info1655-Unboxer.html (opens all containers in the inventory)
http://www.esoui.com/downloads/info1...itCrafter.html (open crafting writ reward containers)

3. Is it possible to automatically interact with object I have reticle on?
An interaction is started by calling GameCameraInteractStart().
This function is private and can not be called by addons.

4. How to check if a quest is in players journal at addon load?
All quest info is obtained from the GetJournalQuest*** API functions. Visit https://wiki.esoui.com/API and search for GetJournalQuest .
Quick example
Lua Code:
  1. for index = 1, GetNumJournalQuests() do
  2.   if GetJournalQuestInfo() == "some quest name" then
  3.     d("you have a quest called 'some quest name'")
  4.   end
  5. end

Besides of that, I recommend you to look at Dolgubons Lazy Writ Crafter (linked above). That addon has to track the currently active writ quests, which is rather similar to your use-case, so you should be able to learn from that code.
  Reply With Quote