View Single Post
08-15-15, 03:43 PM   #12
Endzeit
A Deviate Faerie Dragon
Join Date: Aug 2015
Posts: 12
this cannot be working like this
for example playername: "Killer"
target returns "Killer"
UnitName("player") returns "Killer nil"


Lua Code:
  1. ChatFrame_AddMessageEventFilter("CHAT_MSG_LOOT",function(self,event,msg,_,_,_,target,  ...)
  2.       local name, realm = UnitName("player")
  3.       if target==name then
  4.         local id=tonumber(msg:match("|Hitem:(%d+)")) or 0;--    Force nil to zero if we have an invalid link (no items exist at index zero)
  5.         if ItemSetNames[id] then return false,msg.." (|cff9400d3Transmog Sets: "..string.join(", ",unpack(ItemSetNames[id])).."|r).",...; end
  6.       end
  7.     end);

this works for UnitName("player"), cant check now if it works for other players

Last edited by Endzeit : 08-15-15 at 03:46 PM.
  Reply With Quote