PDA

View Full Version : stop walker (cavebot) when x mana/ x% mana



jardy
08-07-2016, 11:53 PM
pls help

Y2Quake
08-10-2016, 09:25 PM
http://xenobot.wikia.com/wiki/Walker_Delay

krille09
08-14-2016, 10:04 AM
local mp = 80 -- Change to what percent you want

Self.ManaPercent = function ()
return math.abs(Self.Mana() / (Self.MaxMana() * 0.01))
end

Module.New("mana stop", function()
if (Self.ManaPercent() < mp) then
Walker.Stop()
else
Walker.Start()
end
end)