Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("NetClient 1.0")
- print("Your ID: "..os.getComputerID())
- rednet.open("back")
- rednet.broadcast("getiprouter"..os.getComputerID())
- id, routerid = rednet.receive(10)
- if routerid == "" then
- print("You must be connected to a router to use NetClient")
- else
- print("Your router ID: "..routerid)
- end
- ip = os.getComputerID().."."..routerid
- print("Your IP address: "..ip)
- done = false
- while done == false do
- write("Broadcast: ")
- msg = read()
- rednet.broadcast(msg)
- end
Advertisement
Add Comment
Please, Sign In to add comment