Advertisement
OpposingGeek

Untitled

Apr 18th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. print("Welcome to Joe's House!")
  2. print("What's the secret password?")
  3. --Sub Computer
  4. rednet.open("back")
  5. rednet.broadcast("door")
  6. while true do
  7. id, msg = rednet.receive()
  8. if msg == "controller" then
  9. controller = id
  10. break
  11. end
  12. end
  13. while true do
  14. input = read("*")
  15. rednet.send(id, input)
  16. while true do
  17. id, msg = rednet.receive()
  18. if id == controller then
  19. if msg == "open" then
  20. redstone.setOutput("right", true)
  21. sleep(5)
  22. redstone.setOutput("right", false)
  23. end
  24. break
  25. end
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement