Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Restock
- local robot = require("robot")
- --Move to Inventory Area
- for i = 1,21,1
- do
- robot.forward()
- end
- -- Facing Inventory
- robot.turnLeft()
- -- Approach Inventory Station 1
- for i = 1,5,1
- do
- robot.forward()
- end
- -- Move Up
- robot.up()
- -- Select Slot 1
- robot.select(1)
- require("cyclestock")
- --Select Slot 11
- robot.select(11)
- require("cyclestock")
- --Move to Second Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 2
- robot.select(2)
- require("cyclestock")
- --Move to Third Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 3
- robot.select(3)
- require("cyclestock")
- --Move to Fourth Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 4
- robot.select(4)
- require("cyclestock")
- --Select Slot 5
- robot.select(5)
- require("cyclestock")
- --Select Slot 6
- robot.select(6)
- require("cyclestock")
- --Select Slot 7
- robot.select(7)
- require("cyclestock")
- --Select Slot 8
- robot.select(8)
- require("cyclestock")
- --Select Slot 9
- robot.select(9)
- require("cyclestock")
- --Select Slot 10
- robot.select(10)
- require("cyclestock")
- --Move to Fifth Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 12
- robot.select(12)
- require("cyclestock")
- --Move to Sixth Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 13
- robot.select(13)
- require("cyclestock")
- --Move to Seventh Inventory
- robot.turnRight()
- robot.forward()
- robot.turnLeft()
- --Select Slot 14
- robot.select(14)
- require("cyclestock")
- --Return to Undock Waypoint
- --Face the Field Area
- for i = 1,2,1
- do
- robot.turnRight()
- end
- --Move toward the Field Area
- for i = 1,5,1
- do
- robot.forward()
- end
- --Face the Undock Point
- robot.turnRight()
- --Move Down to Align to Undock Point
- robot.down()
- --Return to the Undock Point
- for i = 1,27,1
- do
- robot.forward()
- end
- --Face Work Area
- for i = 1,2,1
- do
- robot.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement