Advertisement
Sedrowow

Autosmelter Server up

Sep 3rd, 2022 (edited)
1,015
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon = peripheral.wrap("right")
  2.  
  3. if peripheral.getType("up") == 'modem' then --#Did we find a modem... Or some other peripheral?
  4.     mon.clear()
  5.   --print("Found Modem On Side up!")
  6.   rednet.open("up")
  7.   wireless = peripheral.wrap("up")
  8. end
  9.  
  10. function waitForMessage(displayMessage)
  11.     local sender, message, protocol = rednet.receive()
  12.     if displayMessage then
  13.         mon.clear()
  14.     local w, h = term.getSize()
  15.         mon.setCursorPos(1,1)
  16.         mon.write(message)
  17.     else
  18.         return message
  19.     end
  20. end
  21.  
  22. while true do
  23.     waitForMessage(true)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement