Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 18th, 2012  |  syntax: None  |  size: 0.91 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. Targets = sensors.getAvailableTargetsforProbe("right", "EUSensor", "EUStorage")
  4. if #Targets ~= 0 then
  5.   Reading = sensors.getSensorReadingAsDict("right", "EUSensor", Targets[1], "EUStorage")
  6.   Max = Reading.maxStorage
  7.   Energy = Reading.energy
  8.   Tier = Reading.tier
  9.  
  10.   for k, v in pairs(Reading) do print(k, V) end
  11. else
  12.   Max = 0
  13.   Energy = 0
  14.   Tier = 1
  15. end
  16. if Tier == 1 then
  17. unit = "BatBox"
  18. elseif Tier == 2 then
  19. unit = "MFE"
  20. elseif Tier == 3 then
  21. unit = "MFSU"
  22. end
  23. while true do
  24. sleep(0)
  25. term.clear()
  26. term.setCursorPos(1,1)
  27. write("================UTILITIES=================")
  28. term.setCursorPos(1,2)
  29. write("Time      : "..textutils.formatTime(os.time(),true))
  30. term.setCursorPos(1,4)
  31. write("===============STORAGE UNIT===============")
  32. term.setCursorPos(1,5)
  33. write("Energy   : "..Energy.."/"..Max.." ")
  34. term.setCursorPos(1,6)
  35. write("Tier      : "..unit.." ")
  36. end