Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CompID = os.getComputerID
- rednet.open(tostring(CompID))
- local NearbyPingDB = 0
- local function PingForNearDevices()
- NearbyPingDB = NearbyPingDB + 1
- if NearbyPingDB > 5 then
- rednet.broadcast(CompID)
- end
- end
- local function Reping()
- local ID, Message = rednet.receive(nil,.05)
- if Message then
- print(ID .. " : ".. Message)
- end
- end
- while true do
- --print("Looping")
- sleep(.05)
- PingForNearDevices()
- Reping()
- end
Advertisement
Add Comment
Please, Sign In to add comment