• 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 - Could someone more savvy let me know if this will work as intended please? (1 Viewer)

Joined
Jul 25, 2023
RedCents
2,957¢
I'm new to Lua and learning slowly. I want an LEM to use in the LS raid Shadow of my Shadow.

In that raid, single players get called out with the "venom" curse and need to run away from the raid while it lasts (24 seconds).

What I want is to pause any toon called out, have them run to an assigned loc, pause for 20 seconds (it will take at least 2 secs to travel each way), run back to the guild banner and then unpause (I run back first because my healers are set to manual for this event).

Here's what I wrote (as a text LEM, with the trigger #*#Your mind is cursed to suffer as your body suffers.#*# as that is the 1st person text received). I'm not sure how I could test it so thought I'd ask if anyone see obvious flaws! Thank you :)

local mq = require('mq')

-- Do not edit this if condition
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

local function event_handler()
-- Implement the handling for the event here.
mq.cmd('/boxr pause')

mq.cmd('/nav locyx 836 -2833')
while mq.TLO.Navigation.Active() == false do
mq.delay(10)
end
while mq.TLO.Navigation.Active() == true do
mq.delay(10)
end

mq.delay(200)

mq.cmd('/nav spawn "Guild Banner"')
while mq.TLO.Navigation.Active() == false do
mq.delay(10)
end
while mq.TLO.Navigation.Active() == true do
mq.delay(10)
end

mq.cmd ('/boxr unpause')
end

return {onload=on_load, eventfunc=event_handler}
 
a couple things we do on ours:
1. before we run, make sure to remove berzerker Frenzied disk.
2. if tank we dumpagro, and verify standing
3. your delay is only 200ms not 20s "mq.delay(20000)" or "mq.delay('20s')
4. also you don't actually have to delay at all, the buff fades instantly once you reach a certain distance away, I think it was 250' (you get a message that you can key off of to return)
5. to test you can always send the a tell or say in group /tell toonname Your mind is cursed to suffer as your body suffers.
 
a couple things we do on ours:
1. before we run, make sure to remove berzerker Frenzied disk.
2. if tank we dumpagro, and verify standing
3. your delay is only 200ms not 20s "mq.delay(20000)" or "mq.delay('20s')
4. also you don't actually have to delay at all, the buff fades instantly once you reach a certain distance away, I think it was 250' (you get a message that you can key off of to return)
5. to test you can always send the a tell or say in group /tell toonname Your mind is cursed to suffer as your body suffers.
Thank you! That helps a lot!
 
a couple things we do on ours:
1. before we run, make sure to remove berzerker Frenzied disk.
2. if tank we dumpagro, and verify standing
3. your delay is only 200ms not 20s "mq.delay(20000)" or "mq.delay('20s')
4. also you don't actually have to delay at all, the buff fades instantly once you reach a certain distance away, I think it was 250' (you get a message that you can key off of to return)
5. to test you can always send the a tell or say in group /tell toonname Your mind is cursed to suffer as your body suffers.
5. to test you can always send the a tell or say in group /tell toonname Your mind is cursed to suffer as your body suffers.

Just for this very scenario, you'll probably want something in your script to verify what zone you're in for it to be active. That way, some random /tell or /say in PoK doesn't trigger your toon to take off running.
 
I'm new to LUA and learning slowly. I want an LEM to use in the LS raid Shadow of my Shadow.

In that raid, single players get called out with the "venom" curse and need to run away from the raid while it lasts (24 seconds).

What I want is to pause any toon called out, have them run to an assigned loc, pause for 20 seconds (it will take at least 2 secs to travel each way), run back to the guild banner and then unpause (I run back first because my healers are set to manual for this event).

Here's what I wrote (as a text LEM, with the trigger #*#Your mind is cursed to suffer as your body suffers.#*# as that is the 1st person text received). I'm not sure how I could test it so thought I'd ask if anyone see obvious flaws! Thank you :)
This works well for me. You can adjust 14/15/24/27 to fit your automation.

I used "A shadow of venom hisses and glares at Soandso." for the trigger

Lua:
local mq = require('mq')

local required_zone = 'timorousfalls_raid'
local function event_handler(line, target)
    if mq.TLO.Zone.ShortName() ~= required_zone then return end
    local my_class = mq.TLO.Me.Class.ShortName()
    local i_am_ma = mq.TLO.Group.Member(0).MainAssist()
    local my_name = mq.TLO.Me.CleanName()
    local ma_name = mq.TLO.Group.MainAssist.CleanName()
    if not i_am_ma and target:find(my_name) then
        if my_class == 'BER' and mq.TLO.Me.ActiveDisc.Name() == mq.TLO.Spell('Frenzied Resolve Discipline').RankName() then
            mq.cmd('/stopdisc')
        end
        mq.cmdf('/%s mode 0', my_class)
        --mq.cmd('/boxr pause')
        mq.cmd('/mqp on')
        mq.cmd('/squelch /twist off')
        mq.cmd('/timed 5 /afollow off')
        mq.cmd('/nav stop')
        mq.cmd('/target clear')
        mq.delay(100)
        mq.cmd('/nav loc 844.30 -2755.52 -7.33')
        mq.delay(20000)
        mq.cmdf('/%s mode 2', my_class)
        mq.cmd('/mqp off')
        mq.cmd('/squelch /twist on')
        --mq.cmd('/boxr unpause')
    end
end

return {eventfunc=event_handler}
 
5. to test you can always send the a tell or say in group /tell toonname Your mind is cursed to suffer as your body suffers.

Just for this very scenario, you'll probably want something in your script to verify what zone you're in for it to be active. That way, some random /tell or /say in PoK doesn't trigger your toon to take off running.
RedFrog tells EqSubi 'Your pants are on fire, DO the Benny Hill run , or suffer as your body suffers.

*sits back and watches what happens*.
 
I'm new to LUA and learning slowly. I want an LEM to use in the LS raid Shadow of my Shadow.

In that raid, single players get called out with the "venom" curse and need to run away from the raid while it lasts (24 seconds).

What I want is to pause any toon called out, have them run to an assigned loc, pause for 20 seconds (it will take at least 2 secs to travel each way), run back to the guild banner and then unpause (I run back first because my healers are set to manual for this event).

Here's what I wrote (as a text LEM, with the trigger #*#Your mind is cursed to suffer as your body suffers.#*# as that is the 1st person text received). I'm not sure how I could test it so thought I'd ask if anyone see obvious flaws! Thank you :)
i have lems for all LS raids and missions
 
This works well for me. You can adjust 14/15/24/27 to fit your automation.

I used "A shadow of venom hisses and glares at Soandso." for the trigger

Lua:
local mq = require('mq')

local required_zone = 'timorousfalls_raid'
local function event_handler(line, target)
    if mq.TLO.Zone.ShortName() ~= required_zone then return end
    local my_class = mq.TLO.Me.Class.ShortName()
    local i_am_ma = mq.TLO.Group.Member(0).MainAssist()
    local my_name = mq.TLO.Me.CleanName()
    local ma_name = mq.TLO.Group.MainAssist.CleanName()
    if not i_am_ma and target:find(my_name) then
        if my_class == 'BER' and mq.TLO.Me.ActiveDisc.Name() == mq.TLO.Spell('Frenzied Resolve Discipline').RankName() then
            mq.cmd('/stopdisc')
        end
        mq.cmdf('/%s mode 0', my_class)
        --mq.cmd('/boxr pause')
        mq.cmd('/mqp on')
        mq.cmd('/squelch /twist off')
        mq.cmd('/timed 5 /afollow off')
        mq.cmd('/nav stop')
        mq.cmd('/target clear')
        mq.delay(100)
        mq.cmd('/nav loc 844.30 -2755.52 -7.33')
        mq.delay(20000)
        mq.cmdf('/%s mode 2', my_class)
        mq.cmd('/mqp off')
        mq.cmd('/squelch /twist on')
        --mq.cmd('/boxr unpause')
    end
end

return {eventfunc=event_handler}

Could I ask what "target:find(my_name)" does please? Is this the equivalent of name == my_name? Does it go further and check if multiple names are called? I've been trying (and failing) to search for it! Thanks!

EDIT: Never mind! I worked it out. I hadn't noticed the word "target" in "local function event_handler(line, target)".
 
Last edited:
This works well for me. You can adjust 14/15/24/27 to fit your automation.

I used "A shadow of venom hisses and glares at Soandso." for the trigger

Lua:
local mq = require('mq')

local required_zone = 'timorousfalls_raid'
local function event_handler(line, target)
    if mq.TLO.Zone.ShortName() ~= required_zone then return end
    local my_class = mq.TLO.Me.Class.ShortName()
    local i_am_ma = mq.TLO.Group.Member(0).MainAssist()
    local my_name = mq.TLO.Me.CleanName()
    local ma_name = mq.TLO.Group.MainAssist.CleanName()
    if not i_am_ma and target:find(my_name) then
        if my_class == 'BER' and mq.TLO.Me.ActiveDisc.Name() == mq.TLO.Spell('Frenzied Resolve Discipline').RankName() then
            mq.cmd('/stopdisc')
        end
        mq.cmdf('/%s mode 0', my_class)
        --mq.cmd('/boxr pause')
        mq.cmd('/mqp on')
        mq.cmd('/squelch /twist off')
        mq.cmd('/timed 5 /afollow off')
        mq.cmd('/nav stop')
        mq.cmd('/target clear')
        mq.delay(100)
        mq.cmd('/nav loc 844.30 -2755.52 -7.33')
        mq.delay(20000)
        mq.cmdf('/%s mode 2', my_class)
        mq.cmd('/mqp off')
        mq.cmd('/squelch /twist on')
        --mq.cmd('/boxr unpause')
    end
end

return {eventfunc=event_handler}
Thanks for sharing this! I am trying to understand Lua's and this helps me. However, and excuse my ignorance, but I don't see where the "trigger" phrase comes into play?
 
Thanks for sharing this! I am trying to understand LUA's and this helps me. However, and excuse my ignorance, but I don't see where the "trigger" phrase comes into play?

That goes into the event pattern (for text based events) - like this #*#A shadow of venom hisses and glares at #1#.#*#

Condition events are handled differently
 
I'm new to LUA and learning slowly. I want an LEM to use in the LS raid Shadow of my Shadow.

In that raid, single players get called out with the "venom" curse and need to run away from the raid while it lasts (24 seconds).

What I want is to pause any toon called out, have them run to an assigned loc, pause for 20 seconds (it will take at least 2 secs to travel each way), run back to the guild banner and then unpause (I run back first because my healers are set to manual for this event).

Here's what I wrote (as a text LEM, with the trigger #*#Your mind is cursed to suffer as your body suffers.#*# as that is the 1st person text received). I'm not sure how I could test it so thought I'd ask if anyone see obvious flaws! Thank you :)
Here is the one that my guild uses on our raid for that event:

[CODE lang="Lua" title="Shadow my Shadow Far Run"]cmV0dXJuIHsKIFsiY2F0ZWdvcnkiXSA9ICIiLAogWyJzaW5nbGVjb21tYW5kIl0gPSBmYWxzZSwKIFsiY29kZSJdID0gImJHOWpZV3dnYlhFOWNtVnhkV2x5WlNnbmJYRW5LUXBzYjJOaGJDQm1kVzVqZEdsdmJpQmxkbVZ1ZEY5b1lXNWtiR1Z5S0d4cGJtVXNJRzVoYldWektRcHBaaUJ0Y1M1VVRFOHVXbTl1WlM1SlJDZ3BJRDA5SURnMk5TQjBhR1Z1Q2lCcFppQnpkSEpwYm1jdVptbHVaQ2h1WVcxbGN5d2diWEV1VkV4UExrMWxMa05zWldGdVRtRnRaU2dwS1NCMGFHVnVDaUFnYlhFdVkyMWtLQ2N2WW05NGNpQlFZWFZ6WlNjcENpQWdiWEV1WTIxa0tDY3ZibUYySUd4dlkzaDVlaUFnTFRJME5EWXVNVEVnTVRBd09TNHhOQ0FnTFRjdU16Y25LUW9nSUcxeExtUmxiR0Y1S0RFMU1EQXdLUW9nSUcxeExtTnRaQ2duTDI1aGRpQnNiMk40ZVhvZ0lDMHlOREl3TGpVeElEZzFNUzQxTmlBZ0xUUXVPRFluS1FvZ0lHMXhMbU50WkNnbkwySnZlSElnZFc1d1lYVnpaU2NwQ2lBZ1pXNWtDaUJsYm1RS1pXNWtDbkpsZEhWeWJpQjdaWFpsYm5SbWRXNWpQV1YyWlc1MFgyaGhibVJzWlhKOSIsCiBbImxvYWQiXSA9IHsKICBbImFsd2F5cyJdID0gZmFsc2UsCiAgWyJ6b25lIl0gPSAiIiwKICBbImNsYXNzIl0gPSAiIiwKIH0sCiBbIm5hbWUiXSA9ICJTaGFkb3cgb2YgTXkgU2hhZG93IC0gU2hvcnQgUnVuIiwKIFsidHlwZSJdID0gImV2ZW50cyIsCiBbInBhdHRlcm4iXSA9ICIjKiNBIHNoYWRvdyBvZiB2ZW5vbSBoaXNzZXMgYW5kIGdsYXJlcyBhdCMxIy4jKiMiLAp9[/CODE]

[CODE lang="Lua" title="Shadow my Shadow Far Run"]
local mq=require('mq')
local function event_handler(line, names)
if mq.TLO.Zone.ID() == 865 then
if string.find(names, mq.TLO.Me.CleanName()) then
mq.cmd('/boxr Pause')
mq.cmd('/nav locxyz -2446.11 1009.14 -7.37')
mq.delay(15000)
mq.cmd('/nav locxyz -2420.51 851.56 -4.86')
mq.cmd('/boxr unpause')
end
end
end
return {eventfunc=event_handler}
[/CODE]
 
Question - Could someone more savvy let me know if this will work as intended please?

Users who are viewing this thread

Back
Top
Cart