Plazter

Monitor timer WITH HELP

May 24th, 2013
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. -- CC Timer Made by Plazter --
  2. -- 2013 --
  3. -- Download timer with the name "timer" --
  4. -- Coded in Notepad ++ --
  5.  
  6. local args = {...}
  7.  
  8. function timer()
  9. for i = 1,2 do
  10. shell.run("redpulse back 1")
  11. end
  12. end
  13.  
  14. if args[1] == nil or args[1] == "help" then
  15. print("timer <time> <side>") -- Notice that "timer" is the program so if u call it "lol" it would be lol <tid> <side>
  16. return
  17. else
  18.  
  19.  
  20.  
  21. local delay = tonumber(args[1])
  22.  
  23. while true do
  24. if not rs.getInput("top") then
  25. term.clear()
  26. term.setCursorPos(1,1)
  27. print("Im running timer at: ".. args[1] .." !")
  28. m.clear()
  29. m.setCursorPos(1,1)
  30. m.setTextColor(colors.lime)
  31. m.write("ON")
  32. m.setCursorPos(1,2)
  33. m.write("Timer: ")
  34. m.setCursorPos(1,3)
  35. m.write(args[1])
  36. --while true do
  37. timer()
  38. --end
  39. sleep(delay)
  40. end
  41. if rs.getInput("top") then
  42. m.clear()
  43. m.setTextScale(1)
  44. m.setCursorPos(1,1)
  45. m.setTextColor(colors.red)
  46. m.write("OFF")
  47. m.setCursorPos(1,2)
  48. m.write("pause")
  49. term.clear()
  50. term.setCursorPos(1,1)
  51. print(" I HAVE PAUSED THE PROGRAM SIR!!")
  52. shell.run("ls")
  53. sleep(3)
  54. end
  55. end
  56. end
Advertisement
Add Comment
Please, Sign In to add comment