Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local robot = require('robot')
- local term = require('term')
- local y = 3
- local sec = 400
- local function sbor()
- local a = 1
- local b = 1
- for j = 1, 16 do
- for i = 1, 15 do
- robot.useDown() robot.useDown() robot.forward()
- end
- if a == 1
- then robot.turnRight() robot.useDown() robot.useDown() robot.forward() robot.useDown() robot.useDown() robot.turnRight() a=a+1
- else robot.turnLeft() robot.useDown() robot.useDown() robot.forward() robot.useDown() robot.useDown() robot.turnLeft() a=a-1
- end
- end
- robot.turnLeft()
- for i = 1, 16 do robot.forward() end
- robot.turnLeft()
- for i = 1, 16 do robot.select(i) robot.drop() end
- robot.turnRight()
- robot.turnRight()
- end
- while true do
- term.clear()
- term.setCursor(1,1)
- sbor()
- for t = 0, sec do
- print("до следующего збора осталось ", sec-t, "сек")
- term.setCursor(1,1)
- os.sleep(1)
- term.clearLine()
- t = t + 1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment