lua code:local RingID = 3051 --3051 energy ring
local amount = 3 -- monster amount to put ring on
local range = 6 -- range to consider when looking for monster on screen (NO MORE THAN 7!)
local monsterList = -- separate monsters with comma
{
'Crystal Spider'
}
--Dont edit below unless u know what ure doing
function getMonsterCount()
local count = 0
for k, v in ipairs(Self.GetTargets(range)) do
if table.find(monsterList, v:Name()) then
count = count + 1
end
end
return count
end
function ring()
if getMonsterCount() >= amount and Self.Ring().id ~= getActiveRingID(RingID) and Self.ItemCount(RingID) >= 1 then
Self.Equip(RingID, "ring")
wait(200,400)
if Self.Ring().id == getActiveRingID(RingID) then
wait(2000,3000) -- just so it doesnt remove it imidiately ( more human like? )
end
elseif getMonsterCount() < amount and Self.Ring().id == getActiveRingID(RingID) then
Self.Dequip("ring")
end
end
Module('energyRing', function(ManaShield)
ring()
ManaShield:Delay(200 * math.random(1,3))
end)