Advertisement
gunny576

TreeTap

Oct 17th, 2013
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function row (c)
  2. control = c%2
  3. -- even
  4. if control ==1 then
  5. treer()
  6. move()
  7. end
  8. --odd
  9. if control ==0 then
  10. treel()
  11. move()
  12. end
  13. for i=0,3,1 do
  14. if control ==0 then
  15. treel()
  16. move()
  17. treel()
  18. move()
  19. c=c+1
  20. end
  21. if control ==1 then
  22. treer()
  23. move()
  24. treer()
  25. move()
  26. c=c+1
  27. end
  28. control = c%2
  29. end
  30. if control ==0 then
  31. treer()
  32. move()
  33. end
  34. --odd
  35. if control ==1 then
  36. treel()
  37. move()
  38. end
  39. end
  40.  
  41. function treer ()
  42. for i=0,7,1 do
  43. turtle.dig()
  44. turtle.up()
  45. end
  46. turtle.turnRight()
  47. turtle.forward()
  48. turtle.turnLeft()
  49. turtle.forward()
  50. turtle.turnLeft()
  51. for i=0,7,1 do
  52. turtle.dig()
  53. turtle.down()
  54. end
  55. turtle.turnRight()
  56. turtle.forward()
  57. turtle.turnLeft()
  58. turtle.forward()
  59. turtle.turnLeft()
  60. for i=0,7,1 do
  61. turtle.dig()
  62. turtle.up()
  63. end
  64. turtle.turnRight()
  65. turtle.forward()
  66. turtle.turnLeft()
  67. turtle.forward()
  68. turtle.turnLeft()
  69. for i=0,7,1 do
  70. turtle.dig()
  71. turtle.down()
  72. end
  73. end
  74.  
  75. function treel ()
  76. for i=0,7,1 do
  77. turtle.dig()
  78. turtle.up()
  79. end
  80. turtle.turnLeft()
  81. turtle.forward()
  82. turtle.turnRight()
  83. turtle.forward()
  84. turtle.turnRight()
  85. for i=0,7,1 do
  86. turtle.dig()
  87. turtle.down()
  88. end
  89. turtle.turnLeft()
  90. turtle.forward()
  91. turtle.turnRight()
  92. turtle.forward()
  93. turtle.turnRight()
  94. for i=0,7,1 do
  95. turtle.dig()
  96. turtle.up()
  97. end
  98. turtle.turnLeft()
  99. turtle.forward()
  100. turtle.turnRight()
  101. turtle.forward()
  102. turtle.turnRight()
  103. for i=0,7,1 do
  104. turtle.dig()
  105. turtle.down()
  106. end
  107. end
  108.  
  109. function move ()
  110. turtle.back()
  111. turtle.back()
  112. turtle.back()
  113. turtle.turnRight()
  114. turtle.turnRight()
  115. end
  116.  
  117. row(1)
  118. row(2)
  119. row(3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement