Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- rednet.open("top")
- z = 0
- MyID = os.getComputerID()
- function POS()
- x,y = term.getCursorPos()
- end
- function Clear()
- term.setCursorPos(1,1)
- print("Messager")
- end
- function Recieve()
- POS()
- local y = y - 1
- term.setCursorPos(x,y)
- id,msg = rednet.receive()
- print(id..": "..msg)
- end
- function Send()
- POS()
- local y = y + 1
- term.setCursorPos(x,y)
- input = read()
- term.setCursorPos(x,y)
- term.clearLine()
- rednet.broadcast(""..input)
- term.setCursorPos(x,y)
- print(MyID..": "..input)
- end
- Clear()
- repeat
- parallel.waitForAny(Recieve, Send)
- until
- z == nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement