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