
Originally Posted by
Naato1209
looking for a script for using terra amulet at X % HP
for example
use terra if health % below 80
i need for banuta ;d
lua code:local HPPC = 80 -- health percent
local CONDITIONAL_AMULET_NAME = "terra amulet" -- use if current hp < HPPC
local DEFAULT_AMULET_NAME = "platinum amulet" -- use if current hp > HPPC
function swap()
if (Self.Health() / Self.MaxHealth() * 100 < HPPC) then
if (Self.Amulet().id ~= Item.GetID(CONDITIONAL_AMULET_NAME) and Self.ItemCount(CONDITIONAL_AMULET_NAME) > 0) then
Self.Equip(CONDITIONAL_AMULET_NAME, "amulet")
wait(300,500)
end
else
if (Self.Amulet().id == Item.GetID(CONDITIONAL_AMULET_NAME) and Self.ItemCount(DEFAULT_AMULET_NAME) > 0) then
Self.Equip(DEFAULT_AMULET_NAME, "amulet")
wait(300, 500)
end
end
end
Module.New("Equip Amulet", function(mod)
swap()
mod:Delay(1000)
end)