character¶
Your own character. Everything an actor has, plus
self-only members backed by local client-side caches that aren't readable for
anyone else.
Returned by mq.TLO.Me.
The members below are in addition to every actor
member — Me.Name(), Me.Level(), Me.PctHP() and the rest all work.
Afflictions and cures¶
EverQuest II sorts detriments into five cure classes. clockwork reads the per-class counters directly.
These counters are signed
-1 means the affliction is present but cannot be cured. 0 means
none. > 0 is a curable count. Resurrection sickness, for example, reads as
Arcane -1.
A ~= 0 test therefore fires forever on an incurable detriment. Use
HasCurableDetriment() as your cure gate, not
DetrimentCount().
number DetrimentCount¶
-
Counts every detriment, curable or not.
Warning
Do not gate cures on this. A
DetrimentCount() > 0gate spins forever on anything uncurable.
array Detriments¶
- Array of
effectfor your detriment bar.
table Afflictions¶
{ Trauma, Arcane, Noxious, Elemental, Curse }— the five signed per-class counters in one table.
number Trauma¶
number Arcane¶
number Noxious¶
number Elemental¶
number Curse¶
- The individual counters, same signed semantics.
bool HasCurableDetriment¶
- True when any class counter is
> 0. This is the correct cure gate.
bool HasIncurableDetriment¶
- True when any class counter is
< 0.
bool IsAfflicted¶
- Either of the two above.
if mq.TLO.Me.HasCurableDetriment() then
local a = mq.TLO.Me.Afflictions()
if a.Noxious > 0 then eq2.cmd('/useability "Cure Noxious"') end
end
Maintained buffs¶
number MaintainedCount¶
- Size of your own maintained/beneficial buff bar.
array Maintained¶
- Array of
effectfor that bar.
bool Buff(name)¶
- Self-only maintained-buff check by name. Reads your maintained bar directly,
which makes it more precise than the generic
actorBuff()icon-presence test.
Abilities¶
number NumAbilities¶
- Size of your known-ability book.
ability Ability(key)¶
-
Look up an ability. The key's Lua type decides the meaning:
keyMeans number Strict 1-based book index, 1..NumAbilities()string Lookup by name Returns
nilif nothing matches. Because the meaning switches on type, use the explicit forms below when the key comes from a variable whose type you aren't certain of.
ability AbilityID(id)¶
- Unambiguous lookup by raw ability id — not a book index.
nilif not found.
ability AbilityByName(name)¶
- Same as
Ability(string).nilif not found.
local ab = mq.TLO.Me.Ability("Fireball")
if ab and ab.IsReady() then
eq2.cmd('/useability "Fireball"')
end
Casting¶
bool CastingSpell¶
- Are you currently casting?
number CastingTime¶
- Total cast time, seconds.
number CastingRemaining¶
- Seconds left on the current cast.
string CastingSpellName¶
- Name of the spell being cast.
Movement¶
bool IsMoving¶
- Are you currently moving? Reads the movement integrator's forward/strafe axes directly, rather than diffing position between calls.
Inventory¶
number FreeInventory¶
-
Free slot count summed across your carried bags. Bank and overflow are excluded.
Returns
0— "no room", the safe direction — when the client is unresolved. A full inventory is otherwise indistinguishable from a silent per-item loot failure, which is what this exists for.
Savagery (Beastlord)¶
All four read 0 for non-Beastlords and on an unresolved client, so a rotation
row gated on savagery stays skipped on the wrong class rather than casting
blind.
number SavageryLevel¶
- Current savagery level. This is the one to gate rotation rows on.
number SavageryMaxLevel¶
- Maximum savagery level.
number Savagery¶
number SavageryMax¶
-
Raw savagery value and its cap. Readouts and diagnostics.
Warning
Savagery()is near-constant in practice. Gate onSavageryLevel()instead — an earlier attempt to gate on the raw value was built and removed the same day.
Character stats¶
Base attributes, vitals, and resists are available via
lib.stats — a pure-Lua reader over
the GameScene state blob. These are self-only by design (the client doesn't
receive other players' stat sheets).
local stats = require("lib.stats")
eq2.print(("STR %d HP %d/%d"):format(
stats.Strength(), stats.CurrHP(), stats.MaxHP()))
DPS and Fervor are actor-struct fields and work on any actor:
eq2.print(("Target Fervor: %.1f%%"):format(stats.Fervor(mq.TLO.Target)))