Multiple smaller questions about events and such
I have decided to make an addon to speed up Abah's watch motif farming. I would like to solve some issues and currently don't know how:
1. How can I close a chatter? I have an EVENT_CONVERSATION_UPDATED callback, that get's called when you enter the 2nd chatter screen with the turn in nps, where is only "goodbye" option. How can I close this automatically? 2. How to open the quest reward container? I am auto completing the quest with EVENT_QUEST_COMPLETE_DIALOG callback and then by calling the CompleteQuest function. How can I then open the quest reward? 3. Is it possible to automatically interact with object I have reticle on? With current implementation, player needs to just spam the interact key, while unwated dailies from tip board are abandoned and the desired one is kept. Is there a way to automatically just interact with the board? 4. How to check if a quest is in players journal at addon load? I would like to register for EVENT_CHATTER_BEGIN only if the quest is active. This needs to be done in init, in case player reloads the UI, but my callback is unnecessarily called all the time. I would be really glad if you could answer any of my questions :) Thanks |
Quote:
https://github.com/esoui/esoui/blob/...hared.lua#L395 Lua Code:
This means INTERACTION:CloseChatter() and GAMEPAD_INTERACTION:CloseChatter() will close the dialog, depending on the UI mode that is currently used (PC or gamepad) Quote:
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) Quote:
This function is private and can not be called by addons. Quote:
Quick example Lua Code:
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. |
Thanks for your awesome reply. I had already looked at DolgubonsLazyWritCreator but it's quite a big addon with multiple source files, so it was kinda hard to read through. The Unboxer, on a first glance, should help me solve that issue.
For that first point, how can I know which UI mode is being used? Well, until now I didn't even knew you can find the lua source somewhere. |
Hey, the function that checks for writs is WritCreator.WritSearch. It's found on line 896 of the WritCreator.lua file. That function checks for the basic writ type. This function iterates over all the quests and can be run at any time.
There's also a function for checking the Master Writs. That is WritCreator.MasterWritQuestAdded on line 442 of MasterWrits.lua. This function is a bit more complex, because it also determines whether the quest is asking for weapons/gear and it sets up the information for the next function. (Which determines what to craft) This function mainly runs only when you accept a quest, and it only runs on one quest index at a time. It is however run on all active quests whenever you login. You can run the basic writ search with /dlwcfindwrit. /abandonwrits also runs it, though it has the side effect of abandoning all current basic writ quests. /rerunmasterwrits will call the WritCreator.MasterWritQuestAdded function for every single quest. There's also loot opening in the LootHandler.lua file, mainly in the second half (First half is saving what you get) |
Quote:
|
And can someone suggest any possible way to achieve the repeated quest accepting until the correct one is recieved?
|
1 Attachment(s)
WIKI + examples:
http://wiki.esoui.com/Main_Page Source code (local): http://www.esoui.com/downloads/info1...ourcecode.html Online searchable: https://github.com/esoui/esoui/tree/master/esoui Helping functions within ESO (See attachment) |
Hey, check the questhandler.lua file in the writ crafter too. If you selectively turn off some crafts in the settings menu, you can see how it will ignore those quests but get all the others. Basically, iirc the function is Select Hatter option or something
|
All times are GMT -6. The time now is 08:02 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI