Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Clock , Alarm, Count, TCount, infos, clread, ifcl
- -- Variablen : h,m,s,h1,m1,s1,vnr,ch,choose,a1,infos1,rs,mo,ha,ma,sa,md
- -- When you copy something for your app, please mention me
- -- ClockWorks by timia2109 :D
- -- 205 lines of Code to read it use Notepad++ :D
- vnr = 0.1
- name = "ClockWorks"
- function start()
- cl()
- print("timia2109s ClockWorks")
- write("V")print(vnr)
- print("When you find a bug please report")
- print("Sorry for my bad english :(")
- print("")
- print("")
- print("====================")
- print("Choose the Tool")
- print("1 = Clock")
- print("2 = Alarm clock(DOSN´T WORK)")
- print("3 = Countdown")
- print("4 = Time counter")
- print("9 = Changelog + more")
- print("====================")
- choose = read()
- ch = choose+0
- if ch == 1 then
- clock()
- end
- if ch == 2 then
- Alarm()
- end
- if ch == 3 then
- Count()
- end
- if ch == 4 then
- TCount()
- end
- if ch == 9 then
- infos()
- end
- end
- function TCount()
- h = 0
- m = 0
- s = 0
- while true do
- cl()
- print("I count since")
- write(h)write(":")write(m)
- write(":")write(s)
- s = s+1
- if s > 59 then
- s = 0
- m = m+1
- end
- if m > 59 then
- m = 0
- h = h+1
- end
- sleep(1)
- end
- end
- function Count()
- print("How much Hours?")
- h1 = read()
- print("How much Minutes?")
- m1 = read()
- print("How much Secounds")
- s1 = read()
- print("On what side is the Redstone? Or 0 if none")
- rs = read()
- h = h1+0
- m = m1+0
- s = s1+0
- a1 = h+m+s
- shell.run("clear")
- while true do
- cl()
- print("Counting down")
- write("When 0 then redstone ")print(rs)
- write(h)write(":")write(m)
- write(":")write(s)
- s = s-1
- a1 = a1-1
- if s == 0 then
- if m > 0 then
- s = 59
- m = m-1
- end
- end
- if m == 0 then
- if h > 0 then
- m = 59
- h = h-1
- end
- end
- sleep(1)
- if h == 0 then
- if m == 0 then
- if s == 0 then
- cl()
- if not rs == 0 then
- rs.setOutput(rs,true)
- end
- print("End")
- write(h1)write(":")write(m1)
- write(":")write(s1)
- end
- end
- end
- end
- end
- function infos()
- cl()
- print("ClockTools")
- print("by timia2109")
- write("Version")print(vnr)
- print("New in 0.1")
- print("First version")
- term.setCursorPos(1,17)
- print("USED TO MADE NOTEPAD++")
- print("WRITE 0 to go back")
- end
- function cl()
- term.clear()
- term.setCursorPos(1,1)
- end
- function clock()
- cl()
- md = 0
- clread()
- while true do
- s = s+1
- ifcl()
- cl()
- print("Clock by timia2109")
- write(h)write(":")write(m)write(":")write(s)
- sleep(1)
- end
- end
- function clread()
- print("You must give me the current time!")
- print("what hour are?")
- h1 = read()
- print("what minute are?")
- m1 = read()
- print("what second are?")
- s1 = read()
- if md == 1 then
- print("what hour the alert are?")
- ha = read()
- print("what minute the alert are?")
- ma = read()
- print("what secound the alert are?")
- sa = read()
- end
- h = h1+0
- m = m1+0
- s = s1+0
- end
- function ifcl()
- if s == 60 then
- s = 0
- m = m+1
- end
- if m == 60 then
- m = 0
- h = h+1
- end
- if h == 24 then
- h = 0
- end
- if md == 1 then
- if h == ha then
- if m == ma then
- if s == sa then
- write("IT IS NOW")write(h)write(":")write(m)write(":")write(s)
- end
- end
- end
- end
- end
- function Alarm()
- md = 1
- clread()
- while true do
- s = s+1
- ifcl()
- cl()
- print("Clock by timia2109")
- write(h)write(":")write(m)write(":")write(s)
- sleep(1)
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment