Meme Sound Update

This commit is contained in:
Cinecom
2025-08-15 20:06:54 +02:00
parent b8c71d9059
commit 51b2ad4ee0
27 changed files with 37 additions and 4 deletions
+30
View File
@@ -81,3 +81,33 @@ ChatFrame_OnEvent = function(event)
-- Call original handler for all other messages
originalChatFrame_OnEvent(event)
end
if event == "ADDON_LOADED" then
-- default ON
if sepgp_sound == nil then sepgp_sound = true end
-- seed RNG once per session
math.randomseed(GetTime() * 1000)
math.random(); math.random(); math.random()
-- /epgp sound on|off
SLASH_EPGP1 = "/epgp"
SlashCmdList["EPGP"] = function(msg)
msg = (msg or ""):lower()
local cmd, arg = msg:match("^(%S+)%s*(.*)$")
if cmd == "sound" then
if arg == "on" then
sepgp_sound = true
DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00EPGP: sound ON|r")
elseif arg == "off" then
sepgp_sound = false
DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00EPGP: sound OFF|r")
else
DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Usage: /epgp sound on|off|r")
end
else
DEFAULT_CHAT_FRAME:AddMessage("|cffffcc00Usage: /epgp sound on|off|r")
end
end
end