Advertisement
Guest User

Untitled

a guest
May 25th, 2015
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. rednet.open("left") --enable the modem attached to the left side of the PC
  2. rednet.broadcast("WHOA! Double Rainbow!") --send "Hello world" over rednet to all PCs in range
  3. print("WHOA! Double Rainbow!")
  4.  
  5. while true do
  6. event, id, message = os.pullEvent()
  7. if event == "rednet_message" then
  8. print( "Message from ID#"..id..": " )
  9. print( message )
  10. if message == "Taking a break." then
  11. print("Stopping harvest.")
  12. break
  13. end
  14. end
  15. print("Debug Loop")
  16. end
  17.  
  18. print("disconnecting")
  19. rednet.close("left") --disable modem on the left side of the PC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement