Thread Tools Display Modes
01-25-14, 03:53 AM   #41
Nuru0190
A Fallenroot Satyr
Join Date: Jan 2014
Posts: 24
All right, i've got total of 22 spells listed.
There is one however - Tiger's Lust - that not only doesn't play the associated sound, but also prevents all the other sound files from playing. I entered the spell ID correctly i believe (the number at the end of the URL for that spell page on Wowhead).
Is it because of the ' after Tiger?
I also thought that it might be because Tiger's Lust is a talent rather than an ability that it doesn't work, but both Chi Wave and Leg Sweep work.

Also, i have a quote that should be triggered by character's death (the character i play). Could you give me the code line for that one, please?

Last edited by Nuru0190 : 01-25-14 at 04:56 AM.
  Reply With Quote
01-25-14, 06:38 AM   #42
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
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:
  1. local Channeled = {
  2.     [113656] = 'Fists of Fury',
  3. }
  4.  
  5. local Instants = {
  6.     [100784] = 'Blackout Kick',
  7.     [115072] = 'Expel Harm',
  8.     [101545] = 'Flying Serpent Kick',
  9.     [117368] = 'Grapple Weapon',
  10.     [115178] = 'Resuscitate',
  11.     [107428] = 'Rising Sun Kick',
  12.     [116705] = 'Spear Hand Strike',
  13.     [101546] = 'Spinning Crane Kick',
  14.     [100787] = 'Tiger Palm',
  15.     [122470] = 'Touch of Karma',
  16.     [115176] = 'Zen Meditation',
  17.     [115078] = 'Paralysis',
  18.     [115203] = 'Fortifying Brew',
  19.     [115080] = 'Touch of Death',
  20.     [116740] = 'Tigereye Brew',
  21.     [116841] = 'Tigers Lust',
  22. }
  23.  
  24. local SoundPath = [[Interface\AddOns\HokutoNoMonk\sounds\]]
  25.  
  26. local f = CreateFrame('frame')
  27. f:SetScript('OnEvent', function(self, event, unit, spellName, _, _, spellID)
  28.     if event == 'UNIT_SPELLCAST_CHANNEL_START' and Channeled[spellID] then
  29.         PlaySoundFile(SoundPath .. Channeled[spellID] .. '.ogg', 'SFX')
  30.     elseif event == 'UNIT_SPELLCAST_SUCCEEDED' and Instants[spellID] then
  31.         PlaySoundFile(SoundPath .. Instants[spellID] .. '.ogg', 'SFX')
  32.     elseif event == 'PLAYER_DEAD' then
  33.         PlaySoundFile(SoundPath .. 'DeadSound.ogg', 'SFX')
  34.     end
  35. end)
  36.  
  37. f:RegisterUnitEvent('UNIT_SPELLCAST_CHANNEL_START', 'player')
  38. f:RegisterUnitEvent('UNIT_SPELLCAST_SUCCEEDED', 'player')
  39. 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.

Last edited by semlar : 01-25-14 at 07:54 AM.
  Reply With Quote
01-25-14, 08:21 AM   #43
Nuru0190
A Fallenroot Satyr
Join Date: Jan 2014
Posts: 24
I edited this post a dozen times now

So I know how to add new spells now, all of them work, including Tiger's Lust.

I think i also understand more or less why you wrote the code the way you did.


I spent quite some time editing and working on the sound files.
Would you like me to send them to you, so that you can see how it sounds?
It's all in japanese, since Hokuto no ken is japanese. Usually the quotes i chose are more or less appropriate for the situation. If you need a translation, i can also send it to you

Last edited by Nuru0190 : 01-25-14 at 09:07 AM.
  Reply With Quote
01-25-14, 09:25 AM   #44
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Well it sounds like you got it working, so that's good.

You should upload your addon here so other people can enjoy it!
  Reply With Quote
01-25-14, 09:29 AM   #45
Nuru0190
A Fallenroot Satyr
Join Date: Jan 2014
Posts: 24
Well, even though i spent some time on the sound files, the editing, etc.. you did all the coding, so it's as much my addon as it is yours.
How about i try to upload it on curse, or wowinterface?

Last edited by Nuru0190 : 01-25-14 at 09:41 AM.
  Reply With Quote
01-25-14, 12:52 PM   #46
Nuru0190
A Fallenroot Satyr
Join Date: Jan 2014
Posts: 24
I posted the addon on Curse. It's waiting approval now.
Of course, you are credited for making half the work.
Can you give me a link to your mods, i would like to put it in the overview section so that people can check them out
  Reply With Quote
01-25-14, 02:38 PM   #47
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
Some of my addons are on here, you can just click the Addon Author button under my name, some of them are on curse.

I actually don't upload a lot of the little projects I work on because they aren't very polished.

I think Quest Plates, Rarefied and my cooldown addon are the only ones I really keep updated and they're on curse.
  Reply With Quote
01-25-14, 03:29 PM   #48
Nuru0190
A Fallenroot Satyr
Join Date: Jan 2014
Posts: 24
Oki
So the addon is named " Call me Kenshiro ".
If it is approved, please take the time to have a look

I listed all your addons in the description!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » HELP: An eccho issue with a sound addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off