Plazter

Argstimer

May 21st, 2013
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. -- CC Timer Made by Plazter --
  2. -- 2013 --
  3. -- Coded on a Computercraft computer --
  4.  
  5. local args = {...}
  6.  
  7.  
  8.  
  9. if args[1] == nil or args[1] == "help" then
  10. print("timer <tid> <side>") -- Notice that "timer" is the program so if u call it "lol" it would be lol <tid> <side>
  11. return
  12. else
  13.  
  14. local delay = tonumber(args[1])
  15. local side = args[2]
  16. while true do
  17. term.clear()
  18. term.setCursorPos(1,1)
  19. print("Timer is set to: ".. args[1])
  20. print("Minecraft Time is: ".. os.time(false))
  21. shell.run("redpulse", side, "1")
  22. sleep(delay)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment