jadedcat

Alveary

Aug 10th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. --slot 1 frame blocks, slot 2 alveary blocks
  2. --slot 3 rain shields, slot 4 lighting
  3. --slot 5 slabs
  4. -- slot 6 and 7 extra slabs
  5. -- fill all other slots with alveary blocks
  6. -- makes a maximum of 21 alvearies
  7. --first block is placed where the turtle starts
  8. -- alveary is built behind and to the right of turtle starting position
  9.  
  10.  
  11.  
  12. function refill(slot)
  13. local flag = false
  14. for i = 1,16 do
  15. if i ~= slot then
  16. turtle.select(i)
  17. flag = flag or turtle.transferTo(slot)
  18. end
  19. end
  20. return flag
  21. end
  22.  
  23. local tArgs = {...}
  24. local times = tonumber(tArgs[1])
  25. if not times then error("SPECIFY HOW MANY") end
  26. for i = 1, times do
  27.  
  28.  
  29.  
  30.  
  31. turtle.select(1)
  32. turtle.back(1)
  33. turtle.place()
  34. turtle.back(1)
  35. turtle.place()
  36. turtle.back(1)
  37. turtle.place()
  38. turtle.turnRight()
  39. turtle.forward(1)
  40. turtle.turnRight()
  41. turtle.back(1)
  42. turtle.select(2)
  43. turtle.back(1)
  44. turtle.place()
  45. turtle.select(4)
  46. turtle.back()
  47. turtle.place()
  48. turtle.back()
  49. turtle.select(3)
  50. turtle.place()
  51. turtle.turnLeft()
  52. turtle.forward()
  53. turtle.turnLeft()
  54. turtle.back()
  55. turtle.back()
  56. turtle.select(2)
  57. turtle.place()
  58. turtle.back()
  59. turtle.place()
  60. turtle.back()
  61. turtle.place()
  62.  
  63. --layer 2
  64.  
  65. turtle.up()
  66. turtle.turnLeft()
  67. turtle.turnLeft()
  68. turtle.back()
  69. turtle.back()
  70. turtle.place()
  71. turtle.back()
  72. turtle.place()
  73. turtle.back()
  74. turtle.place()
  75. turtle.turnRight()
  76. turtle.forward()
  77. turtle.turnRight()
  78. turtle.back()
  79. turtle.back()
  80. turtle.place()
  81. turtle.back()
  82. turtle.place()
  83. turtle.back()
  84. turtle.place()
  85. turtle.turnLeft()
  86. turtle.forward()
  87. turtle.turnLeft()
  88. turtle.back()
  89. turtle.back()
  90. turtle.place()
  91. turtle.back()
  92. turtle.place()
  93. turtle.back()
  94. turtle.place()
  95. turtle.select(2)
  96.  
  97.  
  98. --Layer 3
  99.  
  100. turtle.up()
  101. turtle.turnRight()
  102. turtle.turnRight()
  103. turtle.back()
  104. turtle.back()
  105. turtle.select(2)
  106. turtle.place()
  107. turtle.back()
  108. turtle.place()
  109. turtle.back()
  110. turtle.place()
  111. turtle.turnRight()
  112. turtle.forward()
  113. turtle.turnRight()
  114. turtle.back()
  115. turtle.back()
  116. turtle.place()
  117. turtle.back()
  118. turtle.place()
  119. turtle.back()
  120. turtle.place()
  121. turtle.turnLeft()
  122. turtle.forward()
  123. turtle.turnLeft()
  124. turtle.back()
  125. turtle.back()
  126. turtle.place()
  127. turtle.back()
  128. turtle.place()
  129. turtle.back()
  130. turtle.place()
  131.  
  132. --Slab row
  133.  
  134. turtle.up()
  135. turtle.turnRight()
  136. turtle.turnRight()
  137. turtle.back()
  138. turtle.back()
  139. turtle.select(5)
  140. turtle.place()
  141. turtle.back()
  142. turtle.place()
  143. turtle.back()
  144. turtle.place()
  145. turtle.turnRight()
  146. turtle.forward()
  147. turtle.turnRight()
  148. turtle.back()
  149. turtle.back()
  150. turtle.place()
  151. turtle.back()
  152. turtle.place()
  153. turtle.back()
  154. turtle.place()
  155. turtle.turnLeft()
  156. turtle.forward()
  157. turtle.turnLeft()
  158. turtle.back()
  159. turtle.back()
  160. turtle.place()
  161. turtle.back()
  162. turtle.place()
  163. turtle.back()
  164. turtle.place()
  165.  
  166. --Get in position
  167.  
  168. turtle.up()
  169. for i = 1,4 do turtle.forward() end
  170. for i = 1,4 do turtle.down() end
  171. turtle.turnRight()
  172. turtle.turnRight()
  173. turtle.back()
  174. refill(2)
  175. refill(5)
  176. end
Advertisement
Add Comment
Please, Sign In to add comment