What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Plugin - know when the character is looting?

jim87

New Member
Joined
Aug 26, 2011
Messages
445
Reaction score
7
Hello!

I'd like to know if there is a public "event" when the character has looted any item, and how I can call a method when this event fires.

Thanks :)
 
Code:
Styx.BotEvents.Player.OnMobLooted

Code:
Styx.BotEvents.Player.OnMobLooted += OnMobLooted;

Code:
public void OnMobLooted(Styx.BotEvents.Player.MobLootedEventArgs args)
        {
        }
 
Uhm, that works fine, but not when you actually loot a fish via fishing. Is there any specific event for that?
 
lua events from docs/events - World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

LOOT_BIND_CONFIRM Fires when the player attempts to loot a Bind on Pickup item
LOOT_CLOSED Fires when the player ends interaction with a lootable corpse or object
LOOT_OPENED Fires when the player begins interaction with a lootable corpse or object
LOOT_SLOT_CHANGED This event is not yet documented
LOOT_SLOT_CLEARED Fires when the contents of a loot slot are removed
 
Problem is that none of them assure me all the loots...

LOOT_BIND_CONFIRM: it says there is a prompt
LOOT_CLOSED: it says the loot frame is closed - too late
LOOT_OPENED: it's ok, but it doesn't tell I've looted all the items
LOOT_SLOT_CHANGED: I may investigate on this
LOOT_SLOT_CLEARED: it says an item has been removed from the list.

Maybe I may use LOOT_SLOT_OPENED to fetch a list of items and LOOT_SLOT_CLEARED to know which one has been looted? This is not 100% secure as another character may loot it...
 
Why wouldnt open/close ensure all loots?
As far as i know even those frames that you visually don't see are opened and closed, just too fast for your client to realize (due to latency probably), but i'm 99.9% sure events are fired.
 
Yes, for grinding is just good enought to see the loot in the open frame event. But it would be bug-ous if in party.

Another way may be to have a list of items in inventory when the bot starts and then make the difference when the loot tab is closed, that may work the same.
 
Personally i don't see any difference between grinding/party/fishing/mining/herbing or whatever, either way loot event is fired as long as you open loot frame, afaik it's not possible to check if someone else in your party opened loot frame.

If you want to monitor flow of items use "CHAT_MSG_LOOT" instead.

http://www.wowpedia.org/Events/Loot here you have list of probably all loot-related events
 
Back
Top