For Tiger's Lust you'll have to put double quotes around it like "Tiger's lust" instead of 'Tiger's Lust' because the string would stop at the first quote and cause an error which would prevent the rest of the script from running.
Although it might be a better idea to leave the apostrophe out and change the file name to match. It doesn't need to match the spell name since it's using the spell ID, the name is just what sound file you want it to play when that spell ID is detected.
Lua Code:
local Channeled = {
[113656] = 'Fists of Fury',
}
local Instants = {
[100784] = 'Blackout Kick',
[115072] = 'Expel Harm',
[101545] = 'Flying Serpent Kick',
[117368] = 'Grapple Weapon',
[115178] = 'Resuscitate',
[107428] = 'Rising Sun Kick',
[116705] = 'Spear Hand Strike',
[101546] = 'Spinning Crane Kick',
[100787] = 'Tiger Palm',
[122470] = 'Touch of Karma',
[115176] = 'Zen Meditation',
[115078] = 'Paralysis',
[115203] = 'Fortifying Brew',
[115080] = 'Touch of Death',
[116740] = 'Tigereye Brew',
[116841] = 'Tigers Lust',
}
local SoundPath = [[Interface\AddOns\HokutoNoMonk\sounds\]]
local f = CreateFrame('frame')
f:SetScript('OnEvent', function(self, event, unit, spellName, _, _, spellID)
if event == 'UNIT_SPELLCAST_CHANNEL_START' and Channeled[spellID] then
PlaySoundFile(SoundPath .. Channeled[spellID] .. '.ogg', 'SFX')
elseif event == 'UNIT_SPELLCAST_SUCCEEDED' and Instants[spellID] then
PlaySoundFile(SoundPath .. Instants[spellID] .. '.ogg', 'SFX')
elseif event == 'PLAYER_DEAD' then
PlaySoundFile(SoundPath .. 'DeadSound.ogg', 'SFX')
end
end)
f:RegisterUnitEvent('UNIT_SPELLCAST_CHANNEL_START', 'player')
f:RegisterUnitEvent('UNIT_SPELLCAST_SUCCEEDED', 'player')
f:RegisterEvent('PLAYER_DEAD')
I don't know what other spells you wanted to add, but the spell IDs shouldn't be too hard to find.