Advertisement
rollton

Пизделка под Стример из Computronics

Jun 27th, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. -- https://github.com/gamax92/LionRay
  2. -- http://drivetts.ehubsoft.net
  3. local component = require("component")
  4. local shell = require("shell")
  5. local unicode=require("unicode")
  6.  
  7. local tape = component.tape_drive
  8.  
  9. local args = shell.parse(...)
  10.  
  11. local koko = {
  12. "12:00",
  13. "06:00",
  14. }
  15.  
  16. if args[1] == nil then
  17.     print("[назв проги] [время]")
  18.     return
  19. else
  20.     while true do
  21.         time = unicode.sub(os.date(),10,14)
  22.         pos = tape.getPosition()
  23.         if pos > tonumber(args[1]) then
  24.             tape.stop()
  25.             tape.seek(-pos)
  26.         end
  27.         for _,gg in pairs(koko) do
  28.             if time == gg then
  29.                 tape.play()
  30.             end
  31.         end
  32.         os.sleep(1)
  33.     end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement