Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SmallKube
- arg = {...}
- local robot = require("robot")
- require("undock")
- require("machinework")
- for j = 1,arg[1],1
- do
- --Move from Workspace toward Starting Corner
- for i = 1,12,1
- do
- robot.forward()
- end
- --Face Starting Corner
- robot.turnRight()
- --Move to Starting Corner
- robot.forward()
- --Face Project Area
- robot.turnRight()
- --Move into Working Position for placeDown
- robot.up()
- --Work
- --Select Stack 5
- robot.select(5)
- --Place Walls on First Pass Floor
- for i = 1,3,1
- do
- --Move to Place Walls
- robot.forward()
- --Place Wall
- robot.placeDown()
- end
- --Select Stack 6
- robot.select(6)
- --Move and Turn for Second Pass Floor
- for i = 1,2,1
- do
- robot.forward()
- robot.turnRight()
- end
- --Place Walls on Second Pass Floor
- for i = 1,3,1
- do
- --Move Forward
- robot.forward()
- --Place Wall
- robot.placeDown()
- end
- --Select Stack 7
- robot.select(7)
- --Move and Turn for Final Pass Floor
- for i = 1,2,1
- do
- --Move Forward
- robot.forward()
- --Turn Left
- robot.turnLeft()
- end
- --Place Walls on Final Pass Floor
- for i = 1,3,1
- do
- --Move Forward
- robot.forward()
- --Place Wall
- robot.placeDown()
- end
- --Select Stack 8
- robot.select(8)
- --Move up for Walls
- robot.up()
- --Build Walls
- for x = 1,4,1
- do
- --Place First Wall Block on this Side
- robot.placeDown()
- --Facing for Walls
- robot.turnLeft()
- --Building Walls
- for i = 1,2,1
- do
- --Place Wall
- robot.placeDown()
- --Move Forward
- robot.forward()
- end
- end
- --Install Iron Core
- --Select Stack 11
- robot.select(11)
- --Move to Center
- for i = 1,2,1
- do
- --Turn Left
- robot.turnLeft()
- --Move Forward
- robot.forward()
- end
- --Place Iron Core
- robot.placeDown()
- --Move Back
- for i = 1,2,1
- do
- --Turn Left
- robot.turnLeft()
- --Move Forward
- robot.forward()
- end
- --Move Up for Ceiling
- robot.up()
- --Select Stack 9
- robot.select(9)
- --Facing Work Area
- for i = 1,2,1
- do
- robot.turnLeft()
- end
- --Build Roof
- for i=1,3,1
- do
- --Place Blocks on First Pass Ceiling
- robot.placeDown()
- --Move to Place Next Block
- robot.forward()
- end
- --Prepare for Second Pass Ceiling
- for i = 1,2,1
- do
- --Turn Right before Next Pass
- robot.turnRight()
- --Move forward before Next Pass
- robot.forward()
- end
- --Place Blocks on First Pass Ceiling
- for i = 1,3,1
- do
- --Place a Block
- robot.placeDown()
- --Move Forward
- robot.forward()
- end
- --Prepare for Final Pass Ceiling
- for i = 1,2,1
- do
- --Turn Left for Final Pass Ceiling
- robot.turnLeft()
- --Move Forward for Final Pass Ceiling
- robot.forward()
- end
- --Select Stack 10
- robot.select(10)
- --Build Final Pass Ceiling
- for i = 1,3,1
- do
- --Place Block
- robot.placeDown()
- --Move Forward
- robot.forward()
- end
- --Return to Shoot Pearl
- --Turn Around
- for i=1,2,1
- do
- robot.turnLeft()
- end
- --Move toward Pearl Dispenser
- for i = 1,4,1
- do
- robot.forward()
- end
- --Turn Toward Pearl Dispenser
- robot.turnRight()
- --Move Toward Pearl Dispenser
- for i = 1,2,1
- do
- robot.forward()
- end
- --Turn Toward Pearl Dispenser
- robot.turnLeft()
- --Move to Pearl Dispenser Y Level
- robot.down()
- --Move Toward Pearl Dispenser
- for i = 1,7,1
- do
- robot.forward()
- end
- --Turn to Shoot Pearl
- robot.turnLeft()
- --Select Slot 47
- robot.select(47)
- --Shoot Pearl
- robot.use()
- --Move Down from Button
- for i = 1,2,1
- do
- robot.down()
- end
- --Move Toward Work Area
- robot.forward()
- --Face Work Area
- robot.turnRight()
- --Enter Work Area
- robot.forward()
- --Face Field Area
- for i = 1,42,1
- do
- robot.turnRight()
- end
- if j % 3 == 0 then
- require("machineworkreturn")
- require("restock")
- require("machinework")
- end
- end
- require("machineworkreturn")
- require("restock")
- require("dock")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement