Advertisement
Guest User

getcell

a guest
Aug 21st, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. me = peripheral.wrap("left")
  2.  
  3. local cell
  4. print("Wprowadz Numer Dysku...")
  5. cell = read()
  6. print("Dysk="..cell)
  7.  
  8. function meCellName()
  9.   cellname = me.getStackInSlot(cell).display_name
  10.   print(cellname)
  11. end
  12.  
  13. function meTotalSpace()
  14.   totalSpace = me.getStackInSlot(cell).me_cell.totalBytes
  15.   print("Pojemonsc=".. totalSpace)
  16. end
  17.  
  18. function meSpaceLeft()
  19.   spaceLeft = me.getStackInSlot(cell).me_cell.freeBytes
  20.   print("Zostalo=".. spaceLeft)
  21. end
  22.  
  23. meCellName()
  24. meTotalSpace()
  25. meSpaceLeft()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement