ShivaFang

Untitled

Aug 28th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local dist = 0
  2.  
  3. turtle.select(2)
  4.  
  5. function digLayer()
  6. if turtle.getItemCount(2)<3 then
  7. turtle.select(3)
  8. turtle.transferTo(2)
  9. turtle.select(2)
  10. end
  11. turtle.turnLeft()
  12. turtle.dig()
  13. turtle.place()
  14. turtle.turnRight()
  15. turtle.turnRight()
  16. turtle.dig()
  17. turtle.place()
  18. turtle.turnLeft()
  19. turtle.digUp()
  20. upity()
  21. turtle.placeDown()
  22. dist = dist + 1
  23. end
  24.  
  25. function digEmpty()
  26. turtle.turnLeft()
  27. turtle.dig()
  28. turtle.turnRight()
  29. turtle.turnRight()
  30. turtle.dig()
  31. turtle.turnLeft()
  32. turtle.digUp()
  33. turtle.up()
  34. upity()
  35. dist = dist + 1
  36. end
  37.  
  38. function upity()
  39. if detectUp() then
  40. turtle.digUp()
  41. upity()
  42. else
  43. turtle.up()
  44. end
  45.  
  46. function filler()
  47. if turtle.getFuelLevel()<10 then
  48. turtle.select(1)
  49. turtle.refuel(1)
  50. turtle.select(2)
  51. end
  52. end
  53.  
  54. for i = 1,55,1 do
  55. filler()
  56. if dist==5 then
  57. digLayer()
  58. dist=0
  59. end
  60. if dist == 0 then
  61. digLayer()
  62. end
  63. digEmpty()
  64. end
  65.  
  66. run()
Advertisement
Add Comment
Please, Sign In to add comment