SHARE
TWEET

engines

a guest Aug 21st, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. shell.run("clear")
  2. local rside = "front"
  3. rednet.open("top")
  4. while true do
  5.   print("Unit ",os.getComputerID()," - Waiting for input...")
  6.   sId, message, prot = rednet.receive("engines")
  7.  
  8.   if message == "on" then
  9.     rs.setOutput(rside, true)
  10.   elseif message == "off" then
  11.     rs.setOutput(rside, false)
  12.   end
  13.  
  14.   local replymsg = "Engines Running: "..tostring(rs.getOutput(rside))
  15.   rednet.send(sId, replymsg, prot)
  16.   print(replymsg)
  17. end
  18. rednet.close("top")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top