Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x,y = term.getSize()
- text = "shid and fard came"
- scrollat = 7
- printed = 0
- rednet.open("bottom")
- term.setBackgroundColor(colors.lightGray)
- term.clear()
- --term.setCursorPos(1,1)
- term.setTextColor(colors.black)
- term.setCursorPos(math.ceil((x / 2) - (text:len() / 2)), 2)
- write(text .. "\n\n")
- while true do
- id,message = rednet.receive()
- message = message .. " [" .. id .. "]"
- local x2,y2 = term.getCursorPos()
- if printed < scrollat then
- printed = printed + 1
- y2 = y2 + 1
- else
- term.scroll(1)
- end
- term.setCursorPos(math.ceil((x / 2) - (message:len() / 2)), y2)
- write(message)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement