Advertisement
M2key1

Untitled

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