Thursday, April 12, 2012

Need help with a sound mod =)

[:1]Hi, I'm trying to make a very simple sound mod that will play a sound clip whenever I cast Lava Burst and Thundstorm. This is what I have atm...

My .TOC


Code:
## Interface: 30200
## Title: Shaman Sounds
## Notes: Shaman Sounds
## Version: 1.0
## Author: Hayashi

ShamanSounds.lua
ShamanSounds.xml

My .XML


Code:
<Ui xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="ShamanSounds.lua"/>
<Frame name="ShamanSounds_Core">
<Scripts>
<OnLoad>
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
</OnLoad>
<OnEvent>
Shaman_Sounds_OnEvent(event, arg1, arg2);
</OnEvent>
</Scripts>
</Frame>
</Ui>

My .LUA


Code:
function Shaman_Sounds_OnEvent(event, arg1, arg2)
local spellName = arg1
if spell == GetSpellInfo(60043) then
if string.find(arg2, spell) and arg1 == "player" then
PlaySoundFile("Interface\\AddOns\\ShamanSounds\\Sounds\\LavaBurst.mp3");
end
elseif spell == GetSpellInfo(59159) then
if string.find(arg2, spell) and arg1 == "player" then
PlaySoundFile("Interface\\AddOns\\ShamanSounds\\Sounds\\Thunderstorm.mp3");
end
end
end



Any ideas?

Thanks

No comments:

Post a Comment