Advertisement
Guest User

Comunication computer/pocket computer (computercraft)

a guest
May 25th, 2015
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. Do pastebin on the computer and call it STARTUP
  2.  
  3. Computer:
  4.  
  5. rednet.open("back")
  6. term.clear()
  7. term.setCursorPos(1,1)
  8. print("The server is running...")
  9. id,message = rednet.receive()
  10. monitor = peripheral.wrap("left")
  11. monitor.setCursorPos(1,1)
  12. monitor.write(message)
  13. os.sleep(2)
  14. monitor.clear()
  15. os.reboot()
  16.  
  17. Do pastebin on the pocket WIRELESS computer and call it STARTUP
  18.  
  19. Pocket  wireless computer:
  20.  
  21. rednet.open("back")
  22. while true do
  23.  term.clear()
  24.  term.setCursorPos(1,1)
  25.  term.write("Message: ")
  26.  message = read()
  27.  rednet.broadcast(message)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement