WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Creating Soundtrack custom events? (https://www.wowinterface.com/forums/showthread.php?t=49344)

Kaleesh 05-30-14 11:50 AM

Creating Soundtrack custom events?
 
http://www.curse.com/addons/wow/soundtrack

I can't really find any support for this feature of the addon so I figured I'd ask here.

In terms of scripting, I've only ever done really minor stuff like OnClick events in kgPanels, so I'm floundering here... Not even sure where to start. I dug around in the lua files to see how default events are structured but I'm getting even more lost, haha...

Specifically, I'd like to write a custom event that plays music while I am fishing, and not something that is attached to equipping a fishing pole, since I never use one. Any pointers, guys?

repooc 05-30-14 03:08 PM

Hmm I dont think there is an aura or anything while fishing to track. You can use the events to track when you are channeling a spell and stop channeling it. You can then break it down to see if the spell is fishing.
Below is a quick script I threw together in WoWLua and you can see how it shows when I am channeling a spell and the data it dumps. This isnt made to track just fishing but can be very easily adapted to. I am sure there are other ways but this is something I thought up real fast that may help you get started.
Code:

local f =  CreateFrame("Frame", nil, UIParent)
f:RegisterEvent('UNIT_SPELLCAST_CHANNEL_START')
f:RegisterEvent('UNIT_SPELLCAST_CHANNEL_STOP')
f:SetScript('OnEvent', function(self, event, ...)
      if event == 'UNIT_SPELLCAST_CHANNEL_START' then
        print(...)
        print("Cast started")
      elseif event == 'UNIT_SPELLCAST_CHANNEL_STOP' then
        print("Cast stopped")
      end
     
end)



Event Documentation:
UNIT_SPELLCAST_CHANNEL_START
UNIT_SPELLCAST_CHANNEL_STOP

Resike 05-31-14 07:21 AM

Quote:

Originally Posted by Kaleesh (Post 293101)
http://www.curse.com/addons/wow/soundtrack

I can't really find any support for this feature of the addon so I figured I'd ask here.

In terms of scripting, I've only ever done really minor stuff like OnClick events in kgPanels, so I'm floundering here... Not even sure where to start. I dug around in the lua files to see how default events are structured but I'm getting even more lost, haha...

Specifically, I'd like to write a custom event that plays music while I am fishing, and not something that is attached to equipping a fishing pole, since I never use one. Any pointers, guys?

How the hell you fish without a fishing pole then?

repooc 05-31-14 08:36 AM

Quote:

Originally Posted by Resike (Post 293109)
How the hell you fish without a fishing pole then?

pretty easy as u dont need one equipped these days

Resike 05-31-14 09:15 AM

Quote:

Originally Posted by repooc (Post 293110)
pretty easy as u dont need one equipped these days

Wow, this game has become so bad.

Phanx 05-31-14 11:19 AM

Quote:

Originally Posted by Resike (Post 293109)
How the hell you fish without a fishing pole then?

I think the canon explanation is that you got your fishing badge and can now figure out how to tie your fishing line to random sticks and branches in lieu of a real fishing pole.

10leej 05-31-14 01:24 PM

Quote:

Originally Posted by Phanx (Post 293114)
I think the canon explanation is that you got your fishing badge and can now figure out how to tie your fishing line to random sticks and branches in lieu of a real fishing pole.

Believe it or not that stick you find in the woods actually works better than most fishing poles imho

Phanx 06-01-14 11:01 AM

Quote:

Originally Posted by 10leej (Post 293115)
Believe it or not that stick you find in the woods actually works better than most fishing poles imho

Depends on what you're fishing for, I guess... a random stick is probably fine for little lake perch, but I'm not sure it would fare very well against a big salmon. :p

10leej 06-01-14 12:08 PM

Quote:

Originally Posted by Phanx (Post 293137)
Depends on what you're fishing for, I guess... a random stick is probably fine for little lake perch, but I'm not sure it would fare very well against a big salmon. :p

Worked fine for me. Went salmon fishing quite a few times and the friends I went with were always confused by my only bringing fishing line hooks and bait but no pole.

Course it's funner to go into the river and catch the fish by hand.

Phanx 06-01-14 01:02 PM

Quote:

Originally Posted by 10leej (Post 293138)
Course it's funner to go into the river and catch the fish by hand.

Can't say I've ever tried that one!


All times are GMT -6. The time now is 08:06 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI