Untitled

 avatar
unknown
plain_text
2 years ago
1.0 kB
5
Indexable
local minDist = 1
local maxDist = 6
local mList = {"Naga Archer"}
local lastCast = now
macro(1000, "[EK] Exeta amp res", function()
    if isInPz() then return end
    local monsters = 0
    for _, mob in ipairs(getSpectators(posz())) do
        if mob:isMonster() then
            local actualDist = getDistanceBetween(player:getPosition(), mob:getPosition())
            if actualDist >= minDist and actualDist <= maxDist then
                if table.contains(mList, mob:getName(), true) then
                    monsters = monsters + 1
                end
            end
        end
    end
    if monsters >= 1 then
        if manapercent() > 30 then
            if not modules.game_cooldown.isCooldownIconActive(101) and not modules.game_cooldown.isCooldownIconActive(133) then
                if canCast("exeta amp res") and now - lastCast > 4000 then
                    say("exeta amp res")
                    lastCast = now
                end
            end
        end
    end
end)
Editor is loading...