View Full Version : Stops Cave bot when little mana
Marshal
04-21-2017, 05:36 PM
Hello ! It needs a script that will stop the cave bot when it's going to be below a certain number of mana and launch it when it's above a certain amount.
Trykon
04-22-2017, 12:38 PM
local lowerTreshold = 30
local upperTreshold = 80
While true then
While Self.Mana()<lowerTreshold then
Walker.Stop()
Wait(1000)
End
While Self.Mana()>upperTreshold then
Walker.Start()
Wait(1000)
End
End
Not tested and written now on the phone so don't take it for granted. If it works, enjoy :)
Edit: I repaired a thing but still I really have no need or intention to test it...
Marshal
04-29-2017, 09:38 AM
Not work :(
14020
Trykon
04-29-2017, 12:01 PM
Edited
Marshal
04-29-2017, 12:26 PM
The same mistake as before :/
I found this script, but it starts immediately when it has more than 10 mana, can somehow set when to move again?
local mp = 10 -- 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)
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.