Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function place(curSlot)
- if turtle.getItemCount(curSlot) == 0 then
- for curSlot=curSlot,16 do
- if turtle.getItemCount(curSlot) > 0 then
- break
- end
- end
- end
- turtle.place()
- return curSlot
- end
- function checkFuel(curSlot)
- if turtle.getFuelLevel() < 1 then
- turtle.select(1)
- turtle.refuel(1)
- turtle.select(curSlot)
- end
- end
- function down(curSlot)
- checkFuel(curSlot)
- return turtle.down()
- end
- function up(curSlot)
- checkFuel(curSlot)
- return turtle.up()
- end
- local depth = 0
- local curSlot = 2
- turtle.select(2)
- turtle.digDown()
- while turtle.down() do
- for turn=1,4 do
- curSlot = place(curSlot)
- turtle.turnRight()
- end
- turtle.digDown()
- depth = depth + 1
- end
- for u = 1,depth do
- up()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement