Advertisement
Shaka01

gate checker

Feb 11th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. while true do
  4.  
  5. senderID, message, protocol = rednet.receive()
  6.  
  7. if senderID == 20 or senderID == 9 then
  8.     if turtle.detect() then
  9.         rednet.send(20, "open")
  10.     else
  11.         rednet.send(20, "closed")
  12.     end
  13. end
  14.  
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement