Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- nextid = 9001
- term.redirect(peripheral.wrap("back"))
- peripheral.call("back", "setTextScale", 5)
- term.clear()
- x, y = term.getSize()
- chars = {}
- for i=1, x do table.insert(chars, " ") end
- while true do
- event, param1, param2, param3 = os.pullEvent()
- --print(tostring(event).." "..tostring(param2))
- if event == "key" and param1 ~= 1 then
- term.restore()
- break end
- if event == "rednet_message" and param2 ~= nil then
- table.insert(chars, param2)
- if chars[x] ~= nil then
- rednet.send(nextid, chars[1])
- table.remove(chars, 1) end
- for i = #chars, 1, -1 do
- term.setCursorPos(i, 1)
- write(chars[i])
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement