Advertisement
karelvysinka

find devices modem 1

Mar 25th, 2023 (edited)
630
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.35 KB | None | 0 0
  1. local peripheralList = peripheral.getNames()
  2.  
  3. print("Seznam připojených zařízení:")
  4. for i, peripheralName in ipairs(peripheralList) do
  5.   print(i, peripheralName)
  6. end
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13. local itemCount = 0
  14. for i = 1, 16 do
  15.   itemCount = itemCount + turtle.getItemCount(i)
  16. end
  17.  
  18. print("Počet itemů v inventáři nad turtlou: " .. itemCount)
  19.  
  20.  
  21.  
  22.  
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement