Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- https://pastebin.com/rBb27uGy --
- --1x2 tunnel--
- --Program name "Tunnel2"--
- print("Tunnel2")
- print("1x2x2 chunks")
- print("It will take 6 fuel to dig 4 blocks")
- print()
- print("Efficiency=1.5")
- --Refuels--
- for i=16,1,-1 do
- turtle.select(i)
- turtle.refuel()
- end
- fuel=turtle.getFuelLevel()
- --Moves forward 2 per cycle--
- --Uses 4 fuel per cycle--
- --2 fuel to move back 2 squares--
- if (fuel-(fuel%6))/6 < 2 then
- distance=0
- else
- distance=(fuel-(fuel%6))/6
- end
- print("Starting tunnel with ",fuel," fuel")
- print("That equates to a ",distance*2, " long tunnel (Of size 2x1)")
- --Go forward digging--
- --Uses 4 fuel untis per cycle--
- --Moves forward 2--
- ForwardCycles=0
- for x=distance*(2/3),1,-1 do
- if turtle.getItemCount(16)<1 then
- turtle.dig()
- turtle.up()
- turtle.dig()
- turtle.forward()
- turtle.dig()
- turtle.down()
- turtle.dig()
- turtle.forward()
- ForwardCycles=ForwardCycles+1
- print("Fuel remaining:",turtle.getFuelLevel())
- end
- end
- --Heads back to start--
- --Uses 2 fuel per cycle--
- for v=ForwardCycles,1,-1 do
- turtle.back()
- turtle.back()
- end
- --Prints final messege--
- print("Tunnel finished")
- print("Fuel remaining:",turtle.getFuelLevel())
Add Comment
Please, Sign In to add comment