Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local buffer = {}
- local w,h = term.getSize()
- function initBuffer()
- for x=1,w do
- buffer[x] = {}
- for y = 1,h do
- buffer[x][y] = {}
- end
- end
- end
- function displayBuffer()
- for x = 1, #buffer do
- for y = 1, #buffer[x] do
- term.setCursorPos(x,y)
- if #buffer[x][y] == 3 then
- term.setTextColor(buffer[x][y][2])
- term.setBackgroundColor(buffer[x][y][3])
- term.write(buffer[x][y][1])
- end
- end
- end
- end
- initBuffer()
- shell.run("clr")
- while true do
- s = {rednet.receive("stream")}
- buffer = textutils.unserialize(s[2])
- displayBuffer()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement