Author Topic: Inventory order of Chest?  (Read 407 times)

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Inventory order of Chest?
« on: February 19, 2011, 12:51:10 am »


               If you open up an empty chest and look at each of the squared sections, is their a way to check if items are placed in a specific order of that chest?
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Inventory order of Chest?
« Reply #1 on: February 19, 2011, 02:09:19 am »


               I thought I would be cleaver and have a script tell me possitions. Now I'm just confused. I can't figure out if their is any order.


void main()
{
   int nItems = 0;
   object oSelf = OBJECT_SELF;
   object oItem = GetFirstItemInInventory(oSelf);

   while (oItem != OBJECT_INVALID)
   {
      nItems = nItems;// + GetNumStackedItems(oItem);
        SpeakString("I see " + GetTag(oItem));
      oItem = GetNextItemInInventory(oSelf);


   }
}

               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Inventory order of Chest?
« Reply #2 on: February 19, 2011, 05:04:24 am »


               Without a third party plugin. I do not think there is any way to find the posistion of an item in a chest.  The GetFirst/NextItemInInventory will give you the reverse order the items where added to the chest. It will have nothing to do with where they are placed in the chest.   So if a chest had Potion, Axe and dart in it and you added a ring.  GetFirstItemIn Inventory  would return the ring.  Get next would then return --potion --axe  --dart
               
               

               
            

Legacy_Buddywarrior

  • Hero Member
  • *****
  • Posts: 512
  • Karma: +0/-0
Inventory order of Chest?
« Reply #3 on: February 19, 2011, 07:04:45 am »


               

Lightfoot8 wrote...

Without a third party plugin. I do not think there is any way to find the posistion of an item in a chest. The GetFirst/NextItemInInventory will give you the reverse order the items where added to the chest. It will have nothing to do with where they are placed in the chest. So if a chest had Potion, Axe and dart in it and you added a ring. GetFirstItemIn Inventory would return the ring. Get next would then return --potion --axe --dart

Thanks Lightfoot8. That's what it was looking like for me also.