Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function refuel()
- if turtle.getFuelLevel() < 1 then
- turtle.select(16)
- turtle.refuel(1)
- end
- end
- refuel()
- function mineForward()
- for i=1,15,1 do
- refuel()
- turtle.dig()
- turtle.forward()
- end
- end
- direction = false
- function mineLayer()
- for i=1,15,1 do
- --false is right, true is left
- mineForward()
- refuel()
- if direction == false then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- direction = not direction
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- direction = not direction
- end
- end
- mineForward()
- turtle.digDown()
- turtle.down()
- turtle.turnRight()
- turtle.turnRight()
- end
- function layerDown()
- for i=1,userYValue-5,1 do
- mineLayer()
- end
- end
- print("Enter the Y coordinate of the turtle: ")
- userYValue = read()
- layerDown()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement