Advertisement
TheRockettek

Untitled

Jan 27th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. print("Locating controller...")
  2. for i,k in pairs(peripheral.getNames()) do
  3. if k == "refinedstorage:controller" do
  4. print("Controller: " .. k)
  5. controller = k
  6. end
  7. end
  8. print("Locating monitor...")
  9. for i,k in pairs(peripheral.getNames()) do
  10. if k == "monitor" do
  11. print("Monitor: " .. k)
  12. monitor = k
  13. end
  14. end
  15. print("Getting monitor size...")
  16. resolution = {monitor.getSize()}
  17. print("Width: " .. resolution[1] .. " Height: " .. resolution[2])
  18. print("Is colour: " .. monitor.isColour())
  19. if not monitor.isColour() then
  20. error("Colour monitor needed")
  21. end
  22.  
  23. term.redirect(monitor)
  24. term.clear()
  25. while true do
  26. percenttile = controller.getRFStored() * (controller.getRFCapacity() / (resolution[1]/4))
  27. term.setBackgroundColour(colours.red)
  28. term.write(string.rep(" ",(resolution[1]/4)))
  29. term.setBackgroundColour(colours.green)
  30. term.write(" ",percenttile)
  31. sleep(1)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement