ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   What did I click? (https://www.esoui.com/forums/showthread.php?t=7146)

ObserverTim 06/16/17 09:20 AM

What did I click?
 
I am brand spanking new to Lua (but with a good chunk of experience in other coding/scripting languages). I've figured out how to trap an item looted and display it, and now I'm wondering how to detect what item I just clicked on/looted. For example,

If I open a barrel, a simple message like "looted barrel"
For a sack, "looted sack"
For looting a corpse "looted corpse"

Don't worry about that last one if it ups the complexity too much, the main goal is to see what I get from various types of containers. And no, I have no idea what the final goal is yet. I can already read what I looted, now I want to know what I looted it from.

I would appreciate greatly any wisdom I can get. As I said before, I do speak programmer, I just don't speak ESO UI (yet).

Rhyono 06/16/17 09:44 AM

You might want to take a look at No Interact. It blacklists containers based on reticle focus, so looking at the code there might better help you with what you're looting. Unless someone has a more direct approach.

Dolgubon 06/16/17 11:21 AM

Check out the writ creator in the loothandler.lua file. IIRC there's a function in there to get the name of the current loot window. I use it to checknif the container is a writ reward container

Edit: It's GetLootTargetInfo()

ObserverTim 06/19/17 02:29 AM

Thanks!
 
Thanks very much, guys! I'll look around both of these and see if I can suss it out. At the very least it will be an excellent learning experience! :)


All times are GMT -6. The time now is 01:36 PM.

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