View Single Post
01-24-14, 02:20 PM   #4
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
You could try something like this..
Lua Code:
  1. local Channeled = { ['Fists of Fury'] = true }
  2. local Instants = {
  3.     ['Blackout Kick'] = true,
  4.     ['Expel Harm'] = true,
  5.     ['Flying Serpent Kick'] = true,
  6.     ['Grapple Weapon'] = true,
  7.     ['Resuscitate'] = true,
  8.     ['Rising Sun Kick'] = true,
  9.     ['Spear Hand Strike'] = true,
  10.     ['Spinning Crane Kick'] = true,
  11.     ['Tiger Palm'] = true,
  12.     ['Touch of Karma'] = true,
  13.     ['Zen Meditation'] = true,
  14.     ['Paralysis'] = true,
  15.     ['Fortifying Brew'] = true,
  16.     ['Touch of Death'] = true,
  17.     ['Tigereye Brew'] = true,
  18. }
  19.  
  20. local f = CreateFrame('frame')
  21. f:RegisterUnitEvent('UNIT_SPELLCAST_CHANNEL_START', 'player')
  22. f:RegisterUnitEvent('UNIT_SPELLCAST_SUCCEEDED', 'player')
  23.  
  24. f:SetScript('OnEvent', function(self, event, unit, spellName, ...)
  25.     if (event == 'UNIT_SPELLCAST_CHANNEL_START' and Channeled[spellName])
  26.     or (event == 'UNIT_SPELLCAST_SUCCEEDED' and Instants[spellName]) then
  27.         PlaySoundFile('interface/addons/hokutonomonk/sounds/' .. spellName .. '.ogg', 'SFX')
  28.     end
  29. end)

It's drycoded so let me know if it doesn't work.

Last edited by semlar : 01-24-14 at 02:24 PM.
  Reply With Quote