Advertisement
M2key1

Untitled

Dec 6th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. local l = ...
  2.  
  3. function buildFancyStone()
  4. index = turtle.getSelectedSlot()
  5. if turtle.getItemCount(index) < 1 then
  6. for i=1,16 do
  7. if turtle.getItemCount(i) > 0 then
  8. data = turtle.getItemDetail(i)
  9. if data.name == "TConstruct:decoration.multibrickfancy" then
  10. turtle.select(i)
  11. break
  12. end
  13. end
  14. end
  15. end
  16. turtle.place()
  17. end
  18.  
  19. function buildStoneWall()
  20. index = turtle.getSelectedSlot()
  21. if turtle.getItemCount(index) < 1 then
  22. for i=1,16 do
  23. if turtle.getItemCount() > 0 then
  24. data = turtle.getItemDetail(i)
  25. if data.name == "chisel:stonebricksmooth" then
  26. turtle.select(i)
  27. break
  28. end
  29. end
  30. end
  31. end
  32. turtle.place()
  33. end
  34.  
  35. function buildCobblestone()
  36. index = turtle.getSelectedSlot()
  37. if turtle.getItemCount(index) < 1 then
  38. for i=1,16 do
  39. if turtle.getItemCount() > 0 then
  40. data = turtle.getItemDetail(i)
  41. if data.name == "minecraft:cobblestone" then
  42. turtle.select(i)
  43. break
  44. end
  45. end
  46. end
  47. end
  48. turtle.place()
  49. end
  50.  
  51. function buildGlass()
  52. index = turtle.getSelectedSlot()
  53. if turtle.getItemCount(index) < 1 then
  54. for i=1,16 do
  55. if turtle.getItemCount() > 0 then
  56. data = turtle.getItemDetail(i)
  57. if data.name == "chisel:glass" then
  58. turtle.select(i)
  59. break
  60. end
  61. end
  62. end
  63. end
  64. turtle.place()
  65. end
  66.  
  67. function right(val)
  68. turtle.turnRight()
  69. for i=1,val do
  70. turtle.dig()
  71. turtle.forward()
  72. end
  73. turtle.turnLeft()
  74. end
  75.  
  76. function left(val)
  77. turtle.turnLeft()
  78. for i=1,val do
  79. turtle.dig()
  80. turtle.forward()
  81. end
  82. turtle.turnRight()
  83. end
  84.  
  85. function buildGlassTunnel()
  86. turtle.back()
  87.  
  88. for i=1,4 do
  89. buildGlass()
  90. turtle.up()
  91. end
  92. for i=1,2 do
  93. right(1)
  94. buildGlass()
  95. end
  96. turtle.up()
  97. for i=1,3 do
  98. right(1)
  99. buildGlass()
  100. end
  101.  
  102. right(1)
  103. turtle.down()
  104.  
  105. for i=1,2 do
  106. buildGlass()
  107. right(1)
  108. end
  109. for i=1,4 do
  110. turtle.down()
  111. buildGlass()
  112. end
  113. left(8)
  114. print("Glass finished...\n")
  115. end
  116.  
  117. function buildFancyStoneTunnel()
  118. turtle.back()
  119.  
  120. for i=1,4 do
  121. buildFancyStone()
  122. turtle.up()
  123. end
  124. for i=1,2 do
  125. right(1)
  126. buildFancyStone()
  127. end
  128. turtle.up()
  129. for i=1,3 do
  130. right(1)
  131. buildFancyStone()
  132. end
  133.  
  134. right(1)
  135. turtle.down()
  136.  
  137. for i=1,2 do
  138. buildFancyStone()
  139. right(1)
  140. end
  141. for i=1,4 do
  142. turtle.down()
  143. buildFancyStone()
  144. end
  145. left(8)
  146. print("FancyStone finished...\n")
  147. end
  148.  
  149. function buildStoneWallTunnel(var)
  150. for i=1,var do
  151. turtle.back()
  152.  
  153. for i=1,4 do
  154. buildStoneWall()
  155. turtle.up()
  156. end
  157. for i=1,2 do
  158. right(1)
  159. buildStoneWall()
  160. end
  161. turtle.up()
  162. for i=1,3 do
  163. right(1)
  164. buildStoneWall()
  165. end
  166.  
  167. right(1)
  168. turtle.down()
  169.  
  170. for i=1,2 do
  171. buildStoneWall()
  172. right(1)
  173. end
  174. for i=1,4 do
  175. turtle.down()
  176. buildStoneWall()
  177. end
  178. left(8)
  179. end
  180. print("Stonewall finished...\n")
  181. end
  182.  
  183. function execute()
  184. buildGlassTunnel()
  185. buildFancyStoneTunnel()
  186. buildStoneWallTunnel(3)
  187. buildFancyStoneTunnel()
  188. end
  189.  
  190. for i=1,l do
  191. execute()
  192. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement