diff --git a/FreshShit/StinkyDetector/event2.lua b/FreshShit/StinkyDetector/event2.lua new file mode 100644 index 0000000..48881a8 --- /dev/null +++ b/FreshShit/StinkyDetector/event2.lua @@ -0,0 +1,8 @@ +-- TICKER_200 +function() + local whisper = aura_env.whisperQueue[1] + if whisper == nil then return end + SendChatMessage(whisper.msg, "WHISPER", nil, whisper.to) + print(string.format("Whispering %s, %d remaining in queue", whisper.to, #aura_env.whisperQueue)) + table.remove(aura_env.whisperQueue, 1) +end \ No newline at end of file diff --git a/FreshShit/StinkyDetector/init.lua b/FreshShit/StinkyDetector/init.lua index 6d81415..f85fb38 100644 --- a/FreshShit/StinkyDetector/init.lua +++ b/FreshShit/StinkyDetector/init.lua @@ -16,8 +16,14 @@ WeakAurasSaved.Cyka.Stinkies = { ["Totleta"] = true, } -local toNotify = {"Муркот", "Succpotato"} --- local toNotify = { "Succpotato" } +local toNotify = {"Succpotato"} +-- Extazyk +-- Smokefire +-- Smokemantra +-- Хихихантер +-- Муркот +-- Растафаркрай +aura_env.whisperQueue = {} aura_env.alliancettl = 120 aura_env.alliance = {} @@ -45,10 +51,11 @@ aura_env.RegisterKill = function(source, destination, spellName, overkill) local msg = string.format("%s убил %s с помощью %s", source, destination, spellName) if overkill then - msg = string.format("%s убил %s с помощью %s с переполнением", source, destination, spellName) + msg = string.format("%s убил %s с помощью %s с переполнением %d", source, destination, spellName, overkill) end for k, v in pairs(toNotify) do - SendChatMessage(msg, "WHISPER", nil, v) + -- SendChatMessage(msg, "WHISPER", nil, v) + table.insert(aura_env.whisperQueue, {to=v, msg=msg}) end recentlyKilled[source] = GetTime() end @@ -62,7 +69,9 @@ aura_env.StinkyDetected = function(name) GetTime() - 60 then PlaySoundFile("Interface\\Sounds\\Domination.ogg", "Master") for k, v in pairs(toNotify) do - SendChatMessage(name .. " в Оргриммаре!", "WHISPER", nil, v) + local msg = string.format("%s в Оргриммаре!", name) + -- SendChatMessage(msg, "WHISPER", nil, v) + table.insert(aura_env.whisperQueue, {to=v, msg=msg}) end end aura_env.localStinkies[name] = GetTime()