• 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

Question - Creating an LUA array from TLO output

Rare Spawn

Well-known member
Joined
Oct 10, 2022
RedCents
3,282¢
Hello experts, journeymen and fellow novices. I am trying to write a Lua function that will check if all DanNet peers are within a given (range). It appears the output of the highlighted TLO is a string and not multiple objects, what is the proper method to get where I am trying to go? The reason I am avoiding the mq.TLO.Group.Members() is because the group can have unpredictable humans in it from time to time, so I want to exclude them from check if they are in range or not.

[CODE lang="Lua" title="Broken Lua function" highlight="2"]function BotsNotInRange(range)
Bots = {mq.TLO.DanNet.Peers()}
for i,v in ipairs(Bots) do
print(v)
if mq.TLO.Group.Member(v).Distance() > range then
print('\ar'..v..' not in range.')
return true
end
end
end[/CODE]

Thanks in advance.
 
I tried to push my luck, and ChatGPT started "hallucinating" answers that don't exist.

1689560841257.png


There is not TLO for Group.HasMember... and when I called ChatGPT out for it, the response was pretty good!

I apologize for the confusion. It seems I made an incorrect assumption about the existence of the mq.TLO.Group.HasMember function. Without specific knowledge of the underlying libraries or frameworks you are using in your Lua environment, I cannot provide a definitive reference for such a function.

To add a check to validate if v is a member of a group, you would typically need to refer to the documentation or resources specific to the library or framework you are working with. The validation logic may differ depending on the implementation details of your environment.

I recommend consulting the documentation or reference materials related to the mq.TLO.Group or related libraries in your Lua environment to find the appropriate method or function for checking if a member exists in a group. The documentation should provide information on how to perform the desired validation based on the available features and functions provided by the library or framework you are using.
 
you shouldn't be using Group members for this, there is no garauntee that the peers in your response are in your group. You should use the Spawn tlo to look them up by name.
 
you shouldn't be using Group members for this, there is no garauntee that the peers in your response are in your group. You should use the Spawn tlo to look them up by name.

Good point for something called BotsInRange(). I have cleanup, consolidation, and much learning yet.
 
Question - Creating an LUA array from TLO output

Users who are viewing this thread

Back
Top
Cart