Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- moni = peripheral.wrap("left")
- local maxEU
- local localEU
- local count
- while (true) do
- p = peripheral.wrap("back")
- t = p.getNamesRemote()
- moni.clear()
- moni.setCursorPos(1,1)
- maxEU = 0
- localEU = 0
- count = 0
- for i = 1, #t do
- moni.setCursorPos(1,i)
- info = p.getMethodsRemote(t[i])
- moni.write("eu" ..i ..": " ..p.callRemote(t[i], "getEUStored"))
- maxEU = maxEU + p.callRemote(t[i], "getEUStored")
- localEU = localEU + p.callRemote(t[i], "getEUStored")
- count = count + 1
- end
- moni.setCursorPos(1,25)
- procent = string.format("store: %02d%%", (localEU/(40000000*count)*100))
- moni.write(localEU.."/"..maxEU)
- moni.setCursorPos(1,26)
- moni.write(procent)
- sleep(20)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement