Advertisement
Guest User

tree-3-1-15

a guest
Mar 1st, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. rednet.broadcast("Felling Trees")
  2. function refuel()
  3. fueled = 0
  4. if turtle.getFuelLevel() < 5000 then
  5. turtle.select(1)
  6. turtle.suckUp(15)
  7. fueled = turtle.getItemCount(1)
  8. if fueled < 15 then
  9. rednet.broadcast("Fuel chest now empty")
  10. end
  11. turtle.refuel()
  12. end
  13. end
  14. function suck()
  15. for x = 1 , 2 do
  16. turtle.select(4)
  17. turtle.suck()
  18. turtle.turnLeft()
  19. turtle.suck()
  20. turtle.forward()
  21. turtle.suck()
  22. turtle.back()
  23. turtle.turnLeft()
  24. end
  25. end
  26. function fell()
  27. turtle.dig()
  28. turtle.forward()
  29. for a = 1 , 6 do
  30. turtle.digUp()
  31. turtle.up()
  32. end
  33. for b = 1 , 6 do
  34. turtle.down()
  35. end
  36. end
  37. for a = 1 , 5 do
  38. while not turtle.detect() do
  39. turtle.forward()
  40. end
  41. fell()
  42. end
  43. turtle.turnLeft()
  44. turtle.turnLeft()
  45. for b = 1 , 3 do
  46. turtle.back()
  47. end
  48. sleep(120)
  49. plant = 5
  50. gap = 0
  51. while plant > 0 do
  52. turtle.forward()
  53. suck()
  54. turtle.select(5)
  55. gap = gap + 1
  56. if gap == 4 then
  57. turtle.turnLeft()
  58. turtle.turnLeft()
  59. turtle.select(4)
  60. turtle.place()
  61. turtle.turnLeft()
  62. turtle.turnLeft()
  63. plant = plant - 1
  64. gap = 0
  65. end
  66. end
  67. for a = 1 , 2 do
  68. turtle.forward()
  69. suck()
  70. end
  71. while not turtle.detect() do
  72. turtle.forward()
  73. end
  74. for a = 5 , 16 do
  75. turtle.select(a)
  76. turtle.drop()
  77. end
  78. turtle.turnLeft()
  79. turtle.turnLeft()
  80. refuel()
  81. rednet.broadcast("Tree Run Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement