PDA

View Full Version : Count inside Containers.



L!p3
09-18-2012, 03:17 PM
I would like to know how to count items inside containers without set the backpack name, like:


local lootBpId = 9602

print("Items: " .. Self.ItemCount(285, Item.GetName(lootBpId)))

This way isn't working, If I type "Orange Backpack" Insteado of "Item.GetName(lootBpId)" it works.

Thanks.

soul4soul
09-18-2012, 03:32 PM
One of the many things in xenobot which take too long to fix. This should help you out. http://forums.xenobot.net/showthread.php?6953-Windows-7-x64-Bad-Casing

DarkstaR
09-18-2012, 03:40 PM
One of the many things in xenobot which take too long to fix. This should help you out. http://forums.xenobot.net/showthread.php?6953-Windows-7-x64-Bad-Casing

This is entirely wrong. It's not a bug and it's not something that needs to be fixed. What you're looking at is a wrapper function that counts items from all containers. If you want to count from a single container, you instantiate a container class based on open containers and count from that class instance.

L!p3
09-18-2012, 04:14 PM
One of the many things in xenobot which take too long to fix. This should help you out. http://forums.xenobot.net/showthread.php?6953-Windows-7-x64-Bad-Casing

Thank you so much man!