Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check()
- perData = peripheral.getNames()
- for i = 1, #perData do
- if peripheral.getType(perData[i]) == "modem" then
- m = peripheral.wrap(perData[i])
- if m.isWireless() then
- wifiSide = perData[i]
- else
- end
- print("Modem installed on "..perData[i])
- elseif peripheral.getType(perData[i]) == "printer" then
- p = peripheral.wrap(perData[i])
- print("Printer installed on "..perData[i])
- elseif peripheral.getType(perData[i]) == "monitor" then
- mon = peripheral.wrap(perData[i])
- end
- end
- end
- function netCheck()
- netData = m.getNamesRemote()
- for i = 1, #netData do
- if m.getType(netData[i]) == "monitor" then
- netMon = peripheral.wrap(netData[i])
- netMon.write("Hello world!")
- end
- end
- end
- check()
- netCheck()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement