Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This little program sends the turtle
- -- back to the treefarm starting point
- -- and restarts the treefarm program
- -- if the tree farm program aborts
- -- while the turtle is at the dirt block.
- -- No variables needed.
- function goForward(n)
- for i=1,n do
- turtle.forward()
- end
- end
- function Return()
- turtle.turnLeft()
- goForward(5)
- turtle.turnRight()
- goForward(5)
- end
- turtle.down()
- turtle.dig()
- for i=1,1 do
- Return()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- -- This section restarts the treefarm for you.
- shell.run("treefarm")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement