Advertisement
darthgustav

buildtunnel.lua

Feb 12th, 2020
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.41 KB | None | 0 0
  1. -- BuildTunnel
  2. arg = {...}
  3.  
  4. local robot = require("robot")
  5.  
  6. require("undock")
  7.  
  8. require("wallwork")
  9.  
  10. --Start Queue
  11. for j = 1,arg[1],1
  12. do
  13. --Movement from Workspace to Center of Field
  14.  
  15. for i = 1,9,1
  16.  
  17. do
  18. robot.forward()
  19. end
  20.  
  21. --Work
  22.  
  23. --Place Compact Machine Wall
  24. robot.select(4)
  25. robot.place()
  26.  
  27. --Move to Place Hopper
  28. robot.up()
  29.  
  30. --Place Hopper
  31. robot.select(3)
  32. robot.place()
  33.  
  34. --Place First Redstone--
  35. robot.select(2)
  36. robot.placeDown()
  37.  
  38. --Face to Place Second Redstone
  39. robot.turnLeft()
  40.  
  41. --Move to Place Second Redstone
  42. robot.forward()
  43.  
  44. --Place Second Redstone
  45. robot.placeDown()
  46.  
  47. --Face to Place Third Redstone
  48. robot.turnRight()
  49.  
  50. --Move to Place Third Redstone
  51. robot.forward()
  52.  
  53. --Place Third Redstone
  54. robot.placeDown()
  55.  
  56. --Move to Place Fourth Redstone
  57. robot.forward()
  58.  
  59. --Place Fourth Redstone
  60. robot.placeDown()
  61.  
  62. --Face to Place Fifth Redstone
  63. robot.turnRight()
  64.  
  65. --Move to Place Fifth Redstone
  66. robot.forward()
  67.  
  68. --Place Fifth Redstone
  69. robot.placeDown()
  70.  
  71. --Move to Place Sixth Redstone
  72. robot.forward()
  73.  
  74. --Place Sixth Redstone
  75. robot.placeDown()
  76.  
  77. --Face to Place Seventh Redstone
  78. robot.turnRight()
  79.  
  80. --Move to Place Seventh Redstone
  81. robot.forward()
  82.  
  83. --Place Seventh Redstone
  84. robot.placeDown()
  85.  
  86. --Move to Place Eighth Redstone
  87. robot.forward()
  88.  
  89. --Place Eighth Redstone
  90. robot.placeDown()
  91.  
  92. --Face to Return to Job Origin
  93. robot.turnRight()
  94.  
  95. --Move to Job Origin
  96. robot.forward()
  97.  
  98. --Facing Workspace
  99. robot.turnLeft()
  100.  
  101. --Move toward Workspace
  102. robot.down()
  103.  
  104. for i = 1,8,1
  105. do
  106. robot.forward()
  107. end
  108.  
  109. --Facing to Move to Button
  110. robot.turnRight()
  111.  
  112. --Move to Press Button
  113. robot.forward()
  114. robot.up()
  115.  
  116. --Facing to Press Button
  117. robot.turnRight()
  118. robot.turnRight()
  119.  
  120. --Pressing Redstone Dispenser Button
  121. robot.use()
  122.  
  123. --Move toward Workspace
  124. robot.down()
  125. robot.forward()
  126.  
  127. --Facing Workspace
  128. robot.turnRight()
  129.  
  130. --Move into Workspace
  131. robot.forward()
  132. robot.down()
  133.  
  134. --Return Facing to Field
  135. for d = 1,9,1
  136. do
  137. robot.turnRight()
  138. robot.turnRight()
  139. end
  140.  
  141. if j % 5 == 0 then
  142. require("wallworkreturn")
  143. require("restock")
  144. require("wallwork")
  145. end
  146. end
  147.  
  148. require("wallworkreturn")
  149. require("restock")
  150. require("dock")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement