Cedricator

Reaktor Shell Contorl

Jun 11th, 2020
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. --Control
  2.  
  3. tabID = multishell.getCurrent()
  4. multishell.setTitle(tabID,"Control")
  5.  
  6. local reactor
  7. reactor = peripheral.wrap("top")
  8.  
  9. while true do
  10. id, message = rednet.receive()
  11. if id == 411 then
  12. if message == "ON" then
  13. reactor.setActive(true)
  14. shell.openTab("Auto")
  15. rs.setBundledOutput("bottom", colors.combine(rs.getBundledOutput("bottom"), colors.lime))
  16. rs.setBundledOutput("bottom" ,colors.subtract(rs.getBundledOutput("bottom"), colors.red))
  17. end
  18.  
  19. if message == "OFF" then
  20. reactor.setActive(false)
  21. shell.exit()
  22. rs.setBundledOutput("bottom", colors.combine(rs.getBundledOutput("bottom"), colors.red))
  23. rs.setBundledOutput("bottom" ,colors.subtract(rs.getBundledOutput("bottom"), colors.lime))
  24. end
  25. end
  26. end
Add Comment
Please, Sign In to add comment