Advertisement
ecco7777

CC Player inv reader

Aug 4th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. m=peripheral.wrap("top")
  2. p=peripheral.wrap("front")
  3.  
  4. while true do
  5. size=p.getSizeInventory()
  6.  if size>0 then
  7.   item={}
  8.   for i=1,size-1 do
  9.    if p.getStackInSlot(i)~=nil then
  10.    item[i]=p.getStackInSlot(i)["name"]
  11.    end
  12.   end
  13.   m.clear()
  14.   for i=1, size-1 do
  15.    if item[i] ~= nil then
  16.    --t.addText(1,i*8,item[i],0xFFFFFF)
  17.     m.setCursorPos(1,i)
  18.     m.write(item[i])
  19.    end
  20.   end
  21.  end
  22.  sleep(1)
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement