aquietone / aqobot

EverQuest class automation Lua scripts for MacroQuest.
https://aquietone.github.io/docs/aqobot/
MIT License
13 stars 6 forks source link

Fizzles can cause a spell mem loop #4

Closed towbes closed 8 months ago

towbes commented 8 months ago

This issue could be fixed by having chars that are skilled enough to not fizzle spells, but wanted to point out that this loop happens when that isn't the case.

image

Is there a fizzle check in cast.lua ? I saw the below had some logic for interrupts but didn't see the CAST_FIZZLE return specifically mentioned

        while casting.isCasting() do
            if not spell.NoInterrupt then
                if interruptCheck and interruptCheck(currentMana, pctMana) then
                    casting.interrupt()
                    state.actionTaken = true
                    return casting.CastReturn.CAST_INTERRUPTFORHEAL
                end
            end
            if spell.SpellType == 'Detrimental' and spell.TargetType ~= 'PB AE' then
                local isCorpse = mq.TLO.Target.Type() == 'Corpse'
                if isCorpse then
                    casting.interrupt()
                    return casting.CastReturn.CAST_INTERRUPTED
                end
            end
            mq.delay(50)
            --if state.paused then
            --    casting.interrupt()
            --    return casting.CastReturn.CAST_INTERRUPTED
            --end
            if mq.TLO.Me.Invis() then
                return casting.CastReturn.CAST_INVIS
            end
        end
aquietone commented 8 months ago

it should retry up to 2 times now on fizzle or interrupt.