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

40 lines
1.5 KiB
Lua

-- CHAT_MSG_SYSTEM
function(e, msg)
if e == "OPTIONS" then
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ")
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "-> Return to Karazhan: Lower / isDPS / +++5 / 8m29s / 59.1 ")
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "-> Cathedral of Eternal Night / isDPS / +++2 / 9m41s / 23.4 ")
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "-> Seat of the Triumvirate / isDPS / +++14 / 14m54s / 165.5 ")
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "-> Return to Karazhan: Upper / isDPS / +++11 / 10m23s / 128.0 ")
WeakAuras.ScanEvents("CHAT_MSG_SYSTEM", "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ")
end
if not msg then return end
if msg:find("stats not found") then
aura_env.messageSent = false
return
end
if msg:find("Incorrect syntax") and aura_env.messageSent then
local name = UnitName("target")
if not name then return end
if not aura_env.me then aura_env.me = UnitName("player") end
local msg = ".ch " .. name
C_Timer.After(0.5, function()
SendChatMessage(msg, "WHISPER", nil, aura_env.me)
end)
return
end
if string.byte(msg, 1) + string.byte(msg, 6) == 77 then
aura_env.messageSent = false
aura_env.reading = not aura_env.reading
if aura_env.reading then
aura_env.fullMessage = {}
else
aura_env.Process()
end
return
end
if aura_env.reading then
aura_env.fullMessage[#aura_env.fullMessage + 1] = msg
end
end