Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --excavate--
- os.loadAPI("gps")
- mx = 0
- my = 0
- mz = 0
- function dig()
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- end
- function excavate(x,z)
- for i = 1, z do
- for o = 2, x do
- dig()
- end
- if gps.GetOri() == 1 and i ~= z then
- gps.Rotate(2)
- dig()
- gps.Rotate(3)
- elseif gps.GetOri() == 3 and i ~= z then
- gps.Rotate(2)
- dig()
- gps.Rotate(1)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement