Anti Idle
Description
Turns different directions every 5 ~ 10 minutes if you have been standing still for longer than that.
Requirements
- WindBot 1.1.2
- Raphael's Library 0.1.2
- Lucas Terra's Library 12.8
Code
init start
local lastStand = $standtime
local randTime = math.random(300000, 600000)
init end
auto(100)
if $standtime < lastStand then
lastStand = $standtime
end
if $standtime - lastStand > randTime then
local dirs = {'n', 'e', 's', 'w'}
-- Makes sure it's random and not the same we're facing right now
table.remove(dirs, table.find(dirs, $self.dir))
turn(dirs[math.random(1, 3)])
waitping()
lastStand = $standtime
randTime = math.random(300000, 600000)
end
Gist