Files
wow-weakauras/FreshShit/RIOChecker/event2.lua
2024-08-11 21:28:20 +02:00

15 lines
573 B
Lua

-- UNIT_TARGET
function(e, source)
if not source then return end
if not source == "player" then return end
if not UnitExists("target") then return end
if not UnitIsPlayer("target") then return end
local name = UnitName("target")
if not name then return end
if not aura_env.me then aura_env.m = UnitName("player") end
if not aura_env.previousTarget then aura_env.previousTarget = name end
if aura_env.previousTarget == name then return end
local msg = ".ch " .. name
SendChatMessage(msg, "WHISPER", nil, aura_env.me)
aura_env.messageSent = true
end