Full Version : Npc Saves
xmlspawner >>Q&A >>Npc Saves


<< Prev | Next >>

Hands Of God- 03-15-2010
How do i change where the .npc files save.
I found the line of code that's doing it i just don't know how to change the output location?

CODE

           // Write out the file

           string dirname;

           if (System.IO.Directory.Exists(DefsDir) == true)
           {
               // put it in the defaults directory if it exists
               dirname = String.Format("{0}/{1}.npc", DefsDir, filename);
           }
           else
           {
               // otherwise just put it in the main installation dir
               dirname = String.Format("{0}.npc", filename);
           }

           // check to see if the file already exists

           if (System.IO.File.Exists(dirname) == true)
           {
               // prompt the user to save over it
               if (from != null)
               {
                   from.SendGump(new ConfirmSaveGump(this, ds, dirname, filename, updateconfig));
               }
           }
           else
           {

               SaveFile(from, ds, dirname, filename, updateconfig);
           }
       }



Any help would be great.