Author Topic: Troublesome stores  (Read 1202 times)

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« on: December 25, 2010, 07:50:07 am »


               when useing StoreCampaignObject funtion with stores I seem to be getting either the objects are invalid or they are valid yet no DB writen with the following script.  I am tired and it is 15 mins tell christmas perhaps i should stop for the night...

//:: Script Name: zz_clr_store
//::
//:: Orginal Authors: Idea , TritonX "pshop_OnOpenDialogue"
//:: Script created by Old Man`s Beard, June 2006
//:: Thanks to Lex and UOAbigail for their support
//::
//:: EDITED/ALTERED: Greyfort
//::
//:: Created: 12.24.2010
//::
//:: Script Function:
//:: transfer store1 DB info to store2 haveing 0 duplicates
//:: from store1 into store2.  Then clean out store1 db
//::
////////////////////////////////////////////////////////////////////////////////

/* //uncoment these if you dont have the include and remove the include line
//:://///////////////////////////////////////////////////////////
// Use to load a stores data base with nwn db
void OHS_LoadStore(object oStore, string sDBName);

void OHS_LoadStore(object oStore, string sDBName)
{
  location lStore = GetLocation(oStore);
  int bLoaded = GetLocalInt(oStore,"OHS_STORE_LOADED");
  if (GetIsObjectValid(oStore) && !bLoaded)
  {
    int nItems = GetCampaignInt(sDBName,"N_ITEMS");
    PrintString(IntToString(nItems)+" in "+sDBName);
    object oItem;
    int ILRStackSize, nChargesStarting;
    int nNth;
    for (nNth=1; nNth<=nItems; nNth++)
    {
      oItem = RetrieveCampaignObject(sDBName,"ITEM_"+IntToString(nNth),GetLocation(oStore),oStore);
      if (GetPlotFlag(oItem) )// || GetStolenFlag(oItem)) remove // to Destroy Plot and Stolen Items
      {
        DestroyObject(oItem);
      }
      else
      {
        ILRStackSize = StringToInt(Get2DAString("baseitems","ILRStackSize",GetBaseItemType(oItem)));
        SetItemStackSize(oItem,ILRStackSize);
        nChargesStarting = StringToInt(Get2DAString("baseitems","ChargesStarting",GetBaseItemType(oItem)));
        if (nChargesStarting>0) SetItemCharges(oItem,nChargesStarting);
        // SetInfiniteFlag(oItem,TRUE); //Uncomment if you want stackable to be infinite
      }
    }
    SetLocalInt(oStore,"OHS_STORE_LOADED",TRUE);
  }
}//needed end of function
///////////////////////////////////////////////////////////////////////////////
*/ //uncoment these if you dont have the include and remove the include line

// includes here  //
#include "zz_store_inc"
void main()
{
// this script is executed by a NPC
// NPC Stationary merchant Executing script, store and DB tag
object oNPC_Merch=OBJECT_SELF;//GetObjectByTag("stat_merch");
//debug line
PrintString(GetTag(oNPC_Merch)+" executing script");
//debug line

if (GetObjectType(oNPC_Merch) == OBJECT_TYPE_CREATURE && GetIsObjectValid(oNPC_Merch ) )
{
//debug line
PrintString("NPC valid in executing script");
//debug line

//Stationary merchant store and DB tag
object oStore=GetObjectByTag("stat_merch");
string sDBName="stat_merch";
string sStoreTag1=GetLocalString(OBJECT_SELF,"sStoreTag");

// Traveling merchant store and DB tag
object oStore2=GetObjectByTag("trvl_merch");
string sDBName2="trvl_merch";
string sStoreTag2=GetLocalString(OBJECT_SELF,"sTrvStoreTag");
int nItems2 = GetCampaignInt(sDBName2,"N_ITEMS");

object oItem;
object oItemChk;
int nNth = 0;//nItems2;
////////////////////////////////////////////////////
// first set items in traveling merchant db

  oStore2 = GetObjectByTag("OHS_STORE");
  if ( GetIsObjectValid(oStore2)==FALSE )
  {
    oStore2 = CreateObject(OBJECT_TYPE_STORE,"trvl_merch",GetLocation(OBJECT_SELF));
      if (GetObjectType(oStore2) == OBJECT_TYPE_STORE)
        { //was(oStore, "OHS_PERSISTENT_STORE") replaced with sStoreTag
        OHS_LoadStore(oStore2,sStoreTag2);

  if (GetIsObjectValid(oStore2))
  {
  //debug line
  PrintString(sDBName2+" valid saving items in inventory to DB");
 //debug line
    DestroyCampaignDatabase(sDBName2);
    oItem = GetFirstItemInInventory(oStore2);
    while (GetIsObjectValid(oItem))
    {
      StoreCampaignObject(sDBName2,"ITEM_"+IntToString(++nNth),oItem);
        //debug line
        string sItemName= GetName(oItem);
        PrintString(sItemName+"= ITEM_"+IntToString(++nNth)+"saved to DB");
        //debug line
        oItem = GetNextItemInInventory(oStore2);
    }//end of while
    SetCampaignInt(sDBName2,"N_ITEMS",nNth);
  }//end of if
        }
  }
/////////////////////////////////////////////////////////////////
// then store stationary merchants items in db
// removing any items that may be duplicates befor putting items
// in traveling merchants inventory

  oStore = GetObjectByTag("OHS_STORE");
  if ( GetIsObjectValid(oStore)==FALSE )
  {                               //replace "resrefofyourstore" by one in your palette
    oStore = CreateObject(OBJECT_TYPE_STORE,"stat_merch",GetLocation(OBJECT_SELF));
      if (GetObjectType(oStore) == OBJECT_TYPE_STORE)
        { //was(oStore, "OHS_PERSISTENT_STORE") replaced with sStoreTag
        OHS_LoadStore(oStore,sStoreTag1);

  if (GetIsObjectValid(oStore))
  {
  //debug line
  PrintString(sDBName+" valid saving items in inventory to DB");
  //debug line
    oItemChk = GetFirstItemInInventory(oStore2);
    while (GetIsObjectValid(oItemChk))
    {
    oItem = GetFirstItemInInventory(oStore);
        while (GetIsObjectValid(oItem))
        {
            if(oItem == oItemChk)
            {
            DestroyObject(oItem);
            }else{
                StoreCampaignObject(sDBName2,"ITEM_"+IntToString(++nNth),oItem);
                //debug line
                string sItemName= GetName(oItem);
                PrintString(sItemName+"= ITEM_"+IntToString(++nNth)+"saved to DB");
                //debug line
                }
        oItem = GetNextItemInInventory(oStore);
        }//end of while oItem
    oItem = GetNextItemInInventory(oStore2);
    }//end of while oItemChk
   SetCampaignInt(sDBName2,"N_ITEMS",nNth);
  }//end of if
        }
  }
// clean out NPC Stationary merchant store
//DestroyCampaignDatabase(sDBName);

// }else{PrintString("merchants invalid"); }


}else {PrintString("NPC not valid "); }
//////////////////////////////
}// end of script


If you all see what im missing please let me know...Perhaps its the campain objects?  I even tried OMB loadstore etc after all thats what got me working on it LOL

MERRY CHRISTMAS!!!
               
               

               


                     Modifié par Greyfort, 25 décembre 2010 - 08:33 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Troublesome stores
« Reply #1 on: December 25, 2010, 04:10:44 pm »


               I have not read or figured out the whole script.  At a quick glance however I saw this:

...
StoreCampaignObject(sDBName2,"ITEM_"+IntToString(++nNth),oItem);
        //debug line
        string sItemName= GetName(oItem);
        PrintString(sItemName+"= ITEM_"+IntToString(++nNth)+"saved to DB");
...


You are increaseing   nNTH  twice every time you go through the loop.

 
EDIT:
You did the same thing again with your debug  lower in the script.

 }else{
                StoreCampaignObject(sDBName2,"ITEM_"+IntToString(++nNth),oItem);
                //debug line
                string sItemName= GetName(oItem);
                PrintString(sItemName+"= ITEM_"+IntToString(++nNth )+"saved to DB");
                //debug line


Most likely all you need to do is get rid of the var increment(++ ) in your debug lines.
               
               

               


                     Modifié par Lightfoot8, 25 décembre 2010 - 09:03 .
                     
                  


            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #2 on: December 29, 2010, 09:20:00 pm »


               Another Question about stores and using the nwn db can I useing data base commands move campain objects from one merchant to another?  If I can't then thats my issue with the script I think. so if anyone knows thankyou.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #3 on: January 01, 2011, 05:56:34 am »


               Forgive me once again...Can anyone validate that you absolutely can not move one CampaignObject in a store to another store.  i'm still having issues, and I can't help but wonder am I trying to do something you just cant do.



example:

move CampaignObjects from store A to store B(make sure no duplicate items from storeA in store B if so destroy them)  then clear store A



is it the merchants that are giveing me the problem or the fact I'm storeing CampaignObjects.  Any clarity on this would be very helpful.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Troublesome stores
« Reply #4 on: January 01, 2011, 07:45:12 am »


               I thing the problem here and why you are not getting any responces, is that the question make no since. At least it dosent make any since to me.  



A CampaignObject is data stored out in a data base.  When  you retrive it you can place it in any store you want to place it in.



As far as moving a CampaignObject from one store to another.   Well a store can not contain a DB to beging with.  A store being either a blueprint or an instance of the blueprint in the game.  



In short I really have no Idea what you are asking.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #5 on: January 01, 2011, 10:20:03 am »


               Forgive me that my question does not make since to you.  I was having a issue with merchants or so it seemed.  I took the campaign data base and loaded it into a chest  for each store then went through the chests checking to make sure no duplicate items and only storing one of the item. etc.



This worked and now merchant loads up new data base, when I have got the bugs out i will post what i am trying to do so it will be clear.



I was inspired by Fester Pot link:

http://nwvault.ign.c....Detail&id=3074



It loads a DB into a store, then when store closes it save to db

I got it to work and it works well the merchant always has what you sold them.



My current issue is comparing DBs so I only have 1 of a item and no duplicates,  I was trying to do it with merchants and having issues
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Troublesome stores
« Reply #6 on: January 01, 2011, 05:40:19 pm »


               Code repost from PM:

// includes here //
#include "zz_store_inc"
//::///////////////////////
void main() {

    object oItemA, oItemB, oItem1, oItem2;
   
    object oChest=GetObjectByTag("swap_chest");
    object oChest1=GetObjectByTag("swap_chest1");
    object oChest2=GetObjectByTag("swap_chest2");
   
    string sDBName;// = GetTag(oStore);
    int nNth = 0;
   
    string sStoreTag1="stat_merch";
    string sStoreTag2="trvl_merch";

    if (GetIsObjectValid(oChest1)) {
        //:: clear chest
        oItemA = GetFirstItemInInventory(oChest1);
        while (GetIsObjectValid(oItemA)) {
            DestroyObject(oItemA);
            oItemA = GetNextItemInInventory(oItemA);
        }
       
        //:: clear chest end
        OHS_LoadStore(oChest1,sStoreTag1);
        DestroyCampaignDatabase("stat_merch");//(sDBName);
    }

    if( GetIsObjectValid(oChest2)==TRUE ) {
        //:: clear chest
        oItemB = GetFirstItemInInventory(oChest2);
        while (GetIsObjectValid(oItemB)) {
            DestroyObject(oItemB);
            oItemB = GetNextItemInInventory(oItemB);
        }
       
        //:: clear chest end
        OHS_LoadStore(oChest2,sStoreTag2);
        DestroyCampaignDatabase("trvl_merch");//(sDBName);
    }
/*
    check items in oChest2 vs oChest1
    destroy any items from oChest1 that oChest2 has
    store only oChest2 items
*/
    if( GetIsObjectValid(oChest)) {
        string sTag;
        sDBName="trvl_merch";
        oItem2 = GetFirstItemInInventory(oChest2);
       
        while (GetIsObjectValid(oItem2)) {
            oItem1=GetFirstItemInInventory(oChest1);
            sTag = GetTag(oItem1);
            while(GetIsObjectValid(oItem1)) {
                // check for duplicate destroy them
                if(sTag == GetTag(oItem2)) {
                    SetLocalInt(oItem1, "Destroyed", 1);
                    DestroyObject(oItem1);
                }   
                oItem1 = GetNextItemInInventory(oChest1);   
            }
   
            // stores item from chest2 to "trvl_merch" sDBName
            StoreCampaignObject(sDBName,"ITEM_"+IntToString(++nNth),oItem2);
            oItem2 = GetNextItemInInventory(oChest2);
        }
    }

    if (GetIsObjectValid(oChest)) {

        // NOW store oChest1 items
        oItem1 = GetFirstItemInInventory(oChest1);
        while (GetIsObjectValid(oItem1)) {
            // stores item from chest1 to
            //"trvl_merch" sDBName
            if (!GetLocalInt(oItem1, "Destroyed"))//store them unless they are slated for destruction as duplicates
                StoreCampaignObject(sDBName,"ITEM_"+IntToString(++nNth),oItem1);
            oItem1 = GetNextItemInInventory(oChest1);
        }

        //"trvl_merch" sDBName
        SetCampaignInt(sDBName,"N_ITEMS",nNth);
    }
}

               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Troublesome stores
« Reply #7 on: January 01, 2011, 07:50:49 pm »


               ok, There are a few logic errors and oversights in the code above. I don't have time to fully go over it right now. But here is what I see so far.  

The first one I am not 100% on my self,  The GetFirst/next functions are iterators, You may be running into a problem with nesting them.

The Object oChest is checked two times to see if it is a valid object but is never used outside of that.
 
DestroyObject  does not destroy an object until after the current script finishes running.

Of the four basic sections in your script. only the last one tries to hand this correctly, by checking if the local int 'destroyed' is set on the object before storing it in the DB. 

The First two loops never handle the problem at all, They never set the int.

the third section, that compares the items, Does set the int on objects, that it sets for destruction, But it never checks the int to see if the item was already marked destroyed so it can ignore it.
   

oversite: 
If thees are chests objects you are dumping the items into.  Or even if they are stores.  With the fact that none of the items are destroyed before adding the stored campaign objects from the database into them, means that the container can easily overflow, having the  items end up on the ground and not in the chest at all. This is of course more of a problem for the chest then the store.  but is a possible problem for either one.
               
               

               


                     Modifié par Lightfoot8, 01 janvier 2011 - 07:54 .
                     
                  


            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Troublesome stores
« Reply #8 on: January 01, 2011, 08:18:28 pm »


               

Lightfoot8 wrote...

Of the four basic sections in your script. only the last one tries to hand this correctly, by checking if the local int 'destroyed' is set on the object before storing it in the DB. 

The First two loops never handle the problem at all, They never set the int.

The int was my addition, actually - an example of how to deal with DO's built-in delaycommand. I think you're correct that the other DO's need them as well. I'll go ahead and add them for him.

I don't think the iterators are a problem, as they are iterating over two separate lists of objects. I did briefly consider writing a custom function to check for duplicate tags, but I didn't want to add more functions, since the above was only one of two given to me in somewhat of a jumble.

Funky
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Troublesome stores
« Reply #9 on: January 01, 2011, 10:03:12 pm »


               Sorry for the delay in posting. Just got my first look at the OHS include above, which also appears to use delays. Will have to further untangle this mess - nevermind that it appears to be intended for a store, not a chest.... ><



Funky
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Troublesome stores
« Reply #10 on: January 01, 2011, 11:08:51 pm »


               Here's the updated code - not compiled, but should work (not sure where that include at the top belongs, if anywhere - I think OHS_LoadStore was in it?



// includes here //
#include "zz_store_inc"
//::///////////////////////

void OHS_LoadStore(object oStore, string sDBName) {
    location lStore = GetLocation(oStore);
      int bLoaded = GetLocalInt(oStore,"OHS_STORE_LOADED");
      if (GetIsObjectValid(oStore) && !bLoaded) {
         
        int nItems = GetCampaignInt(sDBName,"N_ITEMS");
        PrintString(IntToString(nItems)+" in "+sDBName);
        object oItem;
        int ILRStackSize, nChargesStarting;
        int nNth;
        for (nNth = 1; nNth <= nItems; nNth++) {
              oItem = RetrieveCampaignObject(sDBName,"ITEM_"+IntToString(nNth),GetLocation(oStore),oStore);
              if (GetPlotFlag(oItem)) {// || GetStolenFlag(oItem)) remove // to Destroy Plot and Stolen Items
                SetLocalInt(oItem, "Destroyed", 1);
                DestroyObject(oItem);
              } else {
                ILRStackSize = StringToInt(Get2DAString("baseitems","ILRStackSize",GetBaseItemType(oItem)));
                SetItemStackSize(oItem,ILRStackSize);
                nChargesStarting = StringToInt(Get2DAString("baseitems","ChargesStarting",GetBaseItemType(oItem)));
                if (nChargesStarting>0)
                    SetItemCharges(oItem,nChargesStarting);
                // SetInfiniteFlag(oItem,TRUE); //Uncomment if you want stackable to be infinite
              }
        }
        SetLocalInt(oStore,"OHS_STORE_LOADED",TRUE);
      }
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


void main() {

    object oItemA, oItemB, oItem1, oItem2;
   
    object oChest = GetObjectByTag("swap_chest");
    object oChest1 = GetObjectByTag("swap_chest1");
    object oChest2 = GetObjectByTag("swap_chest2");
   
    string sDBName;// = GetTag(oStore);
    int nNth = 0;
   
    string sStoreTag1="stat_merch";
    string sStoreTag2="trvl_merch";

    if (GetIsObjectValid(oChest1)) {
        //:: clear chest
        oItemA = GetFirstItemInInventory(oChest1);
        while (GetIsObjectValid(oItemA)) {
            SetLocalInt(oItemA, "Destroyed", 1);
            DestroyObject(oItemA);
            oItemA = GetNextItemInInventory(oItemA);
        }
       
        //:: clear chest end
        OHS_LoadStore(oChest1,sStoreTag1);
        DestroyCampaignDatabase("stat_merch");//(sDBName);
    }

    if (GetIsObjectValid(oChest2)) {
        //:: clear chest
        oItemB = GetFirstItemInInventory(oChest2);
        while (GetIsObjectValid(oItemB)) {
            SetLocalInt(oItemB, "Destroyed", 1);
            DestroyObject(oItemB);
            oItemB = GetNextItemInInventory(oItemB);
        }
       
        //:: clear chest end
        OHS_LoadStore(oChest2,sStoreTag2);
        DestroyCampaignDatabase("trvl_merch");//(sDBName);
    }
/*
    check items in oChest2 vs oChest1
    destroy any items from oChest1 that oChest2 has
    store only oChest2 items
*/
    if (GetIsObjectValid(oChest)) {
        string sTag, sTag2;
        sDBName = "trvl_merch";
        oItem2 = GetFirstItemInInventory(oChest2);
       
        while (GetIsObjectValid(oItem2)) {
            sTag = GetTag(oItem2);
            oItem1 = GetFirstItemInInventory(oChest1);
            while (GetIsObjectValid(oItem1)) {
                // check for duplicate destroy them
                if (sTag == GetTag(oItem1)) {
                    SetLocalInt(oItem1, "Destroyed", 1);
                    DestroyObject(oItem1);
                }   
                oItem1 = GetNextItemInInventory(oChest1);   
            }
   
            // stores item from chest2 to "trvl_merch" sDBName
            if (!GetLocalInt(oItemB, "Destroyed"))
                StoreCampaignObject(sDBName,"ITEM_"+IntToString(++nNth),oItem2);
            oItem2 = GetNextItemInInventory(oChest2);
        }
    }

    if (GetIsObjectValid(oChest)) {

        // NOW store oChest1 items
        oItem1 = GetFirstItemInInventory(oChest1);
        while (GetIsObjectValid(oItem1)) {
            // stores item from chest1 to
            //"trvl_merch" sDBName
            if (!GetLocalInt(oItem1, "Destroyed"))//store them unless they are slated for destruction as duplicates
                StoreCampaignObject(sDBName,"ITEM_"+IntToString(++nNth),oItem1);
            oItem1 = GetNextItemInInventory(oChest1);
        }

        //"trvl_merch" sDBName
        SetCampaignInt(sDBName,"N_ITEMS",nNth);
    }
}

I still have a few lingering doubts about this, thogh. First of all, it appears to allow the storage of plot and stolen items, only removing them after they've been stored, which makes no sense at all given the speed of the bioware database. Second, it automatically maximizes stacksize and charges, which could lead to a problem of exploitation. Third, and most importantly, however, is that I'm still not sure what it is you're trying to accomplish here. This is a common problem when you ask how to code something before you ask what it is you should code. '<img'> Because of that, I can't say with any certainty that it will actually accomplish what you're trying to do.

Funky
               
               

               


                     Modifié par FunkySwerve, 01 janvier 2011 - 11:10 .
                     
                  


            

Legacy_Birdman076

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +0/-0
Troublesome stores
« Reply #11 on: January 02, 2011, 04:06:32 am »


               Greyfort was trying to assist me in making a travelling merchant who will take player based items sold to stores as opposed to deleting them with a clear store script. It would be nice to keep the items in play so to speak. The travelling merchant would have only one of each item so the store inventory doesn't fill and cause problems with lag, etc. Ideally it would be nice to have multiple travelling merchants who would specialize in different types of items (jeweler, armor smith, weapon smith, magical merchant, etc). Thank you to everyone who has helped thus far, it is greatly appreciated.
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #12 on: January 02, 2011, 07:49:48 am »


               Thankyou for all the insight Funky and lightfoot, i was going a bit crazy.  I haven't tested it I will give it a try.  What realy stumped me was the delay on the destroying objects,  I had never ran into that issue before.  Forgive me for chainging it to chests, it is intened for stores and i thought maybe merchants where my problem but I confused lightfoot (sorry light).



I thought about a checking for duplicate function also, thought that would be a good idea still think it is.  If you have a function handy i would surely use it.

Thanks again both of you.

               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #13 on: January 02, 2011, 08:25:27 am »


               Ok tested your very last script, it did as i poorly described.  It only wrote one of any Item into the store2 DB and cleared store1 db.  Now i just have to try it with stores not chest just as described above.  Cant have a bunch of chests around what will players think..
               
               

               
            

Legacy_Greyfort

  • Sr. Member
  • ****
  • Posts: 442
  • Karma: +0/-0
Troublesome stores
« Reply #14 on: January 02, 2011, 09:03:38 am »


               I did run into one issue, and that had to do with my orginal script and my logic as Lightfoot said...I was only checking one db not both, so script works to move items from store1 to store2 with no duplicates.  But store 2 has duplicates IE: store had bullets I sold more bullets tested script and store has two stacks of 99.  If you do have a duplicate checking function Fuzzy I could use it.

My issue is now checking store2 orginal DB vers new one.  So let me re ask before i script as you said.  Rather then do all this with placeables/merchants...

Q1)using no objects(chests/stores) can I just compare DB's example: Loads(by compaing data we have the max nuber items in db to call for data from DB) store1 db save data as “store1_temp_DB” loads store2 DB save data as “store2_temp_DB”, Looks for duplicates in both temp dbs creating “store2_new_DB”.  Then compare “store2_temp_DB” vs store2_new_DB creating final DB “trvl_merch”

Q2) im sure above is possible but it seems must be done with a object inventories is that correct?  Thats the issue I face with the nwn DB, I’m use to using nwnx2 extender with ms access comparing just the data.

Q3) So what Im trying to do as Birdman076 said is make a clean store script that transfers items to a traveling merchant useing the nwnDB wich im having problems with.  perhaps its the blurry eyed state i’m in buy the time RL gives me a break.

Any help, ideas would be wonderful.  
Thanks again funky for “Third, and most importantly, however, is that I'm still not sure what it is you're trying to accomplish here. This is a common problem when you ask how to code something before you ask what it is you should code.'<img'>”

I’m not the best at articulating some times.
               
               

               


                     Modifié par Greyfort, 02 janvier 2011 - 09:06 .