Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- dig
- function forward()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- while not turtle.forward() do turtle.dig() end
- end
- function back()
- if not turtle.back() then
- turtle.turnLeft()
- turtle.turnLeft()
- forward()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- function leftWithoutMoving()
- turtle.turnLeft()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- turtle.turnRight()
- end
- function rightWithoutMoving()
- turtle.turnRight()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- turtle.turnLeft()
- end
- function up()
- while turtle.detectUp() do
- turtle.digUp()
- os.sleep(0.5)
- end
- while not turtle.up() do turtle.digUp() end
- end
- function down()
- while turtle.detectDown() do
- turtle.digDown()
- end
- while not turtle.down() do turtle.digDown() end
- end
Advertisement
Add Comment
Please, Sign In to add comment