• 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 - Issue with mq.TLO.Target.MyBuff(dotName)()

I'm having an issue with logic of a Lua i'm working on. For some reason when a dot is in last tic, it reports as false. Not sure why or what what is causing this. It is causing me to overwrite the last tic of a dot.

Anyone have any ideas?

mq.TLO.Target.MyBuff(dotName)()


I also tried using mq.TLO.Target.MyBuff(dotName).Duration.TotalSeconds() but for some reason this doesn't even find the dot and reports nil or null.
 
its a eq problem. Eq reports buffs/debuffs being off early/late constantly. The following eval works for mind whirl on enchanter but shows 6 seconds slower than the buff icon in target window (sometimes)

1744177030429.png
 
mybuff is a cachedbuff.

try mq.TLO.Target.Buff("buff name").Duration.TotalSeconds()
you can check its yours first with mq.TLO.Target.Buff("buff name").Caster() and compare to your name.

this is how i do this in a lem.


display my debuffs on target.
Lua:
local function drawDebuffs(debuffCount)
    local DEBUFF = mq.TLO.Target.Buff
    local string = ''
    for i = 1, debuffCount do
        string = ''
        if DEBUFF(i) ~= nil and DEBUFF(i).Caster() == mq.TLO.Me.DisplayName() and not DEBUFF(i).Beneficial() then
            local dur = getDuration(i)
            local durSeconds = DEBUFF(i).Duration.TotalSeconds() or 0
            local name = DEBUFF(i).Name()
            string = string.format("%s\t\t\t\t\t\t", name)
            ImGui.BeginGroup()
            DrawStatusIcon(DEBUFF(i).SpellIcon(), 'spell', name)
            ImGui.SameLine()
            if durSeconds <= 18 then
                ImGui.PushStyleColor(ImGuiCol.Text, 1.0, 0, 0, 1)
                ImGui.Text(string)
                ImGui.SameLine(ImGui.GetWindowWidth() - 55)
                ImGui.Text(dur)
                ImGui.PopStyleColor()
            else
                ImGui.Text(string)
                ImGui.SameLine(ImGui.GetWindowWidth() - 55)
                ImGui.Text(dur)
            end
            ImGui.EndGroup()
            -- click to cast
            if ImGui.IsItemHovered() then
                if ImGui.IsMouseReleased(0) then
                    mq.cmdf('/cast "%s"', name)
                end
            end
        end
    end
end
 
Last edited:
mybuff is a cachedbuff.

try mq.TLO.Target.Buff("buff name").Duration.TotalSeconds()
you can check its yours first with mq.TLO.Target.Buff("buff name").Caster() and compare to your name.

this is how i do this in a lem.


display my debuffs on target.
Lua:
local function drawDebuffs(debuffCount)
    local DEBUFF = mq.TLO.Target.Buff
    local string = ''
    for i = 1, debuffCount do
        string = ''
        if DEBUFF(i) ~= nil and DEBUFF(i).Caster() == mq.TLO.Me.DisplayName() and not DEBUFF(i).Beneficial() then
            local dur = getDuration(i)
            local durSeconds = DEBUFF(i).Duration.TotalSeconds() or 0
            local name = DEBUFF(i).Name()
            string = string.format("%s\t\t\t\t\t\t", name)
            ImGui.BeginGroup()
            DrawStatusIcon(DEBUFF(i).SpellIcon(), 'spell', name)
            ImGui.SameLine()
            if durSeconds <= 18 then
                ImGui.PushStyleColor(ImGuiCol.Text, 1.0, 0, 0, 1)
                ImGui.Text(string)
                ImGui.SameLine(ImGui.GetWindowWidth() - 55)
                ImGui.Text(dur)
                ImGui.PopStyleColor()
            else
                ImGui.Text(string)
                ImGui.SameLine(ImGui.GetWindowWidth() - 55)
                ImGui.Text(dur)
            end
            ImGui.EndGroup()
            -- click to cast
            if ImGui.IsItemHovered() then
                if ImGui.IsMouseReleased(0) then
                    mq.cmdf('/cast "%s"', name)
                end
            end
        end
    end
end
I’ll gift it a shot. Thank you!
 
What Myysterio said.

There are times when EQ momentarily reports nil on buffs that still exist, irrespective of whether your cache is current (i.e, you are targeting).

There are also some times where durations will report incorrectly and jump around.

Between the two phenomena, it can be aggravating to attempt to perfectly track these, especially if you are trying to recast just before it expires to maintain uptime.

Others have used saving state to get around this (tracking the timer yourself). I'm not sure if there are other foolproof methods(other posters may have solved the issue, who knows).

This was me playing with bellow a few months back and kind of illustrates the issue. Note that the debuff still has 4-5 seconds left when everything goes null.
I cannot be sure you are experiencing the same issue, but you could always verify it.
I always meant to ask more about this, but got sidetracked doing other things. Derple at one point told me it was a client issue if he remembered correctly.

View attachment eqgame_MarMBfGIjQ.mp4
 
If you watch closely sometimes you'll see it with no timer left on the debuff or buff and it won't disappear until the next tick where mana regen/hp regen/end regen is calculated. Always figured it was waiting on something from the servers that's only updated at that time.
 
Problem - Issue with mq.TLO.Target.MyBuff(dotName)()

Users who are viewing this thread

Back
Top
Cart