• 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 - Prioratizing one lua script vs another

Joined
Mar 20, 2024
RedCents
1,051¢
I have many LUAs running in parallel: one heals the pet if under 50% HP, another one casts DoTs on mobs, another one casts Feign Death if I am under attack, etc.

Sometimes, the trigger conditions for multiple of those LUAs apply at the same time, so I want to apply a hierarchy of priorities. For example: casting Feign Death if I am attacked should be higher priority than loading a DoT on a mob.

Any idea how to code a hiererchy order across multiple LUAs if the conditions for 2+ LUAs apply at the same time? Thanks!
 
If you need that level of control, why are they separate LUAs and not all in 1 Lua?
 
If your scripts have conflicting actions, you need to either collapse them to a single script or have the priority script pause the secondary any time it takes an action.
 
oh yeah - imagine if there was something that did all of that for me....like say rgmercs or kissassist.......

Not helpful. Neither of those are LUAs, which is what I specified in my original post. Please be helpful or dont contribute.

If your scripts have conflicting actions, you need to either collapse them to a single script or have the priority script pause the secondary any time it takes an action.

Thank you! This seems just what I need. Could you please elaborate or point me to some resources where I can see how one script can instruct a second one to pause while it is in action?
 
Not helpful. Neither of those are LUAs, which is what I specified in my original post. Please be helpful or dont contribute.



Thank you! This seems just what I need. Could you please elaborate or point me to some resources where I can see how one script can instruct a second one to pause while it is in action?
For what it's worth, RGMErcs is a Lua (also a macro - there are two flavors)

Ultimately though if you have so many different single minded Lua scripts driving a toon, you are better off as previously stated, using something that already exists, or collapsing them all into a single Lua with flow control that effectively becomes a class macro/Lua/script. There are a few of those around, too. Wanna say BAM is an example, or Lerogue or..
 
Not helpful. Neither of those are LUAs, which is what I specified in my original post. Please be helpful or dont contribute.



Thank you! This seems just what I need. Could you please elaborate or point me to some resources where I can see how one script can instruct a second one to pause while it is in action?
it really sounds like you're going about this in the most tedious way possible. why are these separately running scripts?
 
 
I have many LUAs running in parallel: one heals the pet if under 50% HP, another one casts DoTs on mobs, another one casts Feign Death if I am under attack, etc.

Sometimes, the trigger conditions for multiple of those LUAs apply at the same time, so I want to apply a hierarchy of priorities. For example: casting Feign Death if I am attacked should be higher priority than loading a DoT on a mob.

Any idea how to code a hiererchy order across multiple LUAs if the conditions for 2+ LUAs apply at the same time? Thanks!
To answer that properly, you would have to list which luas you are running, and if its user made ones or your own code and 'merging' or just adding instruction for 'start/stop' another Lua. Not everyones work matches up perfectly with another user but we can adapt and learn when to pause/stop.
 
To answer that properly, you would have to list which luas you are running, and if its user made ones or your own code and 'merging' or just adding instruction for 'start/stop' another lua. Not everyones work matches up perfectly with another user but we can adapt and learn when to pause/stop.

That is right, my bad. They are my own self made LUAs. The ideal scenario would be that, when Lua #1 trigger its actions, I could temporarily pause (or start/stop) Lua #2 while Lua #1 is executing its actions.
 
That is right, my bad. They are my own self made LUAs. The ideal scenario would be that, when LUA #1 trigger its actions, I could temporarily pause (or start/stop) LUA #2 while LUA #1 is executing its actions.

You really need to condense these down into one, because you will never be able to fully synchronize them, because if you could, you wouldn't be having this problem.

Pausing a Lua script (thats what they're called, not LUAs -- and not all caps, my friend, stop shouting!) has no insurance that where they got paused was in a safe place to pause.

In other words, your approach to this problem is flawed. Your scripts need to be coordinated, or they need to be one script. The path you're going down is uncharted and dangerous.
 
That is right, my bad. They are my own self made LUAs. The ideal scenario would be that, when LUA #1 trigger its actions, I could temporarily pause (or start/stop) LUA #2 while LUA #1 is executing its actions.
You would basically need a if / then conditions with a cmd to do the start/stop or whatever for another Lua. This might be better to incorporate Lua 2 into Lua 1, with a call type. Depends how you want to do it.

Edit: Beaten by the Tigger. DAM
 
I had this same issue. I was trying to prioritize luas. I just combined the luas and put a switch, when one was working switch was on and the other wont respond. When the lower priority is running switch is off. Triggering the first one flushes the secondary event and does that instead. Can be done fairly easy using higher level variables all functions can see.
 
I had this same issue. I was trying to prioritize luas. I just combined the luas and put a switch, when one was working switch was on and the other wont respond. When the lower priority is running switch is off. Triggering the first one flushes the secondary event and does that instead. Can be done fairly easy using higher level variables all functions can see.

Yeah I think I will have to combine them all into one massive script.

Your idea of the "switch" using higher level variables shared across all functions has triggered my curiosity!! Is there any code (or parts of it) you could share so I could see how you've implemented it? I really think you're onto something!
 
Most Lua's are designed in such a way to perform one action, or fill in the blanks for something that your Macros, Plugins, or other Lua's do not do. Conflicts happen, and you can always code around them. If you have too many Lua's running at once, you should consider, like others have said, combining them into one Lua with control maintained within to prevent unwanted behavior.
 
Yeah I think I will have to combine them all into one massive script.

Your idea of the "switch" using higher level variables shared across all functions has triggered my curiosity!! Is there any code (or parts of it) you could share so I could see how you've implemented it? I really think you're onto something!
There is a version of rgmercs completely revamped in Lua and it is highly customizable fwiw.
 
Question - Prioratizing one lua script vs another

Users who are viewing this thread

Back
Top
Cart