• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Problem - What is up with AltAbilityReady?

Soandso2

Well-known member
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
useCombatAAs
Lua:
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

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.
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