Advertisement
Guest User

myscript.lua

a guest
Feb 23rd, 2020
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local mfsu3 = peripheral.wrap("ic2:mfsu_3")
  2. local mfsu4 = peripheral.wrap("ic2:mfsu_4")
  3. local mfsu5 = peripheral.wrap("ic2:mfsu_5")
  4.  
  5. local m = peripheral.wrap("back")
  6.  
  7.  
  8.     while true do
  9.     local stored3 = 0
  10.     local stored4 = 0
  11.     local stored5 = 0
  12.     local stored6 = 0
  13.     local max1
  14.     local fin = 0
  15.     stored3 = mfsu3.getEUStored()
  16.     stored4 = mfsu4.getEUStored()
  17.     stored5 = mfsu5.getEUStored()
  18.     max1 = mfsu3.getEUCapacity()
  19.     local max = max1 + max1 + max1
  20.     local stored6 = stored3 + stored4 + stored5
  21.     local fin = (stored6 * 100) / max
  22.     m.clear()
  23.     m.setCursorPos(1, 1)
  24.     m.write("Mfsu % ")
  25.     m.setCursorPos(1, 2)
  26.     m.write(math.ceil(fin))
  27.     m.write("%")
  28.    
  29.    
  30.    
  31.    
  32.    
  33.  
  34.        
  35.  
  36.    
  37.  
  38.  
  39.  
  40.  
  41.          
  42.        
  43.      
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement