• 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

Question - How can write conditions in lua about other lua scripts?

Rare Spawn

Well-known member
My goal is at the start of mission scripts, I want to pause the Lua script 'overseer', if its not already paused. But at the end of the mission, unpause it if it is running, and is paused.

It appears the TLOs for Lua are pretty skinny in this area, whats the best way to evaluate if a Lua script is running, is paused, or not running?

Thanks!
 
Would issuing the command to stop overseer at the start and then just running it at conclusion work? It's not as elegant as having conditions and if it's not running when you start the mission nothing will break you'll just get the Lua not running message.
 
That would accomplish the goal of not having Overseer pop up mid-mission, but would also require Overseer to run its startup routine again once restarted. I would like to be more efficient and leave a small footprint when possible.

Know of any examples that parse a "/Lua ps"?
 
I mean, I guess you can set something up that does mq.cmdf('/lua pause %s', lua_app_name) on both sides of whatever the app you want to pause it from does.

But I guess the better question is, why? I don't think your footprint is going to really change, especially since overseer mainly runs on a timer if it is active.
 
That would accomplish the goal of not having Overseer pop up mid-mission, but would also require Overseer to run its startup routine again once restarted. I would like to be more efficient and leave a small footprint when possible.

Know of any examples that parse a "/lua ps"?
Dont need to parse the ps

-- pause it
if mq.TLO.Lua.Script('overseer').Status() == 'RUNNING' then
mq.cmd('/lua pause overseer')
end

-- unpause it
if mq.TLO.Lua.Script('overseer').Status() == 'PAUSED' then
mq.cmd('/lua pause overseer')
end
 
Dont need to parse the ps

-- pause it
if mq.TLO.Lua.Script('overseer').Status() == 'RUNNING' then
mq.cmd('/lua pause overseer')
end

-- unpause it
if mq.TLO.Lua.Script('overseer').Status() == 'PAUSED' then
mq.cmd('/lua pause overseer')
end
Oh snap! Thank you! That is not on the wiki yet!

**EDIT - luaninfo was in the wiki, however it said it required a PID, which I understood to be a integer. Submitted a change to indicate "PID or name"
 
Question - How can write conditions in lua about other lua scripts?

Users who are viewing this thread

Back
Top
Cart