Advertisement
Guest User

door

a guest
Jan 24th, 2015
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. rednet.open("back")
  2.  
  3. function receive()
  4.  
  5. id, msg, dis = rednet.receive()
  6.  
  7. if msg == "open" then
  8.  
  9. d, p, di = rednet.receive()
  10.  
  11. if p == "microcorp" then
  12.  
  13. redstone.setOutput("left",true)
  14. sleep(2)
  15. redstone.setOutput("left", false)
  16. os.reboot()
  17.  
  18. end
  19.  
  20. else
  21. os.reboot()
  22.  
  23. end
  24.  
  25. end
  26.  
  27. while true do
  28.  
  29. receive()
  30. sleep(.1)
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement