Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Forward length of the quarry")
- input = read()
- dz = tonumber(input)
- print("-----")
- print("Side length of quarry")
- input = read()
- dx = tonumber(input)
- print("-----")
- print("Height of quarry")
- input = read()
- dy = tonumber(input)
- print("-----")
- print("Does the quarry move left or right?")
- print("Type 1 for left, 2 for right")
- input = read()
- direction = tonumber(input)
- print("-----")
- print("Starting mining")
- for i=1, 2 do
- if i==2 then
- dz = dz-1
- end
- for z=1, dz do
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- end
- if direction == 1 then
- turtle.turnLeft()
- end
- if direction == 2 then
- turtle.turnRight()
- end
- for x=1, dx-1 do
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- end
- if direction == 1 then
- turtle.turnLeft()
- end
- if direction == 2 then
- turtle.turnRight()
- end
- end
- dy = dy-1
- for y=1, dy do
- while turtle.detectUp() do
- turtle.digUp()
- end
- turtle.up()
- end
- for i=1, 2 do
- for z=1, dz do
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- end
- if direction == 1 then
- turtle.turnLeft()
- end
- if direction == 2 then
- turtle.turnRight()
- end
- for y=1, dy do
- while turtle.detectDown() do
- turtle.digDown()
- end
- turtle.down()
- end
- for y=1, dy do
- turtle.up()
- end
- for x=1, dx-1 do
- while turtle.detect() do
- turtle.dig()
- end
- turtle.forward()
- end
- if direction == 1 then
- turtle.turnLeft()
- end
- if direction == 2 then
- turtle.turnRight()
- end
- for y=1, dy do
- while turtle.detectDown() do
- turtle.digDown()
- end
- turtle.down()
- end
- for y=1, dy do
- turtle.up()
- end
- end
- print("Completed")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement