1. #1
    Deleted

    Random Sound File

    Is there a way to make a macro that will play a random sound file out of a selection you choose? My Guildy has been playing around with attaching a sound file of Tarecgosa saying "I am with you always" when he uses the Staff mount affect, and I was wondering if you could set it to choose a random sound file.

  2. #2
    i would like to know as well think it would be awsome
    I Know My Spelling Is Bad so Live With it or dont and just die

  3. #3
    I got as far as this but I have no idea what I'm doing, so maybe someone can take over.

    Code:
    local sounds = {"VO_QUEST_42_TARECGOSA_WHISPER_A_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_08.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_09.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_10.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_11.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_08.ogg"}
    local f = CreateFrame("Frame")
    f:SetScript("OnEvent", CallCompanion("MOUNT",1) end) PlaySoundFile("Sound\\Creature\\Tarecgosa\\"..sounds[math.random(#sounds)]) end)

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  4. #4
    Deleted
    Well, nah.
    Code:
    local sounds = {"VO_QUEST_42_TARECGOSA_WHISPER_A_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_08.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_09.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_10.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_11.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_08.ogg"}
    local UnitIsUnit, random = UnitIsUnit,math.random
    local f = CreateFrame("Frame")
    f:SetScript("OnEvent",function(s,e,u,_,_,_,id) if UnitIsUnit("player",u) and (id == 101641) then PlaySoundFile("Sound\\Creature\\Tarecgosa\\"..sounds[random(#sounds)]) end end)
    f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
    How to use.

  5. #5
    I tested it Treeston and it is indeed awesome.

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  6. #6
    Quote Originally Posted by Treeston View Post
    Well, nah.
    Code:
    local sounds = {"VO_QUEST_42_TARECGOSA_WHISPER_A_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_08.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_09.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_10.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_A_11.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_01.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_02.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_03.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_04.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_05.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_06.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_07.ogg", "VO_QUEST_42_TARECGOSA_WHISPER_B_08.ogg"}
    local UnitIsUnit, random = UnitIsUnit,math.random
    local f = CreateFrame("Frame")
    f:SetScript("OnEvent",function(s,e,u,_,_,_,id) if UnitIsUnit("player",u) and (id == 101641) then PlaySoundFile("Sound\\Creature\\Tarecgosa\\"..sounds[random(#sounds)]) end end)
    f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
    How to use.
    Awsome is there anyway to make any random soundfile in game play with a click of a button or is that to hard/time consuming?
    I Know My Spelling Is Bad so Live With it or dont and just die

  7. #7
    I'm guessing there theoreticly is, but the shear amount of code needed for that is far too large to make into an addon. It could possibly take months worth of endless typing too.

    Limiting the number of possible sound files might work though, but it would still be a massive amount of code.
    Last edited by Netherspark; 2011-11-12 at 03:39 AM.

  8. #8
    About 90% of the sound files in game are random creature groaning noises from being hit. The rest are a mixed bag of more groaning noises, weapons hitting things, UI clicks, etc. Those speech files fit well with the mount in my opinion, as they are the complete set of whispers from Tarecgosa.

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

  9. #9
    hmm would doing a random raid boss sentence be to much like do one for all bosses from uld so if i click it i can hear a random boss in uld talk? if its to much wich probly is can you do me random algron one that would be cool
    I Know My Spelling Is Bad so Live With it or dont and just die

  10. #10
    I guess... these requests are starting to not make sense anymore and these have to be put together by hand so this one does the Algalon quotes when you use a Celestial Steed and you can figure out how to make more by finding the sound files locations on google and finding the ID of the mount spell on wowhead.

    Code:
    local sounds = {"UR_Algalon_Adds01.ogg", "UR_Algalon_Adds02.ogg", "UR_Algalon_Aggro01.ogg", "UR_Algalon_Berserk02.ogg", "UR_Algalon_Berzerk01.ogg", "UR_Algalon_Death01.ogg", "UR_Algalon_Death02.ogg", "UR_Algalon_Death03.ogg", "UR_Algalon_Slay01.ogg", "UR_Algalon_Slay02.ogg", "UR_Algalon_Space01.ogg", "UR_Algalon_Special01.ogg", "UR_Algalon_Special02.ogg", "UR_Algalon_Summon01.ogg", "UR_Algalon_Summon02.ogg", "UR_Algalon_Summon03.ogg", "UR_Algalon_Timer01.ogg", "UR_Algalon_Timer02.ogg", "UR_Algalon_Timer03.ogg"}
    local UnitIsUnit, random = UnitIsUnit,math.random
    local f = CreateFrame("Frame")
    f:SetScript("OnEvent",function(s,e,u,_,_,_,id) if UnitIsUnit("player",u) and (id == 75614) then PlaySoundFile("Sound\\creature\\AlgalonTheObserver\\"..sounds[random(#sounds)]) end end)
    f:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")

    Gershuun @ Borean Tundra US - Interface & Macros Moderator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •