Thread Tools Display Modes
06/16/17, 09:20 AM   #1
ObserverTim
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 2
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).
  Reply With Quote
06/16/17, 09:44 AM   #2
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
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.
  Reply With Quote
06/16/17, 11:21 AM   #3
Dolgubon
 
Dolgubon's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 408
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()

Last edited by Dolgubon : 06/16/17 at 12:14 PM.
  Reply With Quote
06/19/17, 02:29 AM   #4
ObserverTim
AddOn Author - Click to view addons
Join Date: Jun 2017
Posts: 2
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!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » What did I click?

Thread Tools
Display Modes

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