Advertisement
loccode

ComputerCraft Wifi iPad

Jan 27th, 2021 (edited)
964
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. print("Wi-fi modem side? (back/top/left/right/bottom)")
  2. modemSide = read()
  3.  
  4. rednet.open(modemSide)
  5.  
  6. if (rednet.isOpen(modemSide)) then
  7. print("[OK] Wi-fi activated")
  8.  
  9. rednet.broadcast("Who is online?", "loaders")
  10.  
  11. senderId, message, protocol = rednet.receive()
  12. print(tostring(senderId), " is online.")
  13.  
  14. rednet.broadcast("Who is online?", "unloaders")
  15.  
  16. senderId, message, protocol = rednet.receive("unLoadersOnlineResult")
  17. print(tostring(senderID), " is online.")
  18.  
  19. else
  20. print("Wi-fi activation error. Maybe wrong side?")
  21. return false
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement