Advertisement
Guest User

rcSlave

a guest
Nov 26th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function RCslave()
  2.   while true do
  3.    local event, side, sendChan, replyChan, message, distance = os.pullEvent(modem_message)
  4.      if message == "job" then
  5.         shell.run("cottonFarmer")    
  6.      end
  7.      if message == "refuel" then
  8.         shell.run("refuelTurtle")
  9.      end
  10.   end
  11. end
  12.  
  13. -- start up the program and run it until we die
  14. modem = peripheral.wrap("right")
  15. modem.open(1)
  16. textutils.slowPrint("TurtleReceive Initiated.")
  17. RCslave()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement