123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- @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 LSUPDATE Will check for new Loginserver updates SQL
- SET NAME=Zeklabs.com
- TITLE %NAME%
- SET SQLUPDATE=1
- SET EXEUPDATE=1
- SET LUAUPDATE=1
- SET MAPUPDATE=1
- SET SENDBUGS=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.
- rem On each load delete options.bat and re-download it.
- powershell write-host -fore Blue [Making sure you have an updated Options.bat]
- move options.bat options.old
- 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
- if /I "%SQLUPDATE%" EQU "1" del 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 --show-progress --progress=bar:force:noscroll https://zeklabs.com/dl/eq2dbupdate.rar
- if /I "%SQLUPDATE%" EQU "2" unrar x -y -inul eq2dbupdate.rar
- if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.rar
- if /I "%SQLUPDATE%" EQU "2" echo [Completed Download of SQL Update]
- if /I "%EXEUPDATE%" EQU "1" echo [Checking for EXE Updates. **NOTE** If something goes wrong, backups files can be found in the oldfiles folder]
- if /I "%EXEUPDATE%" EQU "1" cd server
- if /I "%EXEUPDATE%" EQU "1" mkdir oldfiles
- if /I "%EXEUPDATE%" EQU "1" move eq2*.exe oldfiles
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2Login__Debug64.exe
- if /I "%EXEUPDATE%" EQU "1" wget -q 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" move SpawnStructs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" move WorldStructs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" move EQ2_Structs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" move ItemStructs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" move LoginStructs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" move CommonStructs.xml oldfiles/
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
- if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/CommonStructs.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 "%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 --show-progress --progress=bar:force:noscroll 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 LONG time. The maps are 2+ GB in size.]
- if /I "%MAPUPDATE%" EQU "1" cd server
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part01.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part02.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part03.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part04.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part05.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part06.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part07.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part08.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part09.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part10.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part11.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part12.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part13.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part14.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part15.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part16.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part17.rar
- if /I "%MAPUPDATE%" EQU "1" echo [Any downloads below here means NEW maps!]
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part18.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part19.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part20.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part21.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part22.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part23.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part24.rar
- if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://github.com/devn00b/EQ2EMu-Maps/raw/master/eq2emumaps.part25.rar
- if /I "%MAPUPDATE%" EQU "1" ..\unrar x -o+ -inul eq2emumaps*.rar
- if /I "%MAPUPDATE%" EQU "1" del /f /q eq2emumaps*.rar
- if /I "%MAPUPDATE%" EQU "1" echo [Completed MAP Updates]
- if /I "%MAPUPDATE%" EQU "1" cd ..
- echo [Loading MariaDB]
- if /I "%FIRSTRUN%" EQU "1" wget -q --no-check-certificate https://www.zeklabs.com/dl/startdb.bat
- start startdb.bat
- echo [You Can Press Any Key To Continue Once MYSQL has Completed Loading]
- timeout /t 60
- echo [MariaDB Loaded]
- 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 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
- if /I "%LSUPDATE%" EQU "1" echo [Importing old character data (if any)]
- if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysql -ueq2emu -peq2emu --database=eq2ls <lschars.sql
- if /I "%LSUPDATE%" EQU "1" echo [Characters Backported to DB]
- if /I "%LSUPDATE%" EQU "1" echo [Making sure opcode table is correct]
- if /I "%LSUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate https://zeklabs.com/dl/ls.sql
- if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysql -ueq2emu -peq2emu --database=eq2ls <ls.sql
- if /I "%LSUPDATE%" EQU "1" del /f /q lschars.sql
- if /I "%LSUPDATE%" EQU "1" del /f /q ls.sql
- if /I "%LSUPDATE%" EQU "1" move eq2emuls* oldfiles/
- if /I "%LSUPDATE%" EQU "1" echo [Completed Updating LoginServer SQL]
- if /I "%LSUPDATE%" EQU "1" 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" 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]
- 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]
- 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
|