Advertisement
william200027

test

Jul 15th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. --------
  2. sideMFSU = "bottom"
  3. sideMonitor = "top"
  4. MFSU = peripheral.wrap(sideMFSU)
  5. Monitor = peripheral.wrap(sideMonitor)
  6. --------
  7.  
  8.  
  9. function check()
  10.    
  11.     EnergyS = MFSU.getEUStored()
  12.     EnergyC = MFSU.getEUCapacity()
  13.     Pourcent = math.floor(EnergyS/EnergyC*100)
  14.  
  15. end
  16.  
  17. function production()
  18.     time1 = EnergyS
  19.     sleep(1)
  20.     check()
  21.     time2 = EnergyS
  22.     pro = math.floor(time2-time1)
  23. end
  24.  
  25. while true do
  26.     check()
  27.     production()
  28.     print(EnergyS.."/"..EnergyC.." "..Pourcent.."%")
  29.     print(pro.."EU/S")
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement