Advertisement
Guest User

Untitled

a guest
Dec 16th, 2012
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. function place(curSlot)
  2. if turtle.getItemCount(curSlot) == 0 then
  3. for curSlot=curSlot,16 do
  4. if turtle.getItemCount(curSlot) > 0 then
  5. break
  6. end
  7. end
  8. end
  9. turtle.place()
  10.  
  11. return curSlot
  12. end
  13.  
  14. function checkFuel(curSlot)
  15. if turtle.getFuelLevel() < 1 then
  16. turtle.select(1)
  17. turtle.refuel(1)
  18. turtle.select(curSlot)
  19. end
  20. end
  21.  
  22. function down(curSlot)
  23. checkFuel(curSlot)
  24. return turtle.down()
  25. end
  26.  
  27. function up(curSlot)
  28. checkFuel(curSlot)
  29. return turtle.up()
  30. end
  31.  
  32. local depth = 0
  33.  
  34. local curSlot = 2
  35. turtle.select(2)
  36.  
  37. turtle.digDown()
  38. while turtle.down() do
  39. for turn=1,4 do
  40. curSlot = place(curSlot)
  41. turtle.turnRight()
  42. end
  43. turtle.digDown()
  44. depth = depth + 1
  45. end
  46.  
  47. for u = 1,depth do
  48. up()
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement