Skip to content
Maintankadin

For those bothered by ShoR's lack of a sound effect...

_Chloe
Wed Jul 01, 2009 12:29 am

Re:

Maethoriel wrote:If one does not want to install TJH, try this:

Create a folder in your addon directory, name it "SoundShoR" or what ever you like.
In there, create a new textfile and name it Core.lua (without the .txt), open it with notepad, copy and paste:
Code: Select all
local playerGUID
local function onPlayerEnteringWorld()
   playerGUID = UnitGUID("player")
end

local SPELL_CAST_SUCCESS = "SPELL_CAST_SUCCESS"
local function onCombatLogEvent(_, _, _, event, sourceGUID, _, _, _, _, _, spellId, _, _)
   if (sourceGUID == playerGUID) and (event == SPELL_CAST_SUCCESS) and ((spellId == 53600) or (spellId == 61411)) then
      PlaySoundFile(YOUR SOUND FILE HERE)
   end
end

local eventFrame = CreateFrame("Frame")
eventFrame:SetScript("OnEvent",
   function(eventFrame, event, ...)
      eventFrame[event](eventFrame, event, ...)
   end)

eventFrame.PLAYER_ENTERING_WORLD = onPlayerEnteringWorld
eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")

eventFrame.COMBAT_LOG_EVENT_UNFILTERED = onCombatLogEvent
eventFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")


Create a second textfile, name it "SoundShoR.toc" or the name you gave the folder with .toc as suffix.
Copy and paste:
Code: Select all
## Interface: 30000
## Title: YOUR TITEL HERE (Name of the folder)
## Notes: YOUR NOTE HERE
## Author: Maethoriel
## Version: 1.0.0

Core.lua


You have to replace YOUR SOUND FILE HERE with the path to what ever sound you want to hear.
Example:
PlaySoundFile("Sound\\Spells\\ShieldWallTarget.wav")

Still haven't found one that i like tough :\


Put this up on WoWI.

Also, /script PlaySoundFile("Sound\\Creature\\Cow\\CowDeath.wav")
MotiVater
Wed Jul 01, 2009 9:49 am

Re: For those bothered by ShoR's lack of a sound effect...

NapiCAE wrote:
Maethoriel wrote:If one does not want to install TJH, try this:



Create a folder in your addon directory, name it "SoundShoR" or what ever you like.

In there, create a new textfile and name it Core.lua (without the .txt), open it with notepad, copy and paste:




when i do this, the addon is then made but in the game it does nothing... I check the addon list and it says incompatible... here is what i have

core.lua
Code: Select all
    local playerGUID
    local function onPlayerEnteringWorld()
       playerGUID = UnitGUID("player")
    end

    local SPELL_CAST_SUCCESS = "SPELL_CAST_SUCCESS"
    local function onCombatLogEvent(_, _, _, event, sourceGUID, _, _, _, _, _, spellId, _, _)
       if (sourceGUID == playerGUID) and (event == SPELL_CAST_SUCCESS) and ((spellId == 53600) or (spellId == 61411)) then
          PlaySoundFile("Sound\\Spells\\LevelUp.wav")
       end
    end

    local eventFrame = CreateFrame("Frame")
    eventFrame:SetScript("OnEvent",
       function(eventFrame, event, ...)
          eventFrame[event](eventFrame, event, ...)
       end)

    eventFrame.PLAYER_ENTERING_WORLD = onPlayerEnteringWorld
    eventFrame:RegisterEvent("PLAYER_ENTERING_WORLD")

    eventFrame.COMBAT_LOG_EVENT_UNFILTERED = onCombatLogEvent
    eventFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")


toc
Code: Select all
    ## Interface: 30000
    ## Title: soundShoR
    ## Notes: plays a leveling sound when ShoR is used
    ## Author: Maethoriel
    ## Version: 1.0.0

    Core.lua


have i botched something?


Same problem for me too.....
MotiVater
Thu Jul 02, 2009 11:50 am

Re: For those bothered by ShoR's lack of a sound effect...

[Bump]
I assume some changes in 3.1 broke the above? Someone able to point out what needs to be changed please?