[QUOTE=Dwing;8531613]if you are looking for something addony to do this you could try this code.
Code:
local f = CreateFrame("Frame")
local spellsoundcooldown = 0
f:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
f:SetScript("OnEvent", function(self,event,...)
local arg = {...}
local sounds = {"Sound\\Music\\ZoneMusic\\DMF_L70ETC01.mp3"}
local spells = {"Water Shield","Water Walking"}
for i,v in ipairs(spells) do
if (arg[3] == UnitGUID("player")) and (arg[10] == v) and (arg[2] == "SPELL_AURA_APPLIED" or arg[2] == "SPELL_CAST_SUCCESS") then
if spellsoundcooldown < GetTime() then
PlaySoundFile(sounds[random(1,#sounds)])
spellsoundcooldown = GetTime()+30
end
end
end
end)
just edit the line
Code:
local sounds = {"Sound\\Music\\ZoneMusic\\DMF_L70ETC01.mp3"}
local spells = {"Heroism"}
you can add things like thise
Code:
local sounds = {"Sound\\Music\\ZoneMusic\\DMF_L70ETC01.mp3","sound path"}
local spells = {"Heroism","spell/aura name"}
hope this helps
Alright, I got the thing that i was looking for working =], hats off to you my friend. One question came up, how could I modify the code so It would play 4 Sounds for 1 spell at random, different sound each time? Also how do I modify the timer at which the music/sound would be played on the proc, because i want to make it not spam at me every 10 secs, because my Killing Machine procs alot. Thanks