Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- function broadcastOverRN()
- local bcinput=""
- print("Type the message you want to broadcast it")
- print("over Rednet!")
- bcinput = read()
- rednet.broadcast(bcinput)
- end
- function sendMessageOverRN()
- --local smorninput1=""
- print("First, type the ID you want to send the meassage to!")
- print("ID:")
- smorninput1 = tonumber(read())
- for i=0,1000 do
- if sworninput1 == i then
- local id = i
- end
- end
- print("Then type the message you want to send!")
- print("Message:")
- sworninput2 = read()
- local msg = sworninput2
- os.sleep(0.1)
- rednet.send(id,msg)
- end
- while true do
- local input=""
- print("Rednet Communication Serive (RCS) active")
- print("To broadcast, type 'bc'")
- print("To send a message to a specific ID, type 'msg'")
- input = read()
- if input == "bc" then
- broadcastOverRN()
- else
- if input == "msg" then
- sendMessageOverRN()
- else
- print("You seem to be very dumb")
- print("Can't handle such stupidness!")
- os.sleep(1)
- print("Rebooting now :P")
- os.sleep(1)
- end
- end
- os.sleep(0.2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement