xilyflob

Primary Startup

Oct 7th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. modem = peripheral.wrap("bottom")
  2. wireless = peripheral.wrap("back")
  3. monitor = peripheral.wrap("top")
  4. reactorID = 52
  5.  
  6. term.redirect(monitor)
  7. print("Starting up...")
  8. rednet.open("back")
  9. rednet.host("ReactorWireless", "PrimaryComputer")
  10. print("Checking wireless...")
  11. sleep(1)
  12. if rednet.lookup("ReactorWireless", "ReactorComputer") == reactorID
  13.     then print("OK")
  14.     else print("Connection to reactor computer not found, ensure that it has booted, and then restart this system. This computer will shutdown in 5 seconds...")
  15.         sleep(5)
  16.         os.shutdown()
  17. end
  18. shell.openTab("OnOff")
  19. print("All done.")
  20. sleep(3)
  21. term.clear()
Add Comment
Please, Sign In to add comment