• 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! 👋

Question - Mage 1.0 on TLP (2 Viewers)

Joined
May 25, 2012
RedCents
448¢
Version of KissAssist.mac?
latest
When did your problem start?
always
Character Role?
  1. Assist
What class is having this issue?
  1. Magician
How often does this issue occur?
Always
Hey guys,

I'm in the process of switching my casters from cwtn to kiss and I'm trying to figure out how to handle the mage epic 1.0.

Currently on TLP there's no way to get an unlimited charge 1.0 which means summoning the orb, clicking it for the pet, destroying it and then resummoning.

Can anyone suggest how they'd do that in kiss? I understand how to make him summon the epic in the buffs section but not how to make him destroy the 0 charge epic
 
So I'm not sure the destroy functionality is in kiss, Instead I added the summon orb and summon pet parts to my kiss ini and had claude write me a LEM Lua for automatically destroying the epic if it has no chages, and then kiss will resummon a new one.

Can be marked as solved?

lem script here:


Code:
--[[
    orb_check_destroy_LEM.lua
 
    LEM Condition Event: checks if "Orb of Mastery" has 0 charges, and if so,
    destroys it.
 
    Add this as a Condition Event in LEM:
      1. LEM UI -> Condition Events -> Add Event...
      2. Name it (e.g. "OrbOfMasteryDestroy")
      3. Paste this code into the code section (replacing the template)
      4. Enable the event with /lem cond OrbOfMasteryDestroy
 
    LEM calls `condition()` on a loop. When it returns true, LEM calls `action()`.
 
    DEBUGGING: this version prints status lines to the MQ console so you can
    see exactly what happens on each cycle (search for "[OrbCheck]" in your
    chat window). Remove the print() lines once it's confirmed working
    reliably, if you want a quieter script.
]]
 
local mq = require('mq')
 
local ITEM_NAME = "Orb of Mastery"
 
-- Guard so action() doesn't refire every loop tick while the item is momentarily
-- mid-destroy or if FindItem lags a frame behind reality.
local alreadyHandled = false
 
local function log(msg)
    print(string.format("\ay[OrbCheck]\ax %s", msg))
end
 
---@return boolean @Returns true if the condition is met, and the action should be executed.
local function condition()
    local item = mq.TLO.FindItem(ITEM_NAME)
    if not item() then
        if alreadyHandled then
            log("Item no longer found - resetting handled flag.")
        end
        alreadyHandled = false -- item's gone (already destroyed or never had one); reset guard
        return false
    end
 
    local charges = item.Charges() or 0
 
    -- A recharged/fresh orb (charges > 0) means a new item is in play - reset
    -- the guard so its eventual 0-charge state gets caught. We can't rely only
    -- on the "item missing" case above, because a fast resummon script can
    -- swap in a new orb before FindItem ever sees a gap.
    if charges > 0 then
        if alreadyHandled then
            log("Fresh orb with charges detected - resetting handled flag.")
        end
        alreadyHandled = false
        return false
    end
 
    if charges == 0 and not alreadyHandled then
        log(string.format("Charges at 0 (handled=false) - condition TRUE."))
        return true
    end
    return false
end
 
local function action()
    log("action() firing.")
 
    -- Safety: if something is already stuck on the cursor (e.g. a previous
    -- destroy attempt failed to complete), clear it first so we don't end up
    -- grabbing/destroying the wrong item, and so future itemnotify calls
    -- aren't blocked by an occupied cursor.
    if mq.TLO.Cursor() and mq.TLO.Cursor.Name() then
        log(string.format("Cursor already occupied by '%s' - stowing it first.", mq.TLO.Cursor.Name()))
        mq.cmd('/autoinventory')
        mq.delay(500)
    end
 
    local item = mq.TLO.FindItem(ITEM_NAME)
    if not item() or (item.Charges() or 0) > 0 then
        log("Item gone or charges > 0 by the time action() ran - aborting.")
        return
    end
 
    alreadyHandled = true -- prevent re-triggering while we work
 
    -- Notify by item name directly - MQ resolves the correct inventory slot itself,
    -- avoiding the raw-slot-index math (which caused the earlier "pack30" error).
    mq.cmdf('/itemnotify "%s" leftmouseup', ITEM_NAME)
    mq.delay(500)
 
    local cursorName = mq.TLO.Cursor() and mq.TLO.Cursor.Name()
    log(string.format("After itemnotify, cursor holds: '%s'", tostring(cursorName)))
 
    if cursorName == ITEM_NAME then
        mq.cmd('/destroy')
        mq.delay(500)
        log("Destroy command sent.")
    else
        log("Item did NOT end up on cursor - destroy NOT sent. Will retry next cycle.")
        alreadyHandled = false -- didn't actually consume it, allow retry
    end
end
 
return {condfunc=condition, actionfunc=action}
 
Question - Mage 1.0 on TLP

Users who are viewing this thread

  • N
Back
Top
Cart