Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local runif = true
- local turnDirection = "right"
- term.clear()
- term.setCursorPos(1, 1)
- print("Please input dig dimensions :")
- print("Left :")
- local digLeft = read()
- print("Right :")
- local digRight = read()
- print("Front :")
- local digFront = read()
- print("Back :")
- local digBack = read()
- print("Top :")
- local digTop = read()
- print("Bottom :")
- local digBottom = read()
- term.clear()
- term.setCursorPos(1, 1)
- local totalBlocks = (digFront + 1 + digBack) * (digRight + 1 + digLeft) * (digTop + 1 + digBottom)
- if totalBlocks > 1024 then
- runif = false
- print("Estimated dig volume is "..totalBlocks.." blocks. Insufficient inventory space.")
- end
- for i = 1, 16 do
- turtle.select(i)
- turtle.refuel()
- end
- if totalBlocks > turtle.getFuelLevel() then
- print("Fuel level is "..turtle.getFuelLevel()..". Insufficient fuel.")
- runif = false
- end
- if runif then
- turtle.turnLeft()
- turtle.turnLeft()
- for i = 1, digBack do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnRight()
- for i = 1, digLeft do
- turtle.dig()
- turtle.forward()
- end
- for i = 1, digTop do
- turtle.digUp()
- turtle.up()
- end
- turtle.turnRight()
- end
- while runif do
- for i = 1, digTop + digBottom do
- for j = 1, digLeft + digRight do
- for k = 1, digFront + digBack do
- turtle.dig()
- turtle.forward()
- end
- if turnDirection == "right" then
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turnDirection = "left"
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- turnDirection = "right"
- end
- end
- --turtle.turnLeft()
- --turtle.turnLeft()
- --turtle.digDown()
- --turtle.down()
- --if turnDirection == "right" then
- -- turnDirection = "left"
- --else
- -- turnDirection = "right"
- --end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.digDown()
- turtle.down()
- if turnDirection == "right" then
- turnDirection = "left"
- else
- turnDirection = "right"
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement