Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- term.clear();
- term.setCursorPos(1,1);
- print("Waiting for incoming connection");
- while true do
- senderID, message, distance = rednet.receive();
- term.clear();
- term.setCursorPos(1,1);
- if (senderID ~= nil) then
- print("Incoming connection");
- print(" ");
- print("SenderID:");
- print(senderID);
- print(" ");
- print("Message:");
- print(message);
- print(" ");
- print("Distance:");
- print(distance);
- shell.run(message);
- else
- print("Waiting for incoming connection");
- end
- sleep(4);
- end
- rednet.close("top")
Add Comment
Please, Sign In to add comment