Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- while true do
- message=0
- os.queueEvent("randomEvent")
- os.pullEvent()
- print("do you want to resive or send message?")
- print("1 for send amd 2 for resive")
- a=read()
- a=tonumber(a)
- if a==1 then
- print("type in your message")
- msg=read()
- rednet.broadcast(msg)
- end
- if a==2 then
- print("waiting for the message")
- while message == 0 do
- id,message=rednet.receive()
- print("here is your message")
- print(message)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement