View Full Version : energy ring eq when low health (HELP)
haidars
12-04-2015, 07:51 PM
hello
can someone make me a script for when my health is like 40% and than i will equip a energy ring and when its like 90% i will equip my old ring back ?
thank you,
Haid
seba2632
12-04-2015, 08:56 PM
I found this a couple weeks ago, edited a bit but should work
local ring = 'energy ring' -- Name of the ring
local hpperc = {equip = 60, dequip = 90} -- % HP to equip and % HP to dequip the ring.
local ringbp = "golden backpack" -- Backpack it puts the ring into, when it's above dequip % HP.
Module.New('ring', function()
local health = Self.Health() / Self.MaxHealth() * 100
local finger = Self.Ring().id
local item = {normal = Item.GetID(ring), active = Item.GetRingActiveID(Item.GetID(ring))}
if health <= hpperc.equip then
if finger ~= item.active then
process = true
end
end
if process then
if finger ~= item.active then
Self.Equip(item.normal, 'ring')
else
process = nil
end
end
if health >= hpperc.dequip then
Self.Dequip('ring', ringbp)
end
end)
haidars
12-06-2015, 02:10 PM
awesome it works thanks man :)
MrTrala
12-07-2015, 07:44 PM
^^
--[[
Utamo Ring For Archlight
Version 1.5
Created by Mr Trala
]]
local RingID = 3051 -- Ring ID.
local RingOLD = 12737 --The ID of the normal ring you wear.
local EquipHP = 70 -- Equip Ring at % Health.
local UnEquipHP = 90 -- Health % When you UnEquip The ring and put your other one back.
while (true) do
local creature = Creature.GetByID(Self.ID())
if ((creature:HealthPercent() <= EquipHP) and Self.Ring().id == RingOLD) then
Self.Equip(RingID, "ring")
sleep(math.random(300, 300))
elseif ((creature:HealthPercent() >= UnEquipHP)) then
Self.Equip(RingOLD, "ring")
sleep(math.random(200, 300))
end
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.