Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local hasChest = true
- local enderChestSlot = 15
- function fuel()
- if turtle.getFuelLevel() < 10 then
- turtle.select(16)
- turtle.refuel(1)
- turtle.select(1)
- print("turtle has refueled")
- end
- end
- function enderchest()
- if hasChest then
- print("supplying items")
- turtle.select(enderChestSlot)
- turtle.dig()
- while not turtle.place() do turtle.dig() end
- for i = 1, 14 do
- turtle.select(i)
- turtle.drop(64)
- end
- turtle.select(enderChestSlot)
- turtle.dig()
- turtle.select(1)
- end
- end
- local depth = 60
- function run()
- for y = 1, tArgs[1] do
- turtle.dig()
- while not turtle.forward() do turtle.dig() end
- print("going down")
- for x = 1, depth do
- fuel()
- turtle.digDown()
- turtle.down()
- end
- enderchest()
- turtle.dig()
- while not turtle.forward() do turtle.dig() end
- for i = 1, depth do
- turtle.digUp()
- fuel()
- turtle.up()
- end
- enderchest()
- print("")
- end
- print("program has ended, restarting")
- end
- run()
- term.clear()
- term.setCursorPos(1, 1)
- shell.run("startup")
Add Comment
Please, Sign In to add comment