Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.find("monitor")
- term.redirect(mon)
- dayName = "null"
- day = os.day()
- presentDay = day
- dayNumber = 1
- nTime = os.time()
- nDay = os.day()
- while true do
- day = os.day()
- if day ~= presentDay then
- dayNumber = dayNumber + 1
- presentDay = day
- end
- if dayNumber == 1 then
- dayName = "de la Terre"
- elseif dayNumber == 2 then
- dayName = "du Charbon"
- elseif dayNumber == 3 then
- dayName = "du Fer"
- elseif dayNumber == 4 then
- dayName = "de l'Or"
- elseif dayNumber == 5 then
- dayName = "de la Redstone"
- elseif dayNumber == 6 then
- dayName = "de l'Emeraude"
- elseif dayNumber == 7 then
- dayName = "du Diamant"
- else
- dayNumber = 1
- print("dayNumber was incorrect and reset to 1")
- os.sleep(1)
- end
- term.clear()
- term.setCursorPos(1,1)
- nTime = os.time()
- nDay = os.day()
- print("Nous sommes le jour "..dayName..", date "..nDay..".")
- print( "Il est "..textutils.formatTime( nTime, true )..".")
- os.sleep(0.75)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement