View Full Version : Request Terra Amulet when certain hp
Naato1209
12-31-2015, 09:07 AM
looking for a script for using terra amulet at X % HP
for example
use terra if health % below 80
i need for banuta ;d
Merre
12-31-2015, 02:40 PM
If you want it to work faster lower the wait times at line 11 and 14
Also I havnt been scripting for xb for a very long time now so try it safely, you could set the % to 99 and walk into a firebomb a couple of times and see if it equips it
Amulet = "Terra Amulet" -- neck to equip
HP = 80 -- % to equip at
Self.HealthPercent = function ()
return math.abs(Self.Health() / (Self.MaxHealth() * 0.01))
end
Module.New('amulethp', function(mod)
if (Self.HealthPercent() <= HP) and (Self.Amulet() ~= Amulet) then
Self.Equip(Amulet, "amulet")
mod:Delay(10000)
else
Self.Dequip("amulet", 0)
mod:Delay(2000)
end
end)
Sharri
12-31-2015, 02:41 PM
looking for a script for using terra amulet at X % HP
for example
use terra if health % below 80
i need for banuta ;d
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)
Aristeus
12-31-2015, 02:54 PM
Only use wait in modules if it's between two actions, it puts everything else in the script on hold. Just use mod:delay instead.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.