123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- @echo off
- rem The following are the variables used, what they do, and the settings available.
- rem All settings on by default.
- rem SQLUPDATE Will update, the EQ2Emu World DB. 1 for on, 2 for updates only. anything else for off.
- rem ******** SETTING SQLUPDATE = 1 WILL ERASE ALL DATA IN THE DATABASE use 2 TO SAVE CHARACTERS/GUILDS ************
- 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.
- SET NAME=Zeklabs.com
- TITLE %NAME%
- SET SQLUPDATE=1
- SET EXEUPDATE=1
- SET LUAUPDATE=1
- SET MAPUPDATE=1
- SET SENDBUGS=1
- SET STRUCTCHK=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" echo [Checking for SQL Full Update and Downloading]
- if /I "%SQLUPDATE%" EQU "1" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emudb.rar
- if /I "%SQLUPDATE%" EQU "1" unrar x -y -inul eq2emudb.rar
- if /I "%SQLUPDATE%" EQU "1" echo [Completed Download of SQL Full Update]
- if /I "%SQLUPDATE%" EQU "2" echo [Checking for SQL Update and Downloading]
- if /I "%SQLUPDATE%" EQU "2" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2dbupdate.rar
- if /I "%SQLUPDATE%" EQU "2" unrar x -y -inul eq2dbupdate.rar
- if /I "%SQLUPDATE%" EQU "2" echo [Completed Download of SQL Update]
- if /I "%EXEUPDATE%" EQU "1" echo [Checking for EXE Updates]
- if /I "%EXEUPDATE%" EQU "1" cd server
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2Login__Debug64.exe
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2World__Debug_x64.exe
- if /I "%EXEUPDATE%" EQU "1" echo [New EXE Could Mean NEW Structs. Checking...]
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
- if /I "%EXEUPDATE%" EQU "1" echo [Completed Struct Updates]
- if /I "%EXEUPDATE%" EQU "1" echo [Completed EXE Updates]
- if /I "%EXEUPDATE%" EQU "1" cd ..
- if /I "%STRUCTCHK%" EQU "1" echo [Checking for Struct Updates]
- if /I "%STRUCTCHK%" EQU "1" cd server
- if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
- if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
- if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
- if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
- if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
- if /I "%STRUCTCHK%" EQU "1" cd ..
- if /I "%STRUCTCHK%" EQU "1" echo [Competed Struct Updates]
- if /I "%LUAUPDATE%" EQU "1" echo [Checking for LUA Updates]
- if /I "%LUAUPDATE%" EQU "1" echo [This will take a moment due to number of files]
- if /I "%LUAUPDATE%" EQU "1" cd server
- if /I "%LUAUPDATE%" EQU "1" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emulua.rar
- if /I "%LUAUPDATE%" EQU "1" ..\unrar x -y -inul eq2emulua.rar
- if /I "%LUAUPDATE%" EQU "1" del eq2emulua.rar
- if /I "%LUAUPDATE%" EQU "1" echo [Completed LUA Updates]
- if /I "%LUAUPDATE%" EQU "1" cd ..
- if /I "%MAPUPDATE%" EQU "1" echo [Checking for MAP Updates]
- if /I "%MAPUPDATE%" EQU "1" echo [This will take a moment due to LARGE map size]
- if /I "%MAPUPDATE%" EQU "1" cd server
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emumaps.rar
- if /I "%MAPUPDATE%" EQU "1" ..\unrar x -y -inul eq2emumaps.rar
- if /I "%MAPUPDATE%" EQU "1" del eq2emumaps.rar
- if /I "%MAPUPDATE%" EQU "1" echo [Completed MAP Updates]
- if /I "%MAPUPDATE%" EQU "1" cd ..
- echo [Loading MariaDB]
- cd mariadb\bin
- start db.bat
- echo [You Can Press Any Key To Continue Once MYSQL has Completed Loading]
- timeout /t 60
- echo [MariaDB Loaded]
- cd ..\..
- if /I "%SENDBUGS%" EQU "1" echo [Uploading BUG Reports to Devn00b]
- if /I "%SENDBUGS%" EQU "1" cd mariadb\bin\
- if /I "%SENDBUGS%" EQU "1" mysqldump -ueq2emu -peq2emu --no-create-db --no-create-info --complete-insert --skip-add-locks --skip-add-drop-table --skip-comments --compact eq2emu bugs >bugs.sql
- if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -pidontgive2shits --host=eq2db.devn00b.com --database=eq2emu <bugs.sql
- if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu < options\clearbugs.sql
- if /I "%SENDBUGS%" EQU "1" del bugs.sql
- if /I "%SENDBUGS%" EQU "1" echo [Completed BUG Report Upload. Thank You.]
- if /I "%SENDBUGS%" EQU "1" cd ..\..
- if /I "%SQLUPDATE%" EQU "1" echo [Importing Full DB Update]
- if /I "%SQLUPDATE%" EQU "1" cd mariadb\bin\
- if /I "%SQLUPDATE%" EQU "1" echo [Deleting Character and Guild Info]
- if /I "%SQLUPDATE%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2emu.sql
- 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" echo [Completed Full DB Update]
- if /I "%SQLUPDATE%" EQU "2" echo [Importing Partial DB Update]
- if /I "%SQLUPDATE%" EQU "2" cd mariadb\bin\
- if /I "%SQLUPDATE%" EQU "2" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2dbupdate.sql
- if /I "%SQLUPDATE%" EQU "2" cd ..\..
- 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]
- echo [Starting World And Login]
- start srvls.bat
- start srvwrld.bat
- exit
|