Its working
This commit is contained in:
parent
42edac0060
commit
42242a2362
BIN
laughtracks/Audience Laughing-00.wav
Executable file
BIN
laughtracks/Audience Laughing-00.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-01.wav
Executable file
BIN
laughtracks/Audience Laughing-01.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-02.wav
Executable file
BIN
laughtracks/Audience Laughing-02.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-03.wav
Executable file
BIN
laughtracks/Audience Laughing-03.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-04.wav
Executable file
BIN
laughtracks/Audience Laughing-04.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-05.wav
Executable file
BIN
laughtracks/Audience Laughing-05.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-06.wav
Executable file
BIN
laughtracks/Audience Laughing-06.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-07.wav
Executable file
BIN
laughtracks/Audience Laughing-07.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-08.wav
Executable file
BIN
laughtracks/Audience Laughing-08.wav
Executable file
Binary file not shown.
BIN
laughtracks/Audience Laughing-09.wav
Executable file
BIN
laughtracks/Audience Laughing-09.wav
Executable file
Binary file not shown.
2
laughtracks/readme.txt
Executable file
2
laughtracks/readme.txt
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
Yes, I actually paid for those.
|
||||||
|
See: https://audiojungle.net/item/audience-laughing/10165646
|
46
main.lua
46
main.lua
@ -1 +1,45 @@
|
|||||||
print("HAHAHHAHA")
|
Sitcomify = {}
|
||||||
|
|
||||||
|
Sitcomify.Laugh = function()
|
||||||
|
randomIndex = random(0,9);
|
||||||
|
PlaySoundFile("Interface\\AddOns\\Sitcomify\\laughtracks\\Audience Laughing-0" .. randomIndex .. ".wav", "MASTER");
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local eventFrame = CreateFrame("frame", "SitcomifyMainframe");
|
||||||
|
eventFrame:RegisterEvent("PLAYER_DEAD");
|
||||||
|
eventFrame:RegisterEvent("ENCOUNTER_END");
|
||||||
|
eventFrame:RegisterEvent("LFG_PROPOSAL_FAILED");
|
||||||
|
eventFrame:RegisterEvent("LOSS_OF_CONTROL_ADDED");
|
||||||
|
eventFrame:SetScript("OnEvent", function(self, e, ...)
|
||||||
|
|
||||||
|
--> Laugh if the player dies
|
||||||
|
if (e == "PLAYER_DEAD") then
|
||||||
|
Sitcomify.Laugh();
|
||||||
|
|
||||||
|
--> Laugh if the players group wipes
|
||||||
|
elseif (e == "ENCOUNTER_END") then
|
||||||
|
encounterSuccessful = select(5, ...);
|
||||||
|
if (encounterSuccessful == 0) then
|
||||||
|
Sitcomify.Laugh();
|
||||||
|
end
|
||||||
|
|
||||||
|
--> Laugh if someone doesn't accept the LFR/LFG invite
|
||||||
|
elseif (e == "LFG_PROPOSAL_FAILED") then
|
||||||
|
Sitcomify.Laugh();
|
||||||
|
|
||||||
|
--> Laugh if the player gets stunned
|
||||||
|
elseif (e == "LOSS_OF_CONTROL_ADDED") then
|
||||||
|
Sitcomify.Laugh();
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
end);
|
||||||
|
|
||||||
|
SLASH_SITCOMIFY1 = "/laughtrack"
|
||||||
|
SLASH_SITCOMIFY1 = "/lt"
|
||||||
|
|
||||||
|
SlashCmdList["SITCOMIFY"] = function(msg)
|
||||||
|
Sitcomify.Laugh();
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user