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

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