Thursday, April 19, 2012

Might Need Advanced Help

Entire project history



have been requested by my guild to write a few macros which will assist in raiding. and for a few of them i need to identify global cooldowns and i know that the addon quartz can report it in some manner.

i was attempting to do this through frame identification.

my macro is very wrong and i know it. so could i ask for some assistance with it

here it is

thanks in advance for your time with this matter

/run if (Quartz.gcdbar.Private.UIParent.Frame.QuartzGCDBar :OnHide)) then SendChatMessage("hello", "SAY", nil) end

or would this work better



/run if (Quartz.gcdbar.Private.UIParent.Frame.QuartzGCDBar :OnShow)) then SendChatMessage("hello", "SAY", nil) end

but this again reports when the bar is active not when its not on screen.

Would there be use of an elseif statment to remedy this problem?



from another author not from me

or is there another way to go about doing this.

thanks for your time



/script local s=GetSpellCooldown("Dampen Magic Rank7") > 0; if s then print("I'm on global cooldown.") end

this script will not put out any output at all this is for a simple reason there is no cooldown for the specific spell u could essentially create a 'cast' loop essentially of it until mana fail

To get proper response for what i am looking for is something which does work

/script local s=GetSpellCooldown("Evocation") > 0; if s then print("I'm on spell not global cooldown.") end

so essentially to get the above code to work is it reports if evocation timer is active and will not report if its not.

so that is where an else if statment might come in. but the problem that is here is there is no report of the global cooldown because its not global cooldown which is not spell analogous its global. so it will throw an error, of nil returned because there is no spell cooldown associated with Dampen Magic Rank*|||OnShow and OnHide are event handler functions -- the game runs them when a frame is shown or hidden. To test with an "if", you want "IsShown" or "IsVisible".

Digging around in the API reference on WoWwiki for ten minutes, I didn't find anything about how to detect the global cooldown. If Quartz does it, I'd suggest looking at its source and figuring out how it's doing it.|||i know quartz establishes a timer and has its own library to accomplish this. due to the fact that wow has removed all time and other great looping statments from their API code to help prevent bots|||Actually, Quartz just detects whether a spell is on cooldown or not, based on which spell you tell it in it's config. The spells used should be ones that have no CD other than the GCD.

Another addon that does this is NefGCD - in fact, that's ALL the addon does, is display a GCD spark. I'd take a look at it's code, or at the code in Quartz's GlobalCooldown module.|||Quote:








Actually, Quartz just detects whether a spell is on cooldown or not, based on which spell you tell it in it's config. The spells used should be ones that have no CD other than the GCD.

Another addon that does this is NefGCD - in fact, that's ALL the addon does, is display a GCD spark. I'd take a look at it's code, or at the code in Quartz's GlobalCooldown module.




so using that i could maybe start to detect the GCD

and then allow a cast if the bar or spark is not visable

No comments:

Post a Comment