zed_com

Ферма на 1 чанк

Jul 27th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.98 KB | None | 0 0
  1. local robot = require('robot')
  2. local term = require('term')
  3. local y = 3
  4. local sec = 400
  5. local function sbor()
  6.     local a = 1
  7.     local b = 1
  8.     for j = 1, 16 do
  9.         for i = 1, 15 do
  10.             robot.useDown() robot.useDown() robot.forward()
  11.         end
  12.         if a == 1
  13.             then  robot.turnRight() robot.useDown() robot.useDown() robot.forward() robot.useDown() robot.useDown() robot.turnRight() a=a+1
  14.             else  robot.turnLeft() robot.useDown() robot.useDown() robot.forward() robot.useDown() robot.useDown() robot.turnLeft() a=a-1
  15.         end
  16.     end
  17.     robot.turnLeft()
  18.     for i = 1, 16 do robot.forward() end
  19.     robot.turnLeft()
  20.     for i = 1, 16 do robot.select(i) robot.drop() end
  21.     robot.turnRight()
  22.     robot.turnRight()
  23. end
  24.  
  25. while true do
  26.     term.clear()
  27.     term.setCursor(1,1)
  28.     sbor()
  29.     for t = 0, sec do
  30.         print("до следующего збора осталось ", sec-t, "сек")
  31.         term.setCursor(1,1)
  32.         os.sleep(1)
  33.         term.clearLine()
  34.         t = t + 1
  35.     end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment