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

Joined
Feb 14, 2022
RedCents
961¢
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.


[CODE lang="Lua" title="display my debuffs on target." highlight="6-9"]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[/CODE]
 
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.


[CODE lang="lua" title="display my debuffs on target." highlight="6-9"]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[/CODE]
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.
 
when looking for target buffs, back in my Kissassist condition writing days, I used to check buffs.populated AND target.buff(foo)
 
Problem - Issue with mq.TLO.Target.MyBuff(dotName)()

Users who are viewing this thread

Back
Top
Cart