Advertisement
Scarjit

EUStorage v1

Jul 27th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. Energy = 0
  2. for i=0,199 do
  3.     x = "mfsu_"..i
  4.     m[1] = peripheral.wrap(x)
  5. end
  6. print("[Debug] 200 Peripherals wraped")
  7. for w=0,199 do
  8.     Energy = Energy + m[w].getEUStored()
  9.     MaxEnergy = MaxEnergy + m[w].getEUCapacity()
  10. end
  11. print("MaxEnergy:     "..tostring(MaxEnergy))
  12. print("Energy Stored: "..tostring(Energy))
  13. print("Percentage:    "..tostring(Energy/MaxEnergy*100))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement