Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.select(1)
- turtle.refuel()
- turtle.select(2)
- turtle.refuel()
- turtle.select(1)
- Depth = 2
- -- The function selecting the length of the quarry.
- function forward()
- local length = 10
- for i = 1, length, 1 do
- turtle.dig()
- turtle.forward()
- end
- end
- -- The function calling the turtle back to the chest/unloading area.
- function home()
- local blocks = 10
- turtle.turnLeft()
- for i = 1, blocks, 1 do
- turtle.forward()
- end
- for i = 1, Depth, 1 do
- turtle.up()
- end
- turtle.turnLeft()
- turtle.forward()
- local inventory = 16
- local x = 1
- for i = 1, inventory, 1 do
- turtle.select(x)
- turtle.dropDown()
- x = x + 1
- end
- end
- -- The function that loops the turtle's digging.
- function turn()
- local size = 5
- for i = 1, size do
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- forward()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- forward()
- end
- end
- -- The function returning the turtle to it's diggingpoint.
- function back()
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.forward()
- for i = 1, Depth, 1 do
- turtle.digDown()
- turtle.down()
- end
- end
- -- The loop that keeps the program going.
- while(true)do
- turn()
- home()
- Depth = Depth + 1
- back()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement