Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- local rside = "front"
- rednet.open("top")
- while true do
- print("Unit ",os.getComputerID()," - Waiting for input...")
- sId, message, prot = rednet.receive("engines")
- if message == "on" then
- rs.setOutput(rside, true)
- elseif message == "off" then
- rs.setOutput(rside, false)
- end
- local replymsg = "Engines Running: "..tostring(rs.getOutput(rside))
- rednet.send(sId, replymsg, prot)
- print(replymsg)
- end
- rednet.close("top")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement