Originally Posted by Kakjens
You'll need to verify that the one due to whom is the event was your character (not party member - gamepedia article has info how to do it), and it's a item receive event (not, for example, selecting need/greed/pass/DE - gamepedia article doesn't disclose it but checking the OnEvent variables should make it possible).
Test it, with, for example, this:
Lua Code:
local my_event = "CHAT_MSG_LOOT" local f = CreateFrame('Frame') f:RegisterEvent(my_event) f:SetScript('OnEvent', function(self, event, arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11, ...) if event == my_event then print("arg1=",arg1,"arg2=",arg2,"arg3=",arg3,"arg4=",arg4,"arg5=",arg5) print("arg6=",arg6,"arg7=",arg7,"arg8=",arg8,"arg9=",arg9,"arg10=",arg10) print("arg11=",arg11) end end)
|
Thank you, I will continue from this and see how to get itemlink.
Isn't there a way to directly trigger at CHAT_MSG_LOOT event, rather than checking all events and triggering IF the event is CHAT_MSG_LOOT? I mean your use of
if event == my_event.
I checked the eventtrace and noticed that hundreds of events are taking place in a minute, even when your character is just standing still.