Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap('monitor_0')
- local r = peripheral.wrap('BigReactors-Reactor_0')
- local state = r.getActive()
- local stored = r.getEnergyStored()
- mon.setBackgroundColor(colors.black)
- mon.setTextColor(colors.pink)
- mon.setCursorPos(1,1)
- mon.setTextScale(1)
- mon.clear()
- while 1 do
- mon.clear()
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.pink)
- state = r.getActive()
- stored = r.getEnergyStored()
- if state then
- mon.write('R: ')
- mon.setTextColor(colors.green)
- mon.write('Online')
- else
- mon.write('R: ')
- mon.setTextColor(colors.red)
- mon.write('Offline')
- end
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.pink)
- mon.write('E: ')
- mon.setTextColor(colors.green)
- mon.write(stored)
- mon.setTextColor(colors.pink)
- mon.write(' RF')
- if stored>9000000 then r.setActive(false)
- elseif stored<8000000 then r.setActive(true)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement