ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Any way to find out who/what dropped a loot item? (https://www.esoui.com/forums/showthread.php?t=9201)

remosito 06/08/20 03:28 AM

Any way to find out who/what dropped a loot item?
 
Howdie all :-)

is there a way to find out what/who dropped an item?

I found the Event one can hook into. But the return values only give back who received an item.

Lua Code:
  1. EVENT_LOOT_RECEIVED (*string* _receivedBy_, *string* _itemName_, *integer* _quantity_, *[ItemUISoundCategory|#ItemUISoundCategory]* _soundCategory_, *[LootItemType|#LootItemType]* _lootType_, *bool* _self_, *bool* _isPickpocketLoot_, *string* _questItemIcon_, *integer* _itemId_, *bool* _isStolen_)

Is there a way to get the mob/chest/node that dropped it?

(Wanted to start to log what/who drops what Leads)

thanks a lot in advance

Baertram 06/08/20 06:37 AM

Often answered: no
We got no api to return the drop name or unit tag or whatever.
You could try workarounds like capture last hovered mouse/crosshair/reticle name and if after that loot was started within a few seconds this one might have been the loot giver... But this is just as far as you can get here I guess.

Micke2nd 06/08/20 07:23 AM

...or the enemy from last fight, or last quest giver
If mouseover delivers to many options

remosito 06/08/20 10:30 AM

thank you both for the answers.

It is as I feared then :-)

Was thinking about the route of last kill too. Came as far as

EVENT_COMBAT_EVENT of ActionType ACTION_RESULT_DIED or ACTION_RESULT_DIED_XP (to avoid critters???)

thought before I go any further and try to track down similar hooks for chests, treasure map chests, saveboxes, containers, resource nodes. And whereever else Leads come from. I ask to make sure I dont jump through 1 million hoops just for missing/notfinding an easier solution... :-)

First though, I guess I'll give a good hard think towards if I really want to do it ;-)

thanks again for the quick replies

Baertram 06/08/20 01:26 PM

Event_inventory_single_slot_update fires for new items. You can filter it to only fire as your player gets new items and check with this what item came in new. You only need to track the sources you have mentioned already (chests, bags, containers, enemies bodies, etc.) , and maybe with event_loot* to compare the itemName as well, to be sure it really was looted (and not obtained from a mail attachment etc. But the mapping of sources to items should be hard to make "safe". If you e. G. Loot bags and overland sacks or whatever wuicly after another you cannot be sure what item came from what container...


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

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