Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.wrap( "left" )
- monitor.write = function(txtout)
- peripheral.call("left","write",txtout)
- column2,row2 = monitor.getCursorPos()
- row2 = row2 + 1
- monitor.setCursorPos(1,row2)
- end
- rednet.open("right")
- rednet.announce()
- monitor.write("["..os.computerID().." (You)] connected.")
- while true do
- local event, p1, p2, p3, p4, p5 = os.pullEventRaw()
- if event == "rednet_message" then
- if p1 then
- if p2 ~= "" then
- monitor.write("<"..p1.."> "..p2)
- else
- monitor.write("["..p1.."] connected.")
- end
- end
- local send = read()
- if send ~= "/quit" then
- rednet.broadcast(send)
- monitor.write("<"..os.computerID().."> "..send)
- else
- exit()
- end
- end
- end
Add Comment
Please, Sign In to add comment