_Knightmare_ wrote...
I imagine you would need to run two (nested) loops in your code (ie. a loop within another loop). The first loop would look for bag items in the player's inventory (by checking if the found item does have an inventory itself). The second loop would search through the inventory of the found bag.
Augh. I was afraid I'd have to do that. Well, at least this way I know I can find the right bag, instead of just any bag. Thanks..
Baragg wrote...
Just to ask, why would you want to check
if it is in a bag on the pc, instead of just checking if the pc is in
possession of said item?
My module dumps dozens of tokens and OOC widgets onto the player, and to keep it from being overwhelming I'm using a script to auto-sort items OnAcquire. The problem is that OnAcquire runs for every item in a PC's inventory as soon as they enter the module, and I need some sort of check to see if the item is already sorted into a container before I go messing with it.
Modifié par PhantomSkyfire, 09 mars 2011 - 08:23 .