Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- h = 2
- m = 49
- s = 60
- function check()
- if s <= 0 then
- m = m -1
- s = 60
- end
- if m < 0 then
- h = h-1
- m = 60
- end
- if h < 0 then
- print("Standing By...")
- redstone.setOutput("back", true)
- sleep(1)
- redstone.setOutput("back", false)
- sleep(300)
- h = 02
- m = 49
- s = 60
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print(h..":"..m..":"..s)
- sleep(1)
- s = s-1
- check()
- end
- Just run that on the monitor B)/>
- Edit: Oh and.. If someone could point out what I could do better.. That would be great :)/> I'm trying to get better.
- #5 dcleondc
- New Members
- 70 posts
- Posted 02 September 2012 - 10:26 AM
- View PostZoinky, on 02 September 2012 - 10:21 AM, said:
- I tried making one too! :)/> But, I'm not very good with lua so this is probably really bad B)/> Sorry if I did it wrong..
- h = 2
- m = 49
- s = 60
- function check()
- if s <= 0 then
- m = m -1
- s = 60
- end
- if m < 0 then
- h = h-1
- m = 60
- end
- if h < 0 then
- redstone.setOutput("back", true)
- sleep(1)
- redstone.setOutput("back", false)
- sleep(300)
- h = 02
- m = 49
- s = 60
- end
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- print(h..":"..m..":"..s)
- sleep(1)
- s = s-1
- check()
- end
- Just run that on the monitor B)/>
- Edit: Oh and.. If someone could point out what I could do better.. That would be great :)/> I'm trying to get better.
- you may want to switch
- if h < 0 then
- redstone.setOutput("back", true)
- sleep(1)
- redstone.setOutput("back", false)
- sleep(300)
- h = 02
- m = 49
- s = 60
- end
- to
- if h == 0 and m ==0 and s == 0 then
- redstone.setOutput("back", true)
- sleep(1)
- redstone.setOutput("back", false)
- sleep(300)
- h = 02
- m = 49
- s = 60
- end
Advertisement
Add Comment
Please, Sign In to add comment