Advertisement
Michael45678

Untitled

Jun 20th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. function moveDown(x)
  2. for i = 1 , x, 1
  3. do
  4. turtle.down();
  5. end
  6. end
  7. function checkinvfull()
  8. local full = true
  9.  
  10. for i = 3 , 16, 1
  11. do
  12. if turtle.getItemCount(i) < 1
  13. then
  14. full = false
  15. end
  16. end
  17.  
  18. return full
  19. end
  20.  
  21. function dropAll()
  22.  
  23. for i = 3 , 16, 1
  24. do
  25. turtle.select(i)
  26. turtle.dropDown()
  27. end
  28. end
  29.  
  30. function putChest()
  31. turtle.select(2)
  32. turtle.digDown()
  33. turtle.placeDown()
  34. dropAll()
  35. end
  36.  
  37.  
  38.  
  39. local height = 2
  40. local lenght = 200
  41.  
  42. turtle.select(1)
  43.  
  44.  
  45.  
  46. for i = 1 , lenght, 1
  47. do
  48. turtle.select(1)
  49. if turtle.getFuelLevel() < 2
  50. then
  51. turtle.refuel(2)
  52. end
  53.  
  54. for ia = 1 , height, 1
  55. do
  56. turtle.turnLeft()
  57. turtle.dig()
  58. turtle.turnRight()
  59. turtle.dig()
  60. turtle.turnRight()
  61. turtle.dig()
  62. turtle.turnLeft()
  63. turtle.digUp()
  64. turtle.up()
  65. end
  66. moveDown(height)
  67. if checkinvfull()
  68. then
  69. putChest()
  70. end
  71.  
  72. turtle.forward()
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement