FFGFlash

.network

Sep 14th, 2021 (edited)
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. print("Connecting to rednet...")
  2. local modem = peripheral.find("modem")
  3. local channel = os.getComputerID()
  4. if not modem or not modem.isWireless() then
  5.   print("Please attach a wireless modem.")
  6.   sleep(5)
  7.   os.shutdown()
  8. end
  9. if not modem.isOpen(channel) then modem.open(channel) end
  10. if not modem.isOpen(65535) then modem.open(65535) end
  11. print("Connected to rednet!")
  12. sleep(1)
Add Comment
Please, Sign In to add comment