Guest User

test

a guest
Mar 1st, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. pr = peripheral.wrap("back")
  2.  
  3. if pr.getConnected() == false then
  4.   term.clear()
  5.   term.setCursorPos(8,5)
  6.   print("Sorry but this computer couldn")
  7.   term.setCursorPos(8,6)
  8.   print("connect to the reactor.")
  9. else
  10.  
  11. while true do
  12.   term.clear()
  13.   term.setCursorPos(10,7)
  14.    if pr.getActive() == true then
  15.      onoff = "ON"
  16.    else
  17.      onoff = "OFF"
  18.    end
  19.  
  20.   print("Reactor Status: "..onoff)
  21.   st = pr.getEnergyStored()
  22.  
  23.   term.setCursorPos(10,8)
  24.   print("RF Stored: ".. st)
  25.  
  26.    if st <= 5000000 then
  27.      pr.setActive(true)
  28.    else
  29.      pr.setActive(false)
  30.    end  
  31.  
  32.   tc = pr.getCasingTemperature()
  33.   term.setCursorPos(10,9)
  34.   print("Casing Temp: ".. tc)
  35.  
  36.   tf = pr.getFuelTemperature()
  37.   term.setCursorPos(10,10)
  38.   print("Fuel Temp: ".. tf)
  39.  
  40.   gr = pr.getEnergyProducedLastTick()
  41.   term.setCursorPos(10,11)
  42.   print("Generating ".. gr .." RF/Tick")
  43.  
  44.   sleep(1)
  45. end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment