• 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
Resource icon

Release Lua Event Manager (LEM) Event Library

I was just about to do ToV avatar of war and see this on the front page. Going to be a lot easier now 😂
 
I made a simple LEM to help with using the bard song to remove drunkeness faster. I tried to get it to only fire if currently had the short buff, but could not figure out to so I just enable it when using bard song and disable it when finished. If anyone can help make it better I would love to learn from your changes.

Code:
cmV0dXJuIHsKIG5hbWUgPSAiR2V0IHNvYmVyIGZhc3RlciB3aXRoIEJhcmQgc29uZyBTb290aGluZyBQc2FsbSBvZiB0aGUgU3VucmlzZSIsCiBjYXRlZ29yeSA9ICIiLAogdHlwZSA9ICJjb25kaXRpb25zIiwKIGNvZGUgPSAiYkc5allXd2diWEVnUFNCeVpYRjFhWEpsS0NkdGNTY3BDbXh2WTJGc0lHSjFabVl4SUQwblUyOXZkR2hwYm1jZ1VITmhiRzBnYjJZZ2RHaGxJRk4xYm5KcGMyVW5DZ3BzYjJOaGJDQm1kVzVqZEdsdmJpQnZibDlzYjJGa0tDa0tDbVZ1WkFvS2JHOWpZV3dnWm5WdVkzUnBiMjRnWTI5dVpHbDBhVzl1S0NrS0lDQWdiWEV1WTIxa0tDY3ZjbVZ0YjNabFluVm1aaUJUZFc1eWFYTmxKeWtLSUNBZ2JYRXVaR1ZzWVhrb01qQXdNQ2tLWlc1a0NuSmxkSFZ5YmlCN2IyNXNiMkZrUFc5dVgyeHZZV1FzSUdOdmJtUm1kVzVqUFdOdmJtUnBkR2x2Ym4wPSIsCiBsb2FkID0gewogIGFsd2F5cyA9IGZhbHNlLAogIHpvbmUgPSAiIiwKICBjbGFzcyA9ICIiLAogfSwKfQ==
If you want specific help, maybe post the code itself? Hard to read it right now lol.

Or, you could hit us up in the coding questions channel on discord.
 
Did anyone have a LEM for the aura calls on Shardahn?
I thought about it, but the problem is with the storm's that are up while you need to run to the add aura. You need to avoid those aura's, and I have not yet figured out a good way to automate that. What I do is preposition a manually run toon to the north, and have another toon in the south. Once I get close enough, I do have a hotkey to '/nav spawn storm call' which moves me to the center of the storm aura.
 
I thought about it, but the problem is with the storm's that are up while you need to run to the add aura. You need to avoid those aura's, and I have not yet figured out a good way to automate that. What I do is preposition a manually run toon to the north, and have another toon in the south. Once I get close enough, I do have a hotkey to '/nav spawn storm call' which moves me to the center of the storm aura.
Same issue - I used one for the sheltered space, but do the add aura's manually because of that stupid duplicate storm.
 
I thought about it, but the problem is with the storm's that are up while you need to run to the add aura. You need to avoid those aura's, and I have not yet figured out a good way to automate that. What I do is preposition a manually run toon to the north, and have another toon in the south. Once I get close enough, I do have a hotkey to '/nav spawn storm call' which moves me to the center of the storm aura.
You can just burn it and get all 3, didn’t realize that the first time I tried slow rolling
 
You can just burn it and get all 3, didn’t realize that the first time I tried slow rolling
Thats what I do in the group script I have, but I thought they were referring to the raid. I may have mis-understood. In my script, I have one toon designated to run to the storm call, to give me about 5-10 more seconds to not get the Elder add. As long as I can burn it in 30-40 seconds, I normally get all 3 achievements. Lots of times, I will run the mission with no healer to maximize DPS :)
 
Thats what I do in the group script I have, but I thought they were referring to the raid. I may have mis-understood. In my script, I have one toon designated to run to the storm call, to give me about 5-10 more seconds to not get the Elder add. As long as I can burn it in 30-40 seconds, I normally get all 3 achievements. Lots of times, I will run the mission with no healer to maximize DPS :)
I ran all 4 no healer with guildies, I might try it while boxing. I need to go back and do TOB since I didn’t play during the expansion.
 
i did a search in this thread and could not find anything - but by chance does anyone have a working LEM for Vish ? :)
 
Got my MercStance working for the most part. Or at least close to what I had in my macros. It should set cleric mercs to reactive as needed, and DPS mercs to burn as needed, then back to balanced when fight is over or DPS mercs are over aggroing. If a merc died, will revive them.


Will of course want to edit the aggro percentage to your liking.

Code:
local mq = require('mq')
-- Do not edit this if condition
if not package.loaded['events'] then
    print('\ar[MercControl]\ax This script is intended for Lua Event Manager (LEM). Try "\a-t/lua run lem\a-x"')
end
local function on_load()
    print('\ag[MercControl]\ax Module Loaded.')
end
---@return boolean @Returns true if we have a merc (Active or Dead)
local function condition()
    local state = mq.TLO.Mercenary.State()
    return state == "ACTIVE" or state == "DEAD"
end
local function action()
    local merc = mq.TLO.Mercenary
    local me = mq.TLO.Me
    local assist = me.GroupAssistTarget
    local xtCount = me.XTarget() or 0
    -- 1. REVIVE DEAD MERC
    if merc.State() == "DEAD" then
        if mq.TLO.Window('MMGW_ManageWnd').Child('MMGW_SuspendButton').Enabled() then
            print('\ar[MercControl]\ax Mercenary is dead. Attempting to revive...')
            mq.cmd('/notify MMGW_ManageWnd MMGW_SuspendButton LeftMouseUp')
            mq.delay(5000, function() return merc.State() == "ACTIVE" end)
        end
        return -- Exit action to let the merc spawn in
    end
    if mq.TLO.Target() and mq.TLO.Target.Type() == 'CORPSE' then
        return 
    end
    local currentStance = merc.Stance()
    local mercClass = merc.Class.Name()
    -- 2. RESET TO BALANCED (Not in combat or low threat)
    if  mq.TLO.Me.CombatState() ~= "COMBAT" and currentStance ~= "Balanced" and mercClass ~= "Warrior" then
        mq.cmd('/stance Balanced')
        mq.delay(500)
        return
    end
    -- 3. COMBAT LOGIC (Requires a valid assist target)
    if assist.ID() ~= 0 and assist.Type() ~= "PC" and mq.TLO.Me.CombatState() == "COMBAT" then
        local targetHP = assist.PctHPs() or 100
        local mercName = merc.CleanName()
        local mercAggro = 0
        
         if mercClass == "Warrior" then
            return
         end
        
        if mq.TLO.Me.CombatState() ~= "COMBAT" then
            return
        end
        -- Get Merc Aggro safely
        if mercName then
            mercAggro = mq.TLO.Group.Member(mercName).PctAggro() or 0
        end
        -- CLERIC LOGIC
        if mercClass == "Cleric" then
            -- Set Reactive if Named or 3+ mobs
            if currentStance ~= "Reactive" and (mq.TLO.Target.Named() or xtCount >= 3) then
                mq.cmd('/stance Reactive')
                mq.delay(200)
            -- Back to Balanced if things are calm
            elseif currentStance == "Reactive" and not mq.TLO.Target.Named() and xtCount < 3 then
                mq.cmd('/stance Balanced')
                mq.delay(200)
            end
        end
        -- DPS LOGIC (Rogue/Wizard)
        if mercClass == "Rogue" or mercClass == "Wizard" then
            -- Set Burn if target < 90% and aggro is safe
            if targetHP <= 90 and mercAggro <= 75 then
                if currentStance ~= "Burn" then
                    mq.cmd('/stance Burn')
                    mq.delay(200)
                end
            -- Throttle back to Balanced if aggro high or target HP high
            elseif mercAggro > 75 or targetHP > 90 then
                if currentStance ~= "Balanced" then
                    mq.cmd('/stance Balanced')
                    mq.delay(200)
                end
            end
        end
    end
end
return {
    onload = on_load, 
    condfunc = condition, 
    actionfunc = action
}


Code:
cmV0dXJuIHsKIFsiY29kZSJdID0gImJHOWpZV3dnYlhFZ1BTQnlaWEYxYVhKbEtDZHRjU2NwQ2dvdExTQkVieUJ1YjNRZ1pXUnBkQ0IwYUdseklHbG1JR052Ym1ScGRHbHZiZ3BwWmlCdWIzUWdjR0ZqYTJGblpTNXNiMkZrWldSYkoyVjJaVzUwY3lkZElIUm9aVzRLSUNBZ0lIQnlhVzUwS0NkY1lYSmJUV1Z5WTBOdmJuUnliMnhkWEdGNElGUm9hWE1nYzJOeWFYQjBJR2x6SUdsdWRHVnVaR1ZrSUdadmNpQk1kV0VnUlhabGJuUWdUV0Z1WVdkbGNpQW9URVZOS1M0Z1ZISjVJQ0pjWVMxMEwyeDFZU0J5ZFc0Z2JHVnRYR0V0ZUNJbktRcGxibVFLQ214dlkyRnNJR1oxYm1OMGFXOXVJRzl1WDJ4dllXUW9LUW9nSUNBZ2NISnBiblFvSjF4aFoxdE5aWEpqUTI5dWRISnZiRjFjWVhnZ1RXOWtkV3hsSUV4dllXUmxaQzRuS1FwbGJtUUtDaTB0TFVCeVpYUjFjbTRnWW05dmJHVmhiaUJBVW1WMGRYSnVjeUIwY25WbElHbG1JSGRsSUdoaGRtVWdZU0J0WlhKaklDaEJZM1JwZG1VZ2IzSWdSR1ZoWkNrS2JHOWpZV3dnWm5WdVkzUnBiMjRnWTI5dVpHbDBhVzl1S0NrS0lDQWd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lDQWdJQ0FnSUNBZ0lDQWdJRzF4TG1SbGJHRjVLREl3TUNrS0lDQWdJQ0FnSUNBZ0lDQWdJQ0FnSUdWdVpBb2dJQ0FnSUNBZ0lDQWdJQ0JsYm1RS0lDQWdJQ0FnSUNCbGJtUUtJQ0FnSUdWdVpBcGxibVFLQ25KbGRIVnliaUI3Q2lBZ0lDQnZibXh2WVdRZ1BTQnZibDlzYjJGa0xDQUtJQ0FnSUdOdmJtUm1kVzVqSUQwZ1kyOXVaR2wwYVc5dUxDQUtJQ0FnSUdGamRHbHZibVoxYm1NZ1BTQmhZM1JwYjI0S2ZRPT0iLAogWyJsb2FkIl0gPSB7CiAgWyJjbGFzcyJdID0gIiIsCiAgWyJhbHdheXMiXSA9IGZhbHNlLAogIFsiem9uZSJdID0gIiIsCiB9LAogWyJjYXRlZ29yeSJdID0gIiIsCiBbInR5cGUiXSA9ICJjb25kaXRpb25zIiwKIFsibmFtZSJdID0gIk1lcmNTdGFuY2UiLAp9

Added checks for Warrior mercs, skips altering stance.
Added checks for combat state.
 
Last edited:
Release Lua Event Manager (LEM) Event Library

Users who are viewing this thread

Back
Top
Cart