• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Problem - What is up with AltAbilityReady?

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
Macroquest functions like AltAbilityReady, CombatAbilityReady and AbilityReady screw up in a strange manner. Or am I just not using them right?

Consider the following Lua function
[CODE lang="Lua" title="useCombatAAs"]local function useCombatAAs()
for act,aaData in pairs (combatAAs) do
if target() and goodToGo() and me.AltAbilityReady(aaData[1])() and target.Distance() < aaData[2] then
if me.Song("Ton Po's Stance X").ID() == nil or (me.Song("Ton Po's Stance X").ID() ~= nil and aaData[1] ~= "Focused Destructive Force") then
mq.delay(500)
mq.cmdf('/alt activate "%s"',act)
printf('Direct AA: \ag%s',aaData[1])
mq.cmdf("/mqlog Direct AA: %s",aaData[1])
end
end
end
end[/CODE]

The first if-condition in the for-loop should not trigger unless the AltAbilityReady for the ability in question (and the other conditions are also met, of course) is actually ready to be used. And if the AltAbility has been used, the first if-condition should not be evaluated to true. However, more often than not, the condition triggers several times in a row. I can get something like this in the MQ window

DirectAA: Five Point Palm
DirectAA: Five Point Palm

I even put in a delay of half a second before the actual command to use the AltAbility in case there is a delay between server and client. I even increased this delay to a full 2 seconds, but it did not change anything. Any ideas?
 
try the delay after the command, not before. delaying before the command still means there is no delay happening before you evaluate the if again.
 
try the delay after the command, not before. delaying before the command still means there is no delay happening before you evaluate the if again.
I actually had the delay after at first, and the problem still occurred, but I will try that again just to make sure. Thanks.
 
I haven't done any lua, but doesn't this evaluate to true every time?
No.

if me.Song("Ton Po's Stance X").ID() == nil or (me.Song("Ton Po's Stance X").ID() ~= nil and aaData[1] ~= "Focused Destructive Force") then

Either the green OR the blue. The blue contains an and. Either the green must be true OR the combined result of the blue.
 
Last edited:
No.

if me.Song("Ton Po's Stance X").ID() == nil or (me.Song("Ton Po's Stance X").ID() ~= nil and aaData[1] ~= "Focused Destructive Force") then

Either the green OR the blue. The blue contains an and. Either the green must be true OR the combined result of the blue.
oh jeez sorry, that's what I get for trying to read code early in the morning. I totally missed the parentheses around your and clause. my bad
 
if target() and goodToGo() and me.AltAbilityReady(aaData[1])() and target.Distance() < aaData[2] then

what is aaData[2] cause it feels like you checking for distance there? why not read distance directly from the aa?
 
if target() and goodToGo() and me.AltAbilityReady(aaData[1])() and target.Distance() < aaData[2] then

what is aaData[2] cause it feels like you checking for distance there? why not read distance directly from the aa?

aaData[2] is indeed the prefered range to check for when using the aa. Dont even try to use it, if the target is out of range. If there is an AA TLO that specifies which range the AA has, I should certainly use that, but in this given moment I dont know if there is such a thing.
oh jeez sorry, that's what I get for trying to read code early in the morning. I totally missed the parentheses around your and clause. my bad
No worries. :)

Anyways, I moved the delay to after the AA actually had been used, and it SEEMS to work BETTER but not perfect. I sometimes still get "double use messages". Perhaps 500 ms is not long enough. Is this issue caused by what I think? Lag between client and server?
 
when you use aa, i believe it sends a request to the server, then gets a response, and then it sorta uses the aa.

i had a macro where i tested the delay and it could be up to /delay 7, but was generally between 5 and 6
 
Problem - What is up with AltAbilityReady?

Users who are viewing this thread

Back
Top
Cart