Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- round "up" to absolute value, so we treat negative differently
- -- that is, round (-1.5) will return -2
- function round (x)
- if x >= 0 then
- return math.floor (x + 0.5)
- end -- if positive
- return math.ceil (x - 0.5)
- end -- function round
- local monitor = peripheral.wrap("back")
- local line = {"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"}
- while true do
- line[1] = "Welcome to the Dark Forest Reaserch Facility"
- line[2] = ""
- line[3] = "The current time is "..round(os.time())
- line[4] = ""
- line[5] = ""
- line[6] = "All unautherised personel to report to Facility Admistrators"
- line[7] = ""
- line[8] = ""
- line[9] = ""
- line[10] = ""
- line[10] = ""
- line[12] = ""
- for i = 1,12 do
- monitor.setCursorPos(1,i)
- monitor.clearLine()
- monitor.write(line[i])
- end
- sleep(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment