Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Locating controller...")
- for i,k in pairs(peripheral.getNames()) do
- if k == "refinedstorage:controller" do
- print("Controller: " .. k)
- controller = k
- end
- end
- print("Locating monitor...")
- for i,k in pairs(peripheral.getNames()) do
- if k == "monitor" do
- print("Monitor: " .. k)
- monitor = k
- end
- end
- print("Getting monitor size...")
- resolution = {monitor.getSize()}
- print("Width: " .. resolution[1] .. " Height: " .. resolution[2])
- print("Is colour: " .. monitor.isColour())
- if not monitor.isColour() then
- error("Colour monitor needed")
- end
- term.redirect(monitor)
- term.clear()
- while true do
- percenttile = controller.getRFStored() * (controller.getRFCapacity() / (resolution[1]/4))
- term.setBackgroundColour(colours.red)
- term.write(string.rep(" ",(resolution[1]/4)))
- term.setBackgroundColour(colours.green)
- term.write(" ",percenttile)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement