Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Monitor = peripheral.wrap("top")
- Monitor.setTextScale(3)
- function Zeit()
- Zeit_1 = 0 + 0
- Zeit_2 = 2 + 0
- Zeit_3 = 0 + 0
- while true do
- sleep(0.1)
- if Zeit_3 <= 90 then
- Zeit_3 = Zeit_3 + 10
- end
- if Zeit_3 == 100 then
- Zeit_2 = Zeit_2 + 1
- Zeit_3 = 0
- end
- if Zeit_2 == 60 then
- Zeit_1 = Zeit_1 + 1
- Zeit_2 = 0
- end
- -- Zeit Schreiben --
- Monitor.clear()
- Monitor.setCursorPos(1,1)
- --Minuten
- if Zeit_1 < 10 then
- Monitor.write(" 0"..Zeit_1..":")
- else
- Monitor.write(" "..Zeit_1..":")
- end
- --Sekunden
- Monitor.setCursorPos(5,1)
- if Zeit_2 < 10 then
- Monitor.write("0"..Zeit_2..":")
- else
- Monitor.write(Zeit_2..":")
- end
- --Millisekunden
- Monitor.setCursorPos(8,1)
- if Zeit_3 == 0 then
- Monitor.write("00")
- else
- Monitor.write(Zeit_3.." ")
- end
- --Sondertext
- Monitor.setCursorPos(1,2)
- Monitor.write("+--------+")
- -- Timer Maximum
- if Zeit_1 == 100 then
- Monitor.setCursorPos(1,1)
- Monitor.write("PANDA ^_^")
- break
- end
- -- Redstone Abfrage 2
- if redstone.getInput("bottom") then
- break
- elseif redstone.getInput("left") then
- break
- elseif redstone.getInput("right") then
- break
- elseif redstone.getInput("back") then
- break
- elseif redstone.getInput("front") then
- break
- end
- end
- end
- -- Redstone Abfrage --
- while true do
- if redstone.getInput("bottom") then
- sleep(2)
- Zeit()
- break
- elseif redstone.getInput("left") then
- sleep(2)
- Zeit()
- break
- elseif redstone.getInput("right") then
- sleep(2)
- Zeit()
- break
- elseif redstone.getInput("back") then
- sleep(2)
- Zeit()
- break
- elseif redstone.getInput("front") then
- sleep(2)
- Zeit()
- break
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement