In your database table that holds the objects you should have a column that specifies the location of each object. Start your room locations at 10 and that leaves 1-9 for other things.
If you pick something up change the location for that object in the database to 1. If you drop something, change the location for that object from 1 to the number of the room you’re in.
That way when you need to show your inventory you can just select all the objects where location = 1. To find all the objects in a certain room, just select from the database all the objects where location = RoomNumber.
Databases are your friend, especially with something like an adventure game.
Jay [import]uid: 9440 topic_id: 26425 reply_id: 108145[/import]