Advertisement
Scarjit

Spacechecker V1.1

Apr 27th, 2014
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         drive = "'me_drive_"..i.."'"
  14.         print(drive)
  15.         p = peripheral.wrap(drive)
  16.        
  17.         remainICount = remainICount + p.getRemainingItemCount()
  18.         storedICount = storedICount + p.getStoredItemCount()
  19.         remainITypes = remainITypes + p.getRemainingItemTypes()
  20.         storedITypes = storedITypes + p.getStoredItemTypes()
  21.     end
  22. print("remainICount: "..remainICount)
  23. print("storedICount: "..storedICount)
  24. print("remainITypes: "..storedITypes)
  25. print("storedITypes: "..storedITypes)
  26. --end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement