View Full Version : Game objects with multiple 'containers'
subzero
08-05-2012, 11:16 PM
So, objects like a bench can have items on, under, and behind them. I'm able to get a list of the items ON a bench, but I was wondering if there was a way to do the same (using something like GameObj.loot.find{|x| x.name =~ /bench/}.contents.find_all{blah blah}) for items under or behind such an object.
Tillmen
08-06-2012, 05:11 PM
Objects on, under, or behind a container aren't reported by the game the same way as objects in a container. The GameObj contents method uses the same data that Stormfront uses to create popup windows with the container's conents, and that doesn't seem to exist for objects on, under, or behind a container. A strange thing I noticed when I looked into this was that the game actually sends the objects in a container with XML when you look under a container.
You can still have a script look under a container and read the results to build a list, but I'm not going to add that to the GameObj contents method because it won't stay up to date without the XML.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.