Advertisement
Scarjit

Spacechecker V1.0

Apr 27th, 2014
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. --p.getFreeBytes()
  2. --p.getTotalBytes()
  3. --p.getInventorySize()
  4. --p.getRemainingItemCounts()
  5. --p.getRemainingItemTypes()
  6. n = 10 --Number of Drives
  7. --while true do
  8. remainICount = 0
  9. storedICount = 0
  10. remainITypes = 0
  11. storedITypes = 0
  12.     for i=0,n-1 do
  13.         p = peripheral.wrap("'me_drive_"..i.."'")
  14.         remainICount = remainICount + p.getRemainingItemCount()
  15.         storedICount = storedICount + p.getStoredItemCount()
  16.         remainITypes = remainITypes + p.getRemainingItemTypes()
  17.         storedITypes = storedITypes + p.getStoredItemTypes()
  18.     end
  19. print("remainICount: "..remainICount)
  20. print("storedICount: "..storedICount)
  21. print("remainITypes: "..storedITypes)
  22. print("storedITypes: "..storedITypes)
  23. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement