Advertisement
Guest User

trrrrr

a guest
Mar 1st, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 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.select(5)
  28. turtle.dig()
  29. turtle.forward()
  30. for a = 1 , 6 do
  31. turtle.digUp()
  32. turtle.up()
  33. end
  34. for b = 1 , 6 do
  35. turtle.down()
  36. end
  37. end
  38. for a = 1 , 5 do
  39. while not turtle.detect() do
  40. turtle.forward()
  41. end
  42. fell()
  43. end
  44. turtle.turnLeft()
  45. turtle.turnLeft()
  46. for b = 1 , 3 do
  47. turtle.back()
  48. end
  49. sleep(120)
  50. plant = 5
  51. gap = 0
  52. while plant > 0 do
  53. turtle.forward()
  54. suck()
  55. turtle.select(5)
  56. gap = gap + 1
  57. if gap == 4 then
  58. turtle.turnLeft()
  59. turtle.turnLeft()
  60. turtle.select(4)
  61. turtle.place()
  62. turtle.turnLeft()
  63. turtle.turnLeft()
  64. plant = plant - 1
  65. gap = 0
  66. end
  67. end
  68. for a = 1 , 2 do
  69. turtle.forward()
  70. suck()
  71. end
  72. while not turtle.detect() do
  73. turtle.forward()
  74. end
  75. for a = 5 , 16 do
  76. turtle.select(a)
  77. turtle.drop()
  78. end
  79. turtle.turnLeft()
  80. turtle.turnLeft()
  81. refuel()
  82. rednet.broadcast("Tree Run Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement