Godleydemon

Untitled

Jun 8th, 2013 (edited)
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function startMonitor()
  2.   monitor.setTextScale(1)
  3.   wm, hm = monitor.getSize()
  4. end
  5.  
  6. function newLine()
  7.   local _,cY= monitor.getCursorPos()
  8.   monitor.setCursorPos(1,cY+1)
  9. end
  10.  
  11. monitor = peripheral.wrap("left")
  12. local w,h = term.getSize()
  13. local monP = peripheral.isPresent("left")
  14. local monT = peripheral.getType("left")
  15. local cX,cY = monitor.getCursorPos()
  16. term.redirect(monitor)
  17.  
  18. while true do
  19.  
  20. -- Open the modem.
  21. rednet.open("back")
  22.  
  23. -- Wait for a message
  24. id, message = rednet.receive()
  25.  
  26. print(message)
  27.  
  28. newLine()
  29.  
  30. end
Advertisement
Add Comment
Please, Sign In to add comment