• 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! 👋
Resource icon

MQCharInfo

Other Authors
Included in Very Vanilla
Very Vanilla Included! No need to download.
Server Type
🏢 Live 🏘️ Emu Test
Source Repository
https://github.com/Cezero/MQCharInfo


MQCharinfo​

Publishes your character’s state over the Actors (post office) system so other clients can see it, and exposes a Lua module to read peer data. The data shape and API are similar to NetBots-style peer info: vitals, buffs, zone, target, experience, and more.

Loading the Lua module​

Load the module with:
Lua:
local charinfo = require("plugin.charinfo")
The plugin DLL is MQCharinfo.dll (canonical name Charinfo). Use plugin.charinfo in Lua; the loader resolves it via case-insensitive lookup. If you see "does not export CreateLuaModule", the plugin may be unloaded.

You can instead use require("mqcharinfo") for the same API with EmmyLua annotations (IDE completion and hover docs). Copy the mqcharinfo folder from the plugin directory into your MacroQuest install's lua/ folder (e.g. MacroQuest/lua/mqcharinfo/) so require("mqcharinfo") is found.

Configuration: For consistent behavior across clients (e.g. postoffice mailbox), list the plugin in your [Plugins] section as MQCharinfo or charinfo, not MQCharInfo. This ensures all clients get the same plugin identity and can see each other's data.


API (read-only peers + watchers)​

FunctionDescription
charinfo.GetInfo(name)Returns the peer table for character name, or nil if not found.
charinfo.GetPeers()Returns a sorted array of peer character names.
charinfo.GetPeerCnt()Returns the number of peers.
charinfo.GetInjuredPeers()Returns a sorted array of peer names with PctHPs < 100.
charinfo(name)Same as GetInfo(name) (module is callable).

Watchers (heal / buff / cure)​

Register criteria keyed by signature (spell + scope + filters). Queries union all watchers for (kind, scope, spellId) and return spawn IDs (self never included; same-zone via Zone.ShortName match).
FunctionDescription
RegisterHealWatcher({ spellId, scope, minHp, maxHp, classes?, names? })scope: LIST | INGROUP | GRPAGG | ALL | PET. names required for LIST. HoT spells (SPA 100 / SPA_HEALDOT) also require the peer (or pet for PET) not already have spellId. PET matches peer pets (PetHP / PetID) and GetWatchList returns pet spawn IDs.
RegisterBuffWatcher({ spellId, scope, classes?, names?, equivIds?, height? })Needs buff (missing or duration < 20s) and stacks. For peer scopes also FreeBuffSlots > 0 and optional height. PET uses pet buffs / StacksPet and returns pet spawn IDs (no owner FreeBuffSlots / height).
RegisterCureWatcher({ spellId, cureType, scope, classes?, names? })cureType: POISON | DISEASE | CURSE | CORRUPTION.
DeregisterHealWatcher / DeregisterBuffWatcher / DeregisterCureWatcherSame table fields as register.
GetWatchList(kind, scope, spellId)Union of matching spawn IDs for that triple.
GetWatchCount(kind, scope, spellId)Size of that union (use for GRPAGG).
ClearWatchers() / ClearWatchers(kind)Remove all, or only HEAL / BUFF / CURE.
Stacks / StacksPet / HasBuff / GetBuffDuration (on the table returned by GetInfo(name) and charinfo(name)):

These are methods and must be called with a colon: use peer:Stacks(spell), not peer.Stacks(spell).
  • peer:Stacks(spell)true if the given spell (name or ID) would stack with all of this peer’s long and short buffs. Accepts a string or number (spell ID).
  • peer:StacksPet(spell) — same, but for the peer’s pet buffs.
  • peer:HasBuff(spell)true if the peer has this spell ID on Buff or ShortBuff (O(1) index; no Lua Buff table copy).
  • peer:GetBuffDuration(spell) — remaining duration ms for that buff, or nil if absent.
  • peer:HasPetBuff(spell) / peer:GetPetBuffDuration(spell) — same for pet buffs.


Peer data structure​

Each peer is a table with the following keys. All data is read-only and comes from the last publish received from that character.

Top-level fields​

KeyTypeDescription
NamestringCharacter name.
IDnumberSpawn ID.
LevelnumberLevel.
HeightnumberAvatar height (same as Spawn.Height).
PctHPsnumberHP percent (0–100).
PctMananumberMana percent (0–100).
PctAggronumberAggro percent (0–100); same as Me.PctAggro.
TargetHPnumberCurrent target’s HP percent (0–100).
FreeBuffSlotsnumberFree long buff slots.
DetrimentalsnumberCount of detrimental buffs.
CountPoisonnumberPoison counters.
CountDiseasenumberDisease counters.
CountCursenumberCurse counters.
CountCorruptionnumberCorruption counters.
PetHPnumberPet HP percent (0–100).
MaxEndurancenumberMax endurance.
CurrentHPnumberCurrent HP.
MaxHPnumberMax HP.
CurrentMananumberCurrent mana.
MaxMananumberMax mana.
CurrentEndurancenumberCurrent endurance.
PctEndurancenumberEndurance percent (0–100).
PetIDnumberPet spawn ID (0 if none).
PetAffinitybooleanWhether the character has the pet AA (e.g. Companion’s Suspension).
NoCurenumberNo-cure detrimental counter.
LifeDrainnumberLife drain counter.
ManaDrainnumberMana drain counter.
EnduDrainnumberEndurance drain counter.
VersionnumberProtocol version (e.g. 1.1).
CombatStatenumberCombat state (e.g. ACTIVE, COMBAT, RESTING).
CastingSpellIDnumberSpell ID currently being cast (0 if not casting).

Arrays (1-based in Lua)​

KeyTypeDescription
Statearray of stringsActive state flags, e.g. "STAND", "LEVITATING", "SIT", "MOUNT".
BuffStatearray of stringsActive buff-state flags (e.g. "Slowed", "Hasted", "Cursed").
Buffarray of tablesLong buffs. Each entry: Duration, Spell (table with Name, ID, Category, Level).
ShortBuffarray of tablesShort buffs. Same structure as Buff.
PetBuffarray of tablesPet buffs. Same structure as Buff.
Gemsarray of tablesSpell gems in order. Each entry: ID, Name, Category, Level (full spell info). Use Gems[1].ID, Gems[1].Name, etc.
FreeInventoryarray of numbersFree inventory counts by size (indices 1–5 correspond to sizes 0–4).

Subtables​

Class
KeyType
Namestring
ShortNamestring
IDnumber
Target
KeyType
Namestring
IDnumber
Zone
KeyTypeDescription
NamestringZone long name.
ShortNamestringZone short name.
IDnumberZone ID.
InstanceIDnumberInstance ID.
X, Y, ZnumberPosition in zone.
HeadingnumberHeading (degrees).
Distancenumber or nilClient-side only. 3D distance from your character to this peer. nil if the peer is not in the same zone/instance as you.
Experience (present when data is available)
KeyType
PctExpnumber
PctAAExpnumber
PctGroupLeaderExpnumber
TotalAAnumber
AASpentnumber
AAUnusednumber
AAAssignednumber
MakeCamp (present when MQ2MoveUtils is loaded and camp data is sent)
KeyType
Statusnumber
X, Ynumber
Radiusnumber
Distancenumber
Macro (present when data is available)
KeyType
MacroStatenumber (0 = none, 1 = running, 2 = paused)
MacroNamestring
Lua (present when data is available)
KeyTypeDescription
Scriptsarray of tablesRunning/paused scripts only.
Lua.Scripts[i] fields:
KeyTypeDescription
PIDnumberLua script PID.
NamestringScript name.
PathstringScript file path (empty for string scripts).
StatusstringScript status (RUNNING or PAUSED).
Argumentsarray of stringsScript arguments.


Example​

Lua:
local charinfo = require("plugin.charinfo")

local names = charinfo.GetPeers()
for i = 1, #names do
    local peer = charinfo.GetInfo(names[i])
    if peer then
        print(peer.Name, "HP:", peer.PctHPs, "Zone:", peer.Zone.ShortName)
        if peer.Zone.Distance then
            print("  Distance:", peer.Zone.Distance)
        end
        if peer.Stacks and peer:Stacks("Clarity II") then
            print("  Clarity II would stack")
        end
    end
end


Settings panel​

The plugin adds a plugins/Charinfo settings panel that lists all peers and their data in a tree (same structure as above). Use it to inspect what each peer is publishing.
Author
DoNotReply
Watchers
0
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from DoNotReply

Share this resource

Back
Top
Cart