Advertisement
Guest User

reactor_control

a guest
May 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. modem = peripheral.wrap("top")
  2. rednet.open("top")
  3.  
  4. while true do
  5. term.clear()
  6. term.setCursorPos(1,1)
  7.  
  8. local id, message = rednet.receive()
  9. print("Reactor Control computer")
  10. print("")
  11.  
  12.  
  13. print("Current TurbinePC command: "..message)
  14.  
  15. print("")
  16. print("RUN command-------------")
  17. if message == "RUN" then
  18. redstone.setOutput("front",true)
  19. print("RUN command executed!")
  20. print("")
  21. print("--starting reactor--")
  22. else
  23. print("No RUN command executed")
  24. end
  25.  
  26. print("")
  27. print("STOP command------------")
  28.  
  29. if message == "STOP" then
  30. redstone.setOutput("front",false)
  31. print("STOP command executed!")
  32. print("")
  33. print("--stopping reactor--")
  34. else
  35. print("No STOP command execuded")
  36. end
  37.  
  38. sleep(0.5)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement