I present to you... Miner!
// Name: Miner
pointAt = function(x, y)
globals.heading = atan(y - position.y, x - position.x) * 180/pi
end function
goTo = function(x, y, radius=5, dropMines=true)
print "Going to " + x + "," + y
nextDropTime = 0
while true
dist = sqrt((position.x - x)^2 + (position.y - y)^2)
if dist > radius then
pointAt x, y
globals.speed = 50
else
if speed == 50 then print "Arrived"
globals.speed = 0
if actual.speed < 1 then break
end if
yield
if dropMines and speed > 30 and energy > 30 and time > nextDropTime then
drop 2
nextDropTime = time + 0.2
end if
end while
end function
recover = function()
while energy < 50
wait
end while
end function
r = 45
first = true
while true
goTo r, r, 5, not first; recover; first = false
goTo r, -r; recover
goTo -r, -r; recover
goTo -r, r; recover
r = r - 5
if r < 10 then r = 45
end while