Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function connect()
- rednet.open("left")
- return true
- end
- if connect() == true then
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.gray)
- term.setCursorPos(1, 1)
- term.clear()
- id = os.computerID()
- print("Your id: "..id.." Input text message.")
- idR1, messageR1 = rednet.receive(5)
- if idR1 ~= nil then
- print(idR1..": "..messageR1)
- end
- while true do
- write(id..": ")
- message = read()
- rednet.broadcast(message)
- idR, messageR = rednet.receive()
- print(idR..": "..messageR)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement