Advertisement
Guest User

cell

a guest
Sep 2nd, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.61 KB | None | 0 0
  1. m = peripheral.wrap("back")
  2. m.setTextScale(1)
  3. m.clear()
  4. xB = 0
  5.  
  6. cell1 = peripheral.wrap("cofh_thermalexpansion_energycell_11")
  7. cell2 = peripheral.wrap("cofh_thermalexpansion_energycell_12")
  8. cell3 = peripheral.wrap("cofh_thermalexpansion_energycell_13")
  9. cell4 = peripheral.wrap("cofh_thermalexpansion_energycell_14")
  10. cell5 = peripheral.wrap("cofh_thermalexpansion_energycell_15")
  11. cell6 = peripheral.wrap("cofh_thermalexpansion_energycell_16")
  12.  
  13. stored1 = cell1.getEnergyStored("cofh_thermalexpansion_energycell_11")
  14. stored2 = cell2.getEnergyStored("cofh_thermalexpansion_energycell_12")
  15. stored3 = cell3.getEnergyStored("cofh_thermalexpansion_energycell_13")
  16. stored4 = cell4.getEnergyStored("cofh_thermalexpansion_energycell_14")
  17. stored5 = cell3.getEnergyStored("cofh_thermalexpansion_energycell_15")
  18. stored6 = cell4.getEnergyStored("cofh_thermalexpansion_energycell_16")
  19.  
  20. storedmax1 = cell1.getMaxEnergyStored("cofh_thermalexpansion_energycell_11")
  21. storedmax2 = cell2.getMaxEnergyStored("cofh_thermalexpansion_energycell_12")
  22. storedmax3 = cell3.getMaxEnergyStored("cofh_thermalexpansion_energycell_13")
  23. storedmax4 = cell4.getMaxEnergyStored("cofh_thermalexpansion_energycell_14")
  24. storedmax5 = cell3.getMaxEnergyStored("cofh_thermalexpansion_energycell_15")
  25. storedmax6 = cell4.getMaxEnergyStored("cofh_thermalexpansion_energycell_16")
  26.  
  27. cellp1 = tonumber(stored1)*100/storedmax1.."%"
  28. cellp2 = tonumber(stored2)*100/storedmax1.."%"
  29. cellp3 = tonumber(stored3)*100/storedmax3.."%"
  30. cellp4 = tonumber(stored4)*100/storedmax4.."%"
  31. cellp5 = tonumber(stored5)*100/storedmax5.."%"
  32. cellp6 = tonumber(stored6)*100/storedmax6.."%"
  33.  
  34. m.setCursorPos(2,2)
  35. m.write(tonumber(stored1).."/".." Rf")
  36. m.setCursorPos(2,3)
  37. m.write(tonumber(storedmax1).." ")
  38. m.setCursorPos(4,4)
  39. m.write(cellp1)
  40. m.setCursorPos(17,2)
  41. m.write(tonumber(stored2).."/".." Rf")
  42. m.setCursorPos(17,3)
  43. m.write(tonumber(storedmax2).." ")
  44. m.setCursorPos(19,4)
  45. m.write(cellp2)
  46. m.setCursorPos(2,6)
  47. m.write(tonumber(stored3).."/".." Rf")
  48. m.setCursorPos(2,7)
  49. m.write(tonumber(storedmax3).." ")
  50. m.setCursorPos(4,8)
  51. m.write(cellp3)
  52. m.setCursorPos(17,6)
  53. m.write(tonumber(stored4).."/".." Rf")
  54. m.setCursorPos(17,7)
  55. m.write(tonumber(storedmax4).." ")
  56. m.setCursorPos(19,8)
  57. m.write(cellp4)
  58. m.setCursorPos(2,10)
  59. m.write(tonumber(stored5).."/".." Rf")
  60. m.setCursorPos(2,11)
  61. m.write(tonumber(storedmax5).." ")
  62. m.setCursorPos(4,12)
  63. m.write(cellp5)
  64. m.setCursorPos(17,10)
  65. m.write(tonumber(stored6).."/".." Rf")
  66. m.setCursorPos(17,11)
  67. m.write(tonumber(storedmax6).." ")
  68. m.setCursorPos(19,12)
  69. m.write(cellp6)
  70.  
  71. while true do
  72. sleep(5)
  73. m.setCursorPos(4,4)
  74. m.write(cellp1)
  75. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement