Advertisement
yoannm57

Weather Clear v1.0

May 7th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Weather Clear v1.0 by yerathel
  2. -- http://interageek.fr/
  3. -- Copyright © 2015
  4. -- All Right Reserved
  5.  
  6. local args = {...}
  7. if not commands then
  8.     print("Ce programme est pour un commande computer seulement!")
  9.     return
  10. end
  11. if args[1] == "?" or args[1] == "/?" or args[1] == "-?" or args[1] == "help" then
  12.     print("Usage:")
  13.     print(fs.getName(shell.getRunningProgram()).." [ticksToWait] [programToRun]")
  14.     return
  15. end
  16. local ticksToWait = tonumber(args[1]) or 999999
  17. local prog = args[2] or "rom/programs/shell"
  18. print("Weather Clear daemon attente "..ticksToWait.." pour chaque commande")
  19. local function main()
  20.     while true do
  21.         commands.exec("/weather clear 999999")
  22.         sleep(ticksToWait/20)
  23.     end
  24. end
  25. parallel.waitForAny(function() shell.run(prog) end, main)
  26. print("Daemon Kill")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement