Tommo5261

Nuclear Camera System

Dec 14th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.96 KB | None | 0 0
  1. monitor = peripheral.wrap("right")
  2. while true do
  3.     term.clear()
  4.     term.setCursorPos(1, 1)
  5.     print("Type LIST for camera locations or type CAM to choose which camera to view.")
  6.     option = read()
  7.     if option == "LIST" then -- asks to explain where each camera lies and what you will see when you select it
  8.         term.clear()
  9.         term.setCursorPos(1, 1)
  10.         print("ROOM lists the various cameras for non reactor rooms.")
  11.         print("REACTOR lists the various cameras for the nuclear reactors.")
  12.         print("Will you list ROOM cameras or REACTOR cameras, or do you want to go BACK to the main menu?")
  13.         option2 = read()
  14.         if option2 == "ROOM" then
  15.             print("01 is - Front Entrance")
  16.             print("02 is - Entrance Hallway")
  17.             print("03 is - South-East Hallway")
  18.             print("04 is - Control Room 1")
  19.             print("05 is - Development Room 1")
  20.             print("06 is - Control Room 2")
  21.             print("07 is - Upper Hallway")
  22.         elseif option2 == "REACTOR" then
  23.             print("01 is - Fluid Reactors 1 & 2")
  24.             print("02 is - Fluid Reactors 3 & 4")
  25.             print("03 is - EU Reactors 1 & 2")
  26.             print("04 is - EU Reactors 3 & 4")
  27.             print("05 is - EU Reactor 5")
  28.             print("06 is - EU Reactor 6")
  29.         elseif option2 == "BACK" then
  30.             term.clear()
  31.             term.setCursorPos(1, 1)
  32.         end
  33.     end
  34. end
  35.         else
  36.             print("Unknown command, please input either ROOM, REACTOR or BACK.")
  37.             sleep(6)
  38.             term.clear()
  39.             term.setCursorPos(1, 1)
  40.         end
  41.     end
  42.     elseif option == "CAM" then
  43.         term.clear()
  44.         term.setCursorPos(1, 1)
  45.         print("Will you select ROOM cameras, REACTOR cameras or will you go BACK to the main menu?")
  46.         option3 = read()
  47.         if option3 == "ROOM" then
  48.             print("Please input a camera number to view that specific camera type BACK to choose a different category")
  49.             option4 = read()
  50.             if option4 == "01" then
  51.                 print("You are viewing - Front Entrance")
  52.                 monitor.videoChannel(8001)
  53.             elseif option4 == "02" then
  54.                 print("You are viewing - Entrance Hallway")
  55.                 monitor.videoChannel(8002)
  56.             elseif option4 == "03" then
  57.                 print("You are viewing - South-East Hallway")
  58.                 monitor.videoChannel(8003)
  59.             elseif option4 == "04" then
  60.                 print("You are viewing - Control Room 1")
  61.                 monitor.videoChannel(8004)
  62.             elseif option4 == "05" then
  63.                 print("You are viewing - Development Room 1")
  64.                 monitor.videoChannel(8005)
  65.             elseif option4 == "06" then
  66.                 print("You are viewing - Control Room 2")
  67.                 monitor.videoChannel(8006)
  68.             elseif option4 == "07" then
  69.                 print("You are viewing - Upper Hallway")
  70.                 monitor.videoChannel(8007)
  71.             elseif option4 == "BACK" then
  72.                 term.clear()
  73.                 term.setCursorPos(1, 1)
  74.             end
  75.         end
  76.     end
  77. end
  78.             else
  79.                 print("Unknown camera number, use numbers 01-07 or type BACK")
  80.                 sleep(6)
  81.                 term.clear()
  82.                 term.setCursorPos(1, 1)
  83.             end
  84.         end
  85.         elseif option3 == "REACTOR" then
  86.             print("Please input a camera number to view that specific camera type BACK to choose a different category")
  87.             option5 = read()
  88.             if option5 == "01" then
  89.                 print("You are viewing - Fluid Reactors 1 & 2")
  90.                 monitor.videoChannel(8021)
  91.             elseif option5 == "02" then
  92.                 print("You are viewing - Fluid Reactors 3 & 4")
  93.                 monitor.videoChannel(8022)
  94.             elseif option5 == "03" then
  95.                 print("You are viewing - EU Reactors 1 & 2")
  96.                 monitor.videoChannel(8023)
  97.             elseif option5 == "04" then
  98.                 print("You are viewing - EU Reactors 3 & 4")
  99.                 monitor.videoChannel(8024)
  100.             elseif option5 == "05" then
  101.                 print("You are viewing - EU Reactor 5")
  102.                 monitor.videoChannel(8025)
  103.             elseif option5 == "06" then
  104.                 print("You are viewing - EU Reactor 6")
  105.                 monitor.videoChannel(8026)
  106.             elseif option5 == "BACK" then
  107.                 term.clear()
  108.                 term.setCursorPos(1, 1)
  109.             end
  110.         end
  111.     end
  112.             else
  113.                 print("Unknown camera number, use numbers 01-06 or type BACK.")
  114.                 sleep(6)
  115.                 term.clear()
  116.                 term.setCursorPos(1, 1)
  117.             end
  118.         end
  119.     else
  120.         print("Unknown command, please input either LIST or CAM.") -- PERSONAL NOTE, ADD TERM.CLEAR AFTER EVERY MONITOR CHANGE
  121.         sleep(6)
  122.     end
  123. end
Add Comment
Please, Sign In to add comment