Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ps = peripheral.getNames()
- psTot = table.getn(ps)
- local mfsuN = 0
- local mfsu = {}
- for i = 1, psTot do
- if(string.match(ps[i], "mfsu")) then
- mfsuN = mfsuN + 1
- print(ps[i])
- mfsu[mfsuN] = peripheral.wrap(ps[i])
- end
- end
- print(mfsuN)
- for i = 1, mfsuN do
- print(mfsu[i].getEUCapacity())
- sleep(0.2)
- end
- while true do
- for i = 1, mfsuN do
- thisStored = mfsu[i].getEUStored()
- thisCapacity = mfsu[i].getEUCapacity()
- thisPercentage = math.floor(thisStored/thisCapacity*100)
- print(thisPercentage)
- print("MFSU_" ..i .."%: "..thisPercentage)
- end
- sleep(0.7)
- end
- sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement