Page 1 of 1
Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 2:25 am
by Alulien
I've been working on optimizing some of my macros and I would really like to try to fix a sit routine I made a while back - sitting between casts nets more mana, right? I've got something that works 99% of the time:
Code: Select all
Sub SitCheck
/if ( ${Stick.Active} || ${Me.Moving} || !${Cast.Ready} || ${Me.Sitting} || !${NetBots[${Tank}].Attacking} ) /return
/sit
/return
The only problem lies when a character running this tries to use an AA as they sit down immediately and somehow cancel the cast but put the AA on cooldown. I've tried ${Me.Casting.ID} in place of !${Cast.Ready} and it's the same outcome. It's odd because they return the expected results when /echo'd during casting of an AA: spell id or FALSE respectively. Anyone have a bone to throw?
Re: Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 3:04 am
by Safiya
Mana regen here seems pretty high. I never bother sitting since I've not noticed a significant difference.
Re: Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 4:16 pm
by Noren
You could try writing in a check to see if the casting bar is open. When I get home later I can post what it is if you don't have it figured out by then. That might fix this line.
Re: Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 5:01 pm
by Alulien
I hadn't considered calling a window check, great idea, Noren. When I get home I'll go ahead and test ${Window[CastingWindow].Open} and ${Window[CastSpellWnd].Open} since the wiki isn't clear on what the differences are.
Re: Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 5:36 pm
by Nilbus
${Window[CastSpellWnd].Open} - returns true if the Spell bar is visible on the character (so on or off with alt s by default) ${Window[CastingWindow].Open} only returns true while my cast bar is up for a spell in progress.
Re: Sit routine interrupts AAs
Posted: Thu Jun 19, 2014 8:33 pm
by Alulien
Ahh very good, thanks Nilbus. I'll give it a run this evening and see if that helps improve the AA interruption.
Re: Sit routine interrupts AAs
Posted: Fri Jun 20, 2014 3:53 am
by Alulien
No dice with ${Window[CastingWindow].Open} - characters still sit down immediately after they stand to cast the AA. Seems like there's a slightly longer delay when you click an AA and it begins casting as compared to a normal spell, only thing I can think of. Not really sure it's worth more time than I've already put into it, though. Thanks for the input, folks.
Re: Sit routine interrupts AAs
Posted: Fri Jun 20, 2014 5:30 am
by Noren
While I agree - there is little to be gained by the SitCheck routine - I do like the challenge. Perhaps you can incorporate an inactivity timer into your macro (plus I added a few more checks).
Code: Select all
Sub SitCheck
/if (!${Defined[InactivityTimer]}) /declare InactivityTimer timer outer
/if (!${Defined[Inactive]}) /declare Inactive bool outer FALSE
/if (!${Stick.Active} && !${Me.Moving} && !${Me.Casting.ID} && !${Window[CastingWindow].Open} && ${Me.Standing} && ${Me.PctHPs}>90 && !${NetBots[${Tank}].Attacking}) {
/if (${InactivityTimer}==0) {
/if (!${Inactive}) {
/varset InactivityTimer 40
/varset Inactive TRUE
} else {
/varset Inactive FALSE
/sit
}
}
} else /if (${Inactive}) {
/varset Inactive FALSE
}
/return