Advertisement
RLPGhost

LUA Selector Receive

Mar 15th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. local sMes = "stop"
  2.  
  3. redstone.setOutput("bottom", false)
  4. local modem = peripheral.wrap("top")
  5. modem.open(1)
  6.  
  7. while true do
  8. local event, modemSide, senderChannel,
  9.   replyChannel, message, senderDistance = os.pullEvent("modem_message")
  10.  
  11. print("The message was: "..message)
  12. if(message == sMes) then
  13. redstone.setOutput("bottom", true)
  14. sleep(2)
  15. redstone.setOutput("bottom", false)
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement