Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function slab()
- for i = 0, 3, 1 do
- turtle.turnRight()
- turtle.dig()
- turtle.place()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- turtle.dig()
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function update()
- shell.run("pastebin" "get" "YhK59cm5" "blockCheck")
- shell.run("pastebin" "get" "2EkpdDpX" "fuelCheck")
- end
- function clearCurs()
- term.clear()
- term.setCursorPos(1,1)
- end
- function doubleCheck()
- shell.run("blockCheck")
- shell.run("fuelCheck")
- turtle.select(1)
- end
- update()
- clearCurs()
- print("How deep do you want the shaft to be?")
- y = tonumber(read())
- clearCurs()
- print("Depth goal: "..y)
- tbu = 0
- for i = 1, 16, 1 do
- turtle.select(i)
- if turtle.compareTo(1) then
- tbu = tbu + turtle.getItemCount()
- end
- end
- print("Total amount of usable blocks: "..tbu)
- print("Maximum amount of blocks to be used: "..(8*y)+4)
- print("Calculated amount of fuel to be used: "..((y*5)+(y-1)))
- sleep(1)
- f = turtle.getFuelLevel()
- doubleCheck()
- for i = 1, y, 1 do
- turtle.digDown()
- turtle.down()
- slab()
- if (i % 3 == 0) then
- doubleCheck()
- end
- term.clear()
- print("Depth goal: "..y)
- print("Remaining: "..(y - (i-1)))
- end
- for i = 0, 3, 1 do
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- turtle.turnLeft()
- end
- for i = 1, y, 1 do
- while turtle.detectUp() do
- turtle.digUp()
- sleep(1.5)
- end
- turtle.up()
- end
- turtle.turnRight()
- turtle.turnRight()
- turtle.placeDown()
- for i = 1, 16, 1 do
- turtle.select(i)
- turtle.drop()
- end
- l = turtle.getFuelLevel()
- tfu = f - l
- print("Total fuel used: "..tfu)
- print("Total fuel left: "..l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement