This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
benjajb's profile picture

need help for checking inventory

Started by benjajb, 13 September 2012 - 02:50 PM
benjajb #1
Posted 13 September 2012 - 04:50 PM
i need some help for checking a chest infront of a turtle and make it break the block above it (golden conductive pipe from bc) if there are no stots left.
i also want to make it place the block again if there is at least five slots in the chest.
this is for a quarry shut off system.
im not that good with lua so i hope someone can help me.
Lettuce #2
Posted 13 September 2012 - 07:30 PM
There's no direct way to manage a chest's inventory at this time, you can only go about it indirectly, like if a turtle.drop() command failed, you know the chest is full. That's the only way I know of to see if the chest is full, and it won't work to see if there is greater than or equal to five slots left. I hope you can find a way to manage it though. Perhaps CC Sensors? I've heard that it can scan chest inventories, and get back slots/item counts, but I've never used it myself.
Cranium #3
Posted 13 September 2012 - 08:42 PM
CCsensors is the way to go. I do know for sure that it can get inventory information, but like Lettuce, I have never used it myself.