SHOW:
|
|
- or go back to the newest paste.
1 | mon = peripheral.find("monitor") | |
2 | term.redirect(mon) | |
3 | local monitor = peripheral.wrap("top") | |
4 | monitor.setTextScale(2) | |
5 | ||
6 | dayName = "null" | |
7 | day = os.day() | |
8 | presentDay = day | |
9 | dayNumber = 1 | |
10 | nTime = os.time() | |
11 | nDay = os.day() | |
12 | ||
13 | while true do | |
14 | ||
15 | - | if day ~= presentDay then |
15 | + | |
16 | - | dayNumber = dayNumber + 1 |
16 | + | |
17 | - | presentDay = day |
17 | + | |
18 | - | end |
18 | + | |
19 | nDay = os.day() | |
20 | - | if dayNumber == 1 then |
20 | + | print("Le serveur a tourné "..nDay.." jours sans incident.") |
21 | - | dayName = "de la Terre" |
21 | + | print( "Il est "..textutils.formatTime( nTime, false )..".") |
22 | - | elseif dayNumber == 2 then |
22 | + | |
23 | - | dayName = "du Charbon" |
23 | + | |
24 | - | elseif dayNumber == 3 then |
24 | + |