Advertisement
darthgustav

buildwall.lua

Feb 12th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. -- BuildWall
  2. arg = {...}
  3.  
  4. local robot = require("robot")
  5.  
  6. require("undock")
  7.  
  8. require("wallwork")
  9.  
  10. for j = 1,arg[1],1
  11. do
  12. --Movement from Workspace to Center of Field.
  13. for i = 1,9,1
  14. do
  15. robot.forward()
  16. end
  17.  
  18. --Work
  19.  
  20. --Place Iron
  21. robot.select(1)
  22. robot.place()
  23.  
  24. --Move to facilitate Place Redstone
  25. robot.up()
  26. robot.up()
  27. robot.forward()
  28.  
  29. --Place Redstone--
  30. robot.select(2)
  31. robot.placeDown()
  32.  
  33. --Facing Workspace
  34. robot.turnRight()
  35. robot.turnRight()
  36.  
  37. --Move toward Workspace
  38. robot.forward()
  39. robot.down()
  40. robot.down()
  41.  
  42. for i = 1,8,1
  43. do
  44. robot.forward()
  45. end
  46.  
  47. --Facing to Move to Button
  48. robot.turnRight()
  49.  
  50. --Move to Press Button
  51. robot.forward()
  52. robot.up()
  53. robot.up()
  54.  
  55. --Facing to Press Button
  56. robot.turnRight()
  57. robot.turnRight()
  58.  
  59. --Pressing Redstone Dispenser Button
  60. robot.use()
  61.  
  62. --Move toward Workspace
  63. robot.down()
  64. robot.forward()
  65.  
  66. --Facing Workspace
  67. robot.turnRight()
  68.  
  69. --Move into Workspace
  70. robot.forward()
  71. robot.down()
  72.  
  73. --Return Facing to Field
  74. robot.turnRight()
  75. robot.turnRight()
  76.  
  77. if j % 20 == 0 then
  78. require ("wallworkreturn")
  79. require ("restock")
  80. require ("wallwork")
  81. end
  82. end
  83. require ("wallworkreturn")
  84.  
  85. require ("restock")
  86.  
  87. require ("dock")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement