Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local computer = require("computer")
- local shell = require("shell")
- function reload()
- robot.turnRight()
- for i = 0, 2, 1 do
- robot.forward()
- end
- robot.turnRight()
- robot.select(1)
- robot.suck(16)
- robot.turnLeft()
- robot.forward()
- robot.turnRight()
- robot.select(2)
- robot.suck(32)
- robot.turnLeft()
- for i = 0, 3, 1 do
- robot.back()
- end
- robot.turnLeft()
- end
- function place()
- robot.select(1)
- robot.place()
- robot.up()
- robot.select(2)
- robot.place()
- robot.down()
- end
- function drop()
- robot.select(2)
- robot.drop(1)
- end
- local args, ops = shell.parse(...)
- for i = 0, args[1] - 1 , 1 do
- reload()
- for i = 0, 15, 1 do
- robot.forward()
- place()
- robot.back()
- drop()
- os.sleep(5)
- end
- robot.back()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement