Advertisement
Swimy

WLCountinv

Mar 31st, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. --[[ Take inventory ]]--
  2.  
  3. print "In WL Count Inventory"
  4. rednet.open("right")
  5.  
  6. local a
  7. local inv
  8.  
  9. while true do
  10. senderId,message,distance=rednet.receive()
  11. if message == "Inventory Request" then
  12. a = 1
  13. inv=0
  14. while a <= 9 do
  15. inv = inv + turtle.getItemCount(a)
  16. a = a + 1
  17. end
  18. print("inv is "..inv)
  19. rednet.send(senderId,tostring(inv))
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement