Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require("robot")
- local args,opts = require("shell").parse(...)
- local y = {...}
- local y = tonumber(y)
- local x = 0
- repeat
- robot.select(1)
- robot.turnLeft()
- robot.suck(1)
- robot.turnRight()
- robot.forward()
- robot.down()
- robot.select(2)
- robot.turnLeft()
- robot.suck(1)
- robot.select(3)
- robot.suck(1)
- robot.turnRight()
- robot.forward()
- robot.select(1)
- robot.place()
- robot.up()
- robot.select(2)
- robot.place()
- robot.up()
- robot.up()
- robot.up()
- robot.up()
- robot.up()
- robot.select(3)
- robot.drop()
- robot.down()
- robot.down()
- robot.down()
- robot.down()
- robot.down()
- robot.back()
- robot.back()
- x = x + 1
- print("Craft " .. x .. " out of " .. y .. " is done.")
- until x == y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement