Guest User

Untitled

a guest
Apr 19th, 2019
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local block,type = turtle.inspect()
  2. local tree = 0
  3. local upTree = 0
  4. local direct = 0
  5.  
  6. function chopTree()
  7. upTree = 0
  8. block,type = turtle.inspectUp()
  9. while type.name == "ic2:rubber_wood" do
  10. turtle.digUp()
  11. turtle.up()
  12. block,type = turtle.inspectUp()
  13. upTree = upTree + 1
  14. end
  15. for i = 1,upTree,1 do
  16. turtle.down()
  17. end
  18. end
  19.  
  20. function cutRow()
  21. tree = 0
  22. while tree < 6 do
  23. tree = tree + 1
  24. if turtle.detect() == true then
  25. turtle.dig()
  26. turtle.forward()
  27. turtle.digDown()
  28. turtle.select(1)
  29. turtle.placeDown()
  30. chopTree()
  31. if tree == 5 then
  32. if direct == 0 then
  33. turtle.forward()
  34. turtle.forward()
  35. turtle.turnLeft()
  36. turtle.forward()
  37. turtle.forward()
  38. turtle.forward()
  39. turtle.turnLeft()
  40. direct = direct + 1
  41. else
  42. turtle.forward()
  43. turtle.forward()
  44. turtle.turnRight()
  45. turtle.forward()
  46. turtle.forward()
  47. turtle.forwardRight()
  48. direct = direct - 1
  49. end
  50. else
  51. turtle.forward()
  52. turtle.forward()
  53. end
  54. turtle.select(1)
  55. else
  56. if tree == 5 then
  57. if direct == 0 then
  58. turtle.forward()
  59. turtle.forward()
  60. turtle.forward()
  61. turtle.turnLeft()
  62. turtle.forward()
  63. turtle.forward()
  64. turtle.forward()
  65. turtle.turnLeft()
  66. direct = direct + 1
  67. else
  68. turtle.forward()
  69. turtle.forward()
  70. turtle.forward()
  71. turtle.turnRight()
  72. turtle.forward()
  73. turtle.forward()
  74. turtle.forward()
  75. turtle.turnRight()
  76. direct = direct - 1
  77. end
  78. else
  79. turtle.forward()
  80. turtle.forward()
  81. turtle.forward()
  82. end
  83. end
  84. end
  85. end
  86.  
  87. cutRow()
RAW Paste Data