|
@@ -7,7 +7,6 @@ rem EXEUPDATE Will update, EXE files. 1 for on, anything else for off.
|
|
|
rem LUAUPDATE Will update, LUA files. 1 for on, anything else for off.
|
|
|
rem MAPUPDATE Will update, MAP files. 1 for on, anything else for off.
|
|
|
rem SENDBUGS Will send your bug reports to an offsite server to be reviewed by staff. 1 for on, anything else is off.
|
|
|
-rem STRUCTCHK Will check for new Structs. 1 for on 0 for off. If you have EXE updates enabled this will run automatically.
|
|
|
rem LSUPDATE Will check for new Loginserver updates SQL
|
|
|
|
|
|
SET NAME=Zeklabs.com
|
|
@@ -17,7 +16,6 @@ SET EXEUPDATE=1
|
|
|
SET LUAUPDATE=1
|
|
|
SET MAPUPDATE=1
|
|
|
SET SENDBUGS=1
|
|
|
-SET STRUCTCHK=1
|
|
|
SET LSUPDATE=1
|
|
|
|
|
|
rem Some people have older version of this script, and are missing options.bat so lets be sure they get it no matter what option is selected.
|
|
@@ -28,7 +26,13 @@ wget -q -N --no-check-certificate https://www.zeklabs.com/dl/Options.bat
|
|
|
echo [Completed Option.bat Update]
|
|
|
echo
|
|
|
|
|
|
+rem check if first run, if it is deal with it
|
|
|
+SET FIRSTRUN=0
|
|
|
+if not exist options\ranonce.txt SET FIRSTRUN=1
|
|
|
+
|
|
|
if /I "%SQLUPDATE%" EQU "1" powershell write-host -fore Red ******** SETTING SQLUPDATE = 1 WILL ERASE ALL DATA IN THE DATABASE use 2 TO SAVE CHARACTERS/GUILDS ************
|
|
|
+if /I "%SQLUPDATE%" EQU "1" powershell write-host -fore Red ******** Pausing for 10 seconds. If you wish to cancel press CTL-C NOW!! ************
|
|
|
+if /I "%SQLUPDATE%" EQU "1" timeout /t 10
|
|
|
if /I "%SQLUPDATE%" EQU "1" echo [Checking for SQL Full Update and Downloading]
|
|
|
if /I "%SQLUPDATE%" EQU "1" wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://zeklabs.com/dl/eq2emudb.rar
|
|
|
if /I "%SQLUPDATE%" EQU "1" unrar x -y -inul eq2emudb.rar
|
|
@@ -118,8 +122,9 @@ cd ..\..
|
|
|
if /I "%LSUPDATE%" EQU "1" echo [Updating LoginServer SQL]
|
|
|
if /I "%LSUPDATE%" EQU "1" cd server
|
|
|
if /I "%LSUPDATE%" EQU "1" mkdir oldfiles
|
|
|
-if /I "%LSUPDATE%" EQU "1" echo [Saving Character Data before Import]
|
|
|
+if /I "%LSUPDATE%" EQU "1" echo [Saving Character and World Data before Import]
|
|
|
if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysqldump -ueq2emu -peq2emu eq2ls login_characters > lschars.sql
|
|
|
+if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysqldump -ueq2emu -peq2emu eq2ls login_worldservers >> lschars.sql
|
|
|
if /I "%LSUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emulssql.rar
|
|
|
if /I "%LSUPDATE%" EQU "1" ..\unrar x -y -inul eq2emulssql.rar
|
|
|
if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysql -ueq2emu -peq2emu --database=eq2emu < eq2emulssql.sql
|
|
@@ -151,6 +156,8 @@ if /I "%SQLUPDATE%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2
|
|
|
if /I "%SQLUPDATE%" EQU "1" cd ..\..
|
|
|
if /I "%SQLUPDATE%" EQU "1" del eq2emudb.rar
|
|
|
if /I "%SQLUPDATE%" EQU "1" del eq2emu.sql
|
|
|
+if /I "%SQLUPDATE%" EQU "1" SET FIRSTRUN=1
|
|
|
+if /I "%SQLUPDATE%" EQU "1" echo [Flag set to import default LS/Characters]
|
|
|
if /I "%SQLUPDATE%" EQU "1" echo [Completed Full DB Update]
|
|
|
|
|
|
if /I "%SQLUPDATE%" EQU "2" echo [Importing Partial DB Update]
|
|
@@ -161,8 +168,17 @@ if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.rar
|
|
|
if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.sql
|
|
|
if /I "%SQLUPDATE%" EQU "2" echo [Completed Partial DB Update]
|
|
|
|
|
|
+if /I "%FIRSTRUN%" EQU "1" echo [Inserting Starter Admin Account]
|
|
|
+if /I "%FIRSTRUN%" EQU "1" cd mariadb\bin\
|
|
|
+if /I "%FIRSTRUN%" EQU "1" ..\..\wget -q --no-check-certificate https://www.zeklabs.com/dl/eq2emu-account-insert.sql
|
|
|
+if /I "%FIRSTRUN%" EQU "1" mysql -ueq2emu -peq2emu <eq2emu-account-insert.sql
|
|
|
+if /I "%FIRSTRUN%" EQU "1" del /f /q eq2emu-account-insert.sql
|
|
|
+if /I "%FIRSTRUN%" EQU "1" cd ..\..
|
|
|
+if /I "%FIRSTRUN%" EQU "1" echo [Starter Account Inserted. Username: eq2emu Password: eq2emu Character: Eqtwoemu]
|
|
|
+if /I "%FIRSTRUN%" EQU "1" echo [Starter Account Inserted. Username: eq2emu Password: eq2emu Character: Eqtwoemu] > options\ranonce.txt
|
|
|
+
|
|
|
echo [Starting World And Login]
|
|
|
start srvls.bat
|
|
|
start srvwrld.bat
|
|
|
|
|
|
-exit
|
|
|
+exit
|