Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Take inventory ]]--
- print "In WL Count Inventory"
- rednet.open("right")
- local a
- local inv
- while true do
- senderId,message,distance=rednet.receive()
- if message == "Inventory Request" then
- a = 1
- inv=0
- while a <= 9 do
- inv = inv + turtle.getItemCount(a)
- a = a + 1
- end
- print("inv is "..inv)
- rednet.send(senderId,tostring(inv))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement