Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- local monitor = peripheral.wrap("top")
- monitor.setTextScale(1)
- local maxW, maxH = term.getSize()
- local nyear = 0
- term.clear()
- term.setCursorPos(1,1)
- local nTime = os.time()
- local time_nospace_zero = string.gsub(textutils.formatTime(os.time(), false), " ", " ")
- local time_nospace_10error = string.gsub(time_nospace_zero, "0:", "12:")
- nTime = string.gsub(time_nospace_10error, "112:", "10:")
- local nDay = os.day()
- local ognday = nDay
- while nDay > 365 do
- nDay = nDay - 365
- nyear = nyear + 1
- end
- term.setCursorPos(1, maxH)
- if ognday < 10000 then
- print("(" .. "Total Days: "..ognday.. ")")
- elseif ognday > 9999 then
- print("(" .. "TotalDays: "..ognday.. ")")
- elseif ognday > 99999 then
- print("(" .. "TotalDays:"..ognday.. ")")
- elseif ognday > 999999 then
- print("(" .. "TtlDs:"..ognday.. ")")
- end
- term.scroll(-1)
- term.setCursorPos(1,1)
- print(nTime)
- term.setCursorPos(1,2)
- print("Day " .. nDay)
- term.setCursorPos(1,3)
- print("Year " .. nyear)
- sleep(0.833333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333328)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement