Advertisement
AwesomeSorcery

roomController

Jul 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. while true do
  2. print("Listening")
  3. rednet.open("top")
  4. event,id,message,distance = os.pullEvent("rednet_message")
  5. print(id)
  6. if id == 5 then
  7. if message == "open" then
  8. redstone.setOutput("left",false)
  9. end
  10. if message == "close" then
  11. redstone.setOutput("left",true)
  12. end
  13. if message == "on" then
  14. redstone.setOutput("right", true)
  15. end
  16. if message == "off" then
  17. redstone.setOutput("right",false)
  18. end
  19. end
  20. rednet.close("right")
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement