Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Dig()
- if turtle.detect()==true then
- repeat
- turtle.dig()
- until turtle.detect() == false
- end
- if turtle.detectUp()==true then
- repeat
- turtle.digUp()
- until turtle.detectUp() == false
- end
- if turtle.detectDown()==true then
- repeat
- turtle.digDown()
- until turtle.detectDown() == false
- end
- end
- function forward()
- if turtle.detect() == true then
- repeat
- turtle.dig()
- until turtle.detect() == false
- end
- if turtle.detect() == false then
- turtle.forward()
- end
- end
- i=0
- repeat
- Dig() until Dig()==false
- if Dig() == false then
- turtle.turnLeft()
- end
- if Dig() == false then
- turtle.turnRight()
- turtle.turnRight()
- end
- if Dig() == false then
- turtle.turnLeft()
- forward()
- i=i+1
- end
- until i==80
- end
- error()
Advertisement
Add Comment
Please, Sign In to add comment