Advertisement
Scarjit

MEstroage v4

Jul 25th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. g = peripheral.wrap("left")
  2. m1 = peripheral.wrap('me_drive_1')
  3. m2 = peripheral.wrap('me_drive_2')
  4. m3 = peripheral.wrap('me_drive_3')
  5. m4 = peripheral.wrap('me_drive_4')
  6. m5 = peripheral.wrap('me_drive_5')
  7. m6 = peripheral.wrap('me_drive_6')
  8. m7 = peripheral.wrap('me_drive_7')
  9. m8 = peripheral.wrap('me_drive_8')
  10. m9 = peripheral.wrap('me_drive_9')
  11. m10 = peripheral.wrap('me_drive_10')
  12. m11 = peripheral.wrap('me_drive_11')
  13. m12 = peripheral.wrap('me_drive_12')
  14. m13 = peripheral.wrap('me_drive_13')
  15. m14 = peripheral.wrap('me_drive_14')
  16. m15 = peripheral.wrap('me_drive_15')
  17. m16 = peripheral.wrap('me_drive_16')
  18. m17 = peripheral.wrap('me_drive_17')
  19. function Update()
  20. getTB()
  21. getFB()
  22. g.addBox(5,5,20,250,colors.red)
  23. Percent = FB/TB*100
  24. g.addBox(5,5,20,Percent*250,colors.white)
  25. function getTB()
  26. TB = m1.getTotalBytes() + m2.getTotalBytes() + m3.getTotalBytes() + m4.getTotalBytes() + m5.getTotalBytes() + m6.getTotalBytes() + m7.getTotalBytes() + m8.getTotalBytes() + m9.getTotalBytes()
  27. TB = TB + m10.getTotalBytes() + m11.getTotalBytes() + m12.getTotalBytes() + m13.getTotalBytes() + m14.getTotalBytes() + m15.getTotalBytes() + m16.getTotalBytes() + m17.getTotalBytes()
  28. end
  29. function getFB()
  30. FB = m1.getFreeBytes() + m2.getFreeBytes() + m3.getFreeBytes() + m4.getFreeBytes() + m5.getFreeBytes() + m6.getFreeBytes() + m7.getFreeBytes() + m8.getFreeBytes() + m9.getFreeBytes()
  31. FB = FB + m10.getFreeBytes() + m11.getFreeBytes() + m12.getFreeBytes() + m13.getFreeBytes() + m14.getFreeBytes() + m15.getFreeBytes() + m16.getFreeBytes() + m17.getFreeBytes()
  32. end
  33. getTB()
  34. getFB()
  35. print(TB," Total Bytes")
  36. print(TB/1000," Total KiloBytes")
  37. print(TB/1000000," Total MegaBytes")
  38. print(TB/1000000000," Total GigaBytes")
  39. print(FB," Free Bytes")
  40. print(FB/1000," Free KiloBytes")
  41. print(FB/1000000," Free MegaBytes")
  42. print(FB/1000000000," Free GigaBytes")
  43. print(FB/TB*100," Percentange of Free Space")
  44. Update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement