Advertisement
Jebula999

Turtle Listen

Jun 26th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. rednet.open("left")
  2. while true do
  3.     local function quarry()
  4.         senderID, message, protocol = rednet.receive("quarry")
  5.         shell.run(message)
  6.     end
  7.    
  8.     local function all()
  9.         senderID, message, protocol = rednet.receive("all")
  10.         shell.run(message)
  11.     end
  12.    
  13.     parallel.waitForAny(quarry, all)
  14. end
  15. rednet.close("left")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement