Guest User

startup

a guest
Jun 7th, 2021
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. -- Wireless MODEM
  2. rednet.open("top")
  3. local modem = peripheral.wrap("right")
  4.  
  5. while true do
  6.  
  7. ids, msg, ptrc = rednet.receive()
  8.  
  9. print("Ricevuto "..msg)
  10. print("Inoltro richiesta a "..msg..":80")
  11.  
  12. modem.sendChannel(80, msg)
  13.  
  14. modem.setListening(80, true)
  15. local event, side, id, chn, mess = os.pullEvent("lan_message")
  16.  
  17. print("Ricevuto risposta da: 144.91.97."..id)
  18.  
  19. sleep(2)
  20.  
  21. rednet.send(ids, mess)
  22.  
  23.  
  24. sleep(0.5)
  25. end
  26.  
  27.  
  28.  
Advertisement
Add Comment
Please, Sign In to add comment