Advertisement
Guest User

startup

a guest
Mar 18th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.30 KB | None | 0 0
  1. mon = peripheral.wrap("back")
  2. mon.clear()
  3. mon.setTextScale(1)
  4. table = {}
  5.  
  6. function monPrint (table)
  7.  mon.setTextScale(1)
  8.  mon.clear()
  9.   for i=1,4 do
  10.    mon.setCursorPos(1,i)  
  11.   if table[i] == "true" then
  12.    mon.write("Reaktor ".. i.. " ON")
  13.   else
  14.    mon.write("Reaktor ".. i.. " OFF")
  15.   end
  16.  end
  17. end
  18.  
  19. while true do
  20.  if rs.testBundledInput("left", colors.red) then
  21.   table[1] = "false"
  22.  elseif rs.testBundledInput("left", colors.red) == false then
  23.   table[1] = "true"
  24.  end
  25.   if rs.testBundledInput("left", colors.green) then
  26.   table[2] = "false"
  27.  elseif rs.testBundledInput("left", colors.greem) == false then
  28.   table[2] = "true"
  29.  end
  30.   if rs.testBundledInput("left", colors.yellow) then
  31.   table[3] = "false"
  32.  elseif rs.testBundledInput("left", colors.yellow) == false then
  33.   table[3] = "true"
  34.  end
  35.   if rs.testBundledInput("left", colors.blue) then
  36.   table[4] = "false"
  37.  elseif rs.testBundledInput("left", colors.blue) == false then
  38.   table[4] = "true"
  39.  end
  40.  if rs.testBundledInput("left", colors.black) then
  41.   mon.clear()
  42.   mon.setCursorPos(1,1)
  43.   mon.setTextScale(2)
  44.   mon.write("  PRZEGRZANIE!!!")
  45.  end
  46.  if rs.testBundledInput("left", colors.lightGreen) then
  47.   mon.clear()
  48.   mon.setCursorPos(1,1)
  49.   mon.setTextScale(2)
  50.   mon.write("WYMIANA URANU")
  51.  end
  52. sleep(0.1)
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement