Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- CC Timer Made by Plazter --
- -- 2013 --
- -- Download timer with the name "timer" --
- -- Coded in Notepad ++ --
- local args = {...}
- function timer()
- for i = 1,2 do
- shell.run("redpulse back 1")
- end
- end
- if args[1] == nil or args[1] == "help" then
- print("timer <time> <side>") -- Notice that "timer" is the program so if u call it "lol" it would be lol <tid> <side>
- return
- else
- local delay = tonumber(args[1])
- while true do
- if not rs.getInput("top") then
- term.clear()
- term.setCursorPos(1,1)
- print("Im running timer at: ".. args[1] .." !")
- m.clear()
- m.setCursorPos(1,1)
- m.setTextColor(colors.lime)
- m.write("ON")
- m.setCursorPos(1,2)
- m.write("Timer: ")
- m.setCursorPos(1,3)
- m.write(args[1])
- --while true do
- timer()
- --end
- sleep(delay)
- end
- if rs.getInput("top") then
- m.clear()
- m.setTextScale(1)
- m.setCursorPos(1,1)
- m.setTextColor(colors.red)
- m.write("OFF")
- m.setCursorPos(1,2)
- m.write("pause")
- term.clear()
- term.setCursorPos(1,1)
- print(" I HAVE PAUSED THE PROGRAM SIR!!")
- shell.run("ls")
- sleep(3)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment