Wow didn't think that I could do an array of panel pointers.... That helps a lot, I'll give it a shot.
Paracharlie: You should see the actual inventory
that was just a bare bones version. Go for it I guess. BTW you might run into some funkiness with it later, the idea was to make an inventory that allowed you to have completely variable inventory panels on screen; for example, opening a chest would create an inventory screen that only displays the slots that the chest was using, thats what the slot_owner variable is for, the slot is not considered to be "free" unless nothing was using it, otherwise a chest might bleed into another set of slots by just checking to see if the inventory slot is simply occupied.