Thread Tools Display Modes
05-30-14, 11:50 AM   #1
Kaleesh
A Deviate Faerie Dragon
 
Kaleesh's Avatar
Join Date: May 2010
Posts: 12
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?
  Reply With Quote
05-30-14, 03:08 PM   #2
repooc
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Oct 2008
Posts: 10
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
  Reply With Quote
05-31-14, 07:21 AM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Kaleesh View Post
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?
  Reply With Quote
05-31-14, 08:36 AM   #4
repooc
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Oct 2008
Posts: 10
Originally Posted by Resike View Post
How the hell you fish without a fishing pole then?
pretty easy as u dont need one equipped these days
  Reply With Quote
05-31-14, 09:15 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by repooc View Post
pretty easy as u dont need one equipped these days
Wow, this game has become so bad.
  Reply With Quote
05-31-14, 11:19 AM   #6
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by Resike View Post
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
05-31-14, 01:24 PM   #7
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
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
__________________
Tweets YouTube Website
  Reply With Quote
06-01-14, 11:01 AM   #8
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by 10leej View Post
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.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
06-01-14, 12:08 PM   #9
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Originally Posted by Phanx View Post
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.
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.
__________________
Tweets YouTube Website
  Reply With Quote
06-01-14, 01:02 PM   #10
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by 10leej View Post
Course it's funner to go into the river and catch the fish by hand.
Can't say I've ever tried that one!
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Creating Soundtrack custom events?

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