• 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 - Group.Member inconsistent results

Joined
Mar 20, 2024
RedCents
1,051¢
I am testing a small Lua script that simply prints the CurrentHPs for each group member. Here's the code:

Code:
local mq = require('mq')

if not package.loaded['events'] then
    print('This script is intended to be imported to Lua Event Manager (LEM). Try "\a-t/lua run lem\a-x"')
end

local function on_load()
    -- Perform any initial setup here when the event is loaded.
end

for i=0,mq.TLO.Group.Members() do
    print('Group member ', mq.TLO.Group.Member(i).CleanName() , ' currently has ', mq.TLO.Group.Member(i).CurrentHPs(), ' HPs')
end

local function condition()
end

local function action()
end

return {onload=on_load, condfunc=condition, actionfunc=action}

As you can see, there's a FOR loop that runs through all the group members, and then it prints their CleanName() and their CurrentHPs(). The names are properly displayed, but the HPs actually ONLY works for the first group member - all the rest are printed as 100 HPs. See screenshot:

Screenshot 2024-03-31 171819.jpg

Any idea why the FOR loop only gets the CurrentHPs() right for the first group member?
 
you can't pull their exact hp values only your own. which is why the first one shows true values.

you can pull PctHps for group members though
 
Essentially the client receives limited information about other spawns in the game. In the case of group members, things on xtarget, or your current target the limitation is pct based. Regarding other spawns not in the group, on xtarget, or current target the information is further limited in accuracy with the server preferring to send information most relevant to you, such as location.

For players...
Group shows health, mana, and endurance as percentages. But you could also collect more detailed information with dannet or actors
 
Might be possible to use a dannet query to get that info from the other characters as long as they are in the same dannet channel.

You basically would have a condition for checking if Member(i) is you and calling the normal method, and the other part of the condition making the query.
 
Problem - Group.Member inconsistent results

Users who are viewing this thread

Back
Top
Cart