Jump to content

Gregarious

Members
  • Posts

    18
  • Joined

  • Last visited

About Gregarious

  • Birthday 01/01/1983

Profile Information

  • Gender
    Male

Gregarious's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I made this batch initially for Trinity, but I'm here to convert it to Skyfire so it might be useful to someone else. New Skyfire revisions will frequently come with new .sql updates in the \sql\updates directory that need to be imported in order to keep your DB up to date. This batch file will merge all of those .sql queries into 3 simple files: All_Auth_Updates.sqlAll_Characters_Updates.sqlAll_World_Updates.sql Combining numerous .sql files into only 3 will make importing these new updates much simpler. Also, this batch script will take into consideration the order in which new .sql updates need to be imported as well, judging by the file date and post-fix. Furthermore, I've included some formatting so that the single combined SQL file lists the file name before it outputs the SQL contents (click on the "Example output" links to see how it looks). For Windows: Copy/paste the below source into a new Notepad++ file and save it as "gather updates.bat" (without quotes of course, and whatever you'd like to call it)Drop it into your main SkyFireEMU source directory.After each Skyfire update that you do, double-click this .bat file to merge the new .SQL queries into 3 organized .SQL files to easily import them into your auth/characters/world databases.Put this in your root SkyFireEMU folder: Example output Alternate Method: If you want to combine all the .sql files in any folder on your hard drive, put the below code into a batch file as explained above and toss it into the folder where all the .sql files are stored. It will grab every .sql file it sees (except for files in recursive directories - see code to change this option) and combine it into a "_MERGED.sql" file (the underscore ensures that the resulting file is at the top of a potentially long list of files). This also shows another method of formatting the text shown between each merged file, and you can pick which one you like best: Put this in any folder with .sql files to merge them all: Example output For Linux: cd into your sql/updates directory and choose one of these options: To combine all updates: cat world/*.sql > all_world_updates.sql cat characters/*.sql > all_characters_updates.sql To combine all updates and immediately import them into your database (remember to use your own username, password, and database names): for file in world/*.sql; do mysql -u USERNAME -pPASSWORD --database=world < $file; done for file in characters/*.sql; do mysql -u USERNAME -pPASSWORD --database=characters < $file; done Don't forget to √ Like This post if it helps!
  2. An offline mode would allow us to write a script that has a "Show script" button so we can save it for later. Another scenario is if you want someone to work on a smart_script and you don't want to give them access to your DB. +1 Offline mode
  3. Pyro, are you nuts? Get this awesome program posted on the Trinity forums! For the rest of you, get off your lazy finger and + rep this guy!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.