Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c = peripheral.find('tile_blockcapacitorbank_name')
- r = peripheral.find('BigReactors-Reactor')
- m = peripheral.find('monitor')
- function online()
- on = r.getActive()
- if on == true then
- acc = 'Online'
- else
- acc = 'Offline'
- end
- return acc
- end
- while true do
- storedEn = c.getEnergyStored()
- maxEn = c.getMaxEnergyStored()
- perc = math.floor(storedEn / maxEn * 100)
- r.setAllControlRodLevels(perc)
- cont = r.getControlRodLevel(1)
- out = r.getEnergyProducedLastTick()
- print(perc)
- online()
- m.clear()
- m.setCursorPos(1,1)
- m.write('Energy Stored: '..storedEn)
- m.setCursorPos(1,2)
- m.write('The Reactor is '..acc)
- m.setCursorPos(1,3)
- m.write('Control Rods are '..cont..'% inserted')
- m.setCursorPos(1,4)
- m.write(out..' RF produced')
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement