• 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

Request - LEM help (spirit fades)

eqsubi15

Ultimate seasoned veteran member
Joined
Jul 11, 2020
RedCents
953¢
Hey all,

I'm trying to make a LEM for phase two of Spirt Fades event to move when emotes trigger to avoid the manadrain. Can anyone help me review what I have and see if I'm on the right track or need to fix it?

The idea would be all toons in chase mode using CWTN plugins. When an emote happens, the driving toon (MT) self-targets to have everyone break off and target the MT. Then have him run to one of the two designated waypoints based on which emote fired. Then I'd manually re-engage after.

Code:
-- Define the coordinates for Waypoints 1 and 2
local waypoint1 = { x = 688, y = -816, z = 203 }
local waypoint2 = { x = 851, y = -935, z = 185 }

-- Define the warning emotes for each waypoint
local waypoint1Emotes = {
    "Weakness Evinced sends energy toward the rear of the cave.",
    "Weakness Evinced sends energy at the great spirits.",
    "Weakness Evinced sends energy into the tunnel."
}

local waypoint2Emotes = {
    "Weakness Evinced sends energy at Grakaw.",
    "Weakness Evinced sends energy toward the center of the cave.",
    "Weakness Evinced sends energy at Grakaw and the great spirits."
}

-- Function to move to a specified waypoint
local function moveToWaypoint(waypoint)
    -- Target self
    MQ.cmd("/target self")
    
    -- Move to the waypoint
    MQ.cmdf("/nav loc %d %d %d", waypoint.x, waypoint.y, waypoint.z)
    
    -- Wait for navigation to complete
    MQ.delay(1000) -- Adjust the delay as needed
    while MQ.TLO.Navigation.Active() do
        MQ.delay(100)
    end
end

-- Function to check if a message matches any emote in a list
local function matchesEmote(message, emoteList)
    for _, emote in ipairs(emoteList) do
        if message:find(emote) then
            return true
        end
    end
    return false
end

-- Main event listener
MQ.event("WarningEmote", "#*#Weakness Evinced sends energy#*#", function(event, message)
    if matchesEmote(message, waypoint1Emotes) then
        print("Warning emote detected: Moving to Waypoint 1")
        moveToWaypoint(waypoint1)
    elseif matchesEmote(message, waypoint2Emotes) then
        print("Warning emote detected: Moving to Waypoint 2")
        moveToWaypoint(waypoint2)
    end
end)
 
Hey all,

I'm trying to make a LEM for phase two of Spirt Fades event to move when emotes trigger to avoid the manadrain. Can anyone help me review what I have and see if I'm on the right track or need to fix it?

The idea would be all toons in chase mode using CWTN plugins. When an emote happens, the driving toon (MT) self-targets to have everyone break off and target the MT. Then have him run to one of the two designated waypoints based on which emote fired. Then I'd manually re-engage after.

Code:
-- Define the coordinates for Waypoints 1 and 2
local waypoint1 = { x = 688, y = -816, z = 203 }
local waypoint2 = { x = 851, y = -935, z = 185 }

-- Define the warning emotes for each waypoint
local waypoint1Emotes = {
    "Weakness Evinced sends energy toward the rear of the cave.",
    "Weakness Evinced sends energy at the great spirits.",
    "Weakness Evinced sends energy into the tunnel."
}

local waypoint2Emotes = {
    "Weakness Evinced sends energy at Grakaw.",
    "Weakness Evinced sends energy toward the center of the cave.",
    "Weakness Evinced sends energy at Grakaw and the great spirits."
}

-- Function to move to a specified waypoint
local function moveToWaypoint(waypoint)
    -- Target self
    MQ.cmd("/target self")
   
    -- Move to the waypoint
    MQ.cmdf("/nav loc %d %d %d", waypoint.x, waypoint.y, waypoint.z)
   
    -- Wait for navigation to complete
    MQ.delay(1000) -- Adjust the delay as needed
    while MQ.TLO.Navigation.Active() do
        MQ.delay(100)
    end
end

-- Function to check if a message matches any emote in a list
local function matchesEmote(message, emoteList)
    for _, emote in ipairs(emoteList) do
        if message:find(emote) then
            return true
        end
    end
    return false
end

-- Main event listener
MQ.event("WarningEmote", "#*#Weakness Evinced sends energy#*#", function(event, message)
    if matchesEmote(message, waypoint1Emotes) then
        print("Warning emote detected: Moving to Waypoint 1")
        moveToWaypoint(waypoint1)
    elseif matchesEmote(message, waypoint2Emotes) then
        print("Warning emote detected: Moving to Waypoint 2")
        moveToWaypoint(waypoint2)
    end
end)
In case your not aware pulling the mob to the cave entrance works perfectly well too and if your patient can get achievement for everyone without moving any character at all.
 
At a glance, this seems like it should do what you are describing. The key question is - have you tried it and does it work for you... or is there anything not working as you expect?
 
At a glance, this seems like it should do what you are describing. The key question is - have you tried it and does it work for you... or is there anything not working as you expect?
This is my first time trying to build a Lua script. Haven't tested it yet, but was hoping more seasoned creators could give some feedback if they saw something that clearly wouldn't work :)
 
I can't speak for the LEM but when I solo the raid I just put my MT in manual mode and everyone in chase. Move when you get an emote while targeting yourself.
 
Fortunately or unfortunately - it always comes down to running it, again and again. Dropping and re-getting the mission and trying again.

Best is you can test it before initiating the mission (or in any zone) by triggering the event text ("/say Weakness Evinced sends energy toward the rear of the cave.") or whatever and see what everyone does.

As mentioned, on the surface looks like it'll do what you intend. Armyboxer did suggest a different option. (I personally haven't done this mission in forever so don't remember details).
 
Tried adding this as a Text Event under LEM, but I keep getting the following error:

"Lua:40 attempt to index global 'MQ' (a nil value)"

[CODE lang="Lua" title="Emote Move"]local mq = require("mq")

-- Define Waypoints
local waypoint1 = { x = 70.70, y = -358.24, z = 42.04 }
local waypoint2 = { x = -78.11, y = -359.26, z = 42.04 }

-- Define the warning emotes associated with each waypoint
local waypoint1Emotes = {
"Weakness Evinced sends energy toward the rear of the cave.",
"Weakness Evinced sends energy at the great spirits.",
"Weakness Evinced sends energy into the tunnel."
}

local waypoint2Emotes = {
"Weakness Evinced sends energy at Grakaw.",
"Weakness Evinced sends energy toward the center of the cave.",
"Weakness Evinced sends energy at Grakaw and the great spirits."
}

-- Function to move to a specified waypoint
local function moveToWaypoint(waypoint)
-- Target self
MQ.cmd("/target id ${Me.ID}")

-- Move to the specified waypoint
MQ.cmdf("/nav loc %d %d %d", waypoint.x, waypoint.y, waypoint.z)
end

-- Function to check if a message matches any emote in a list
local function matchesEmote(message, emoteList)
for _, emote in ipairs(emoteList) do
if message:find(emote) then
return true
end
end
return false
end

-- Main event listener for warning emotes
MQ.event("WarningEmote", "#*#Weakness Evinced sends energy#*#", function(event, message)
if matchesEmote(message, waypoint1Emotes) then
print("Warning emote detected: Moving to Waypoint 1")
moveToWaypoint(waypoint1)
elseif matchesEmote(message, waypoint2Emotes) then
print("Warning emote detected: Moving to Waypoint 2")
moveToWaypoint(waypoint2)
end
end)

print("Script loaded and monitoring for warning emotes.")
[/CODE]
 
Lua os case sensitive. You had lower case "mq" when you imported it.

Probably need to pause/unpause your automation before/after moving. "/boxer pause", etc.

This does not appear to be a lem, but rather a stand alone Lua script. In which you will need an event loop with mq.events() call
 
Lua os case sensitive. You had lower case "mq" when you imported it.

Probably need to pause/unpause your automation before/after moving. "/boxer pause", etc.

This does not appear to be a lem, but rather a stand alone Lua script. In which you will need an event loop with mq.events() call
Fixed the case sensitive issue. Added the /boxr pause. Also, added the event loop as you suggested. Tested as a stand alone Lua and it appears to run, but as soon as I test an emote message, I get a nil error.

Emote_Move_Test.Lua:32: attempt to index local 'message' (a nil value)stack traceback: Emote_Move_Test.Lua: in function 'matchesEmote' Emote_Move_Test.Lua:41: in function <Emote_Move_Test.Lua:40>

Ugh...beating my head against a wall trying to figure this out. Never thought it would be so difficult just to get 1 toon to pause, target himself, move to a specific loc based on an emote message.

Wondering if I should just throw in the towel and just stick with Gina and a couple generic 3-line hotkeys to pause, target self, and nav to loc.
 
Wondering if I should just throw in the towel and just stick with Gina and a couple generic 3-line hotkeys to pause, target self, and nav to loc.
There's coding for the fun of problem solving, and coding to get a result.

If someone doesn't really want to learn this, or isn't enjoying the act of writing/troubleshooting/etc... it's not going to be an enjoyable process. Never as simple as it seems like it'd be - very often taking much longer to create a script than just doing the task manually.

However for someone who does want to learn or enjoys it - the creation IS the challenge and satisfaction, frequently much more than the result itself provides.
It builds on itself and each bit of learning makes the next step easier.


For your most current error, for example - You're using the wrong parameter. I'm not at a system to test/remind myself, but...
mq.event("WarningEmote", "#*#Weakness Evinced sends energy#*#", function(message)
The first parameter (message) will be the whole line that EQ sent over : "Weakness Evinced sends energy toward the rear of the cave."

Additional parameters are a bit more advanced - you don't need it at this time.
 
If you're doing the group mission looking for the thick skin emote, like armyboxer mentioned, you can park all of your range toons far into the tunnel and dry tank the gnawer boss til everybody completes it. it's very trivial this way.

For the raid:

The gnawer boss's mana drain is player targeted based on aggro. The easiest way is to have bards constantly hitting fading memories to be at the bottom of the hate list and everybody else turning SCS off so they generate more aggro. No moving involved.

If you are trying to avoid people getting nuked from thin skin from the aura, the easiest method is tanking the gnawer on/behind Gramaw the entire time. This limits you to two emotes that can happen (same starting trigger: weakness evinced sends energy at grakaw....), and I have a unshared LEM that will pause macros and cwtns to run out if they have the thin skin debuff, otherwise keep fighting at grakaw - the green aura that gets dropped isn't terribly significant unless you have the debuff.
 
Request - LEM help (spirit fades)

Users who are viewing this thread

Back
Top
Cart