Remove Advertisements

Infinite loop (with a delay) or an OnCast event

All things /script related

Moderators: Fridmarr, Worldie, Aergis, _Chloe

Infinite loop (with a delay) or an OnCast event

Postby isiz » Thu Sep 17, 2009 11:10 am

So I am trying to create a mod for the first time. Basically what it will do is wait for a certain spell to be cast by the user and then announce a message in chat. What I need to know is how I would go about looking for the spell to be cast. Currently I have it checking for the cooldown to be at max (120 secs or 2 min) and then announcing, but I think all it will do is look for the cooldown as you log in and then cease operation.

I need a way to constantly look for whether this spell has been cast. Perhaps an infinite loop, but with a delay of say, .5secs so as to not overclock your computer. It would also be nice to instead of looking for the cooldown to look for the spell being cast (maybe in the combat log?). I could not find anything in the API function page on Wowwiki that would let me do that. Would it be a complex function that I have to create myself?
ImageImage
Tuesday maintenance is merely a setback!
User avatar
isiz
 
Posts: 407
Joined: Sat Aug 02, 2008 7:51 am

Re: Infinite loop (with a delay) or an OnCast event

Postby _Chloe » Thu Sep 17, 2009 8:59 pm

Get a CLUE

http://www.wowwiki.com/API_COMBAT_LOG_EVENT

Note: It's called CLUE - Combat Log Unfiltered Event
User avatar
_Chloe
Moderator
 
Posts: 971
Joined: Fri Dec 07, 2007 6:36 pm
Location: Santa Monica, CA


Return to Add-ons, UI, and Macros

Who is online

Users browsing this forum: No registered users and 1 guest


Remove Advertisements

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 380 on Tue Oct 14, 2008 6:28 pm

Users browsing this forum: No registered users and 1 guest