LAUNCH EQ2EMU.bat 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. @echo off
  2. rem The following are the variables used, what they do, and the settings available.
  3. rem All settings on by default.
  4. rem SQLUPDATE Will update, the EQ2Emu World DB. 1 for on, 2 for updates only. anything else for off.
  5. rem ******** SETTING SQLUPDATE = 1 WILL ERASE ALL DATA IN THE DATABASE use 2 TO SAVE CHARACTERS/GUILDS ************
  6. rem EXEUPDATE Will update, EXE files. 1 for on, anything else for off.
  7. rem LUAUPDATE Will update, LUA files. 1 for on, anything else for off.
  8. rem MAPUPDATE Will update, MAP files. 1 for on, anything else for off.
  9. rem SENDBUGS Will send your bug reports to an offsite server to be reviewed by staff. 1 for on, anything else is off.
  10. rem STRUCTCHK Will check for new Structs. 1 for on 0 for off. If you have EXE updates enabled this will run automatically.
  11. rem LSUPDATE Will check for new Loginserver updates SQL
  12. SET NAME=Zeklabs.com
  13. TITLE %NAME%
  14. SET SQLUPDATE=1
  15. SET EXEUPDATE=1
  16. SET LUAUPDATE=1
  17. SET MAPUPDATE=1
  18. SET SENDBUGS=1
  19. SET STRUCTCHK=1
  20. SET LSUPDATE=1
  21. 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.
  22. rem On each load delete options.bat and re-download it.
  23. powershell write-host -fore Blue [Making sure you have an updated Options.bat]
  24. move options.bat options.old
  25. wget -q -N --no-check-certificate https://www.zeklabs.com/dl/Options.bat
  26. echo [Completed Option.bat Update]
  27. echo  
  28. 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 ************
  29. if /I "%SQLUPDATE%" EQU "1" echo [Checking for SQL Full Update and Downloading]
  30. if /I "%SQLUPDATE%" EQU "1" wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://zeklabs.com/dl/eq2emudb.rar
  31. if /I "%SQLUPDATE%" EQU "1" unrar x -y -inul eq2emudb.rar
  32. if /I "%SQLUPDATE%" EQU "1" del eq2emudb.rar
  33. if /I "%SQLUPDATE%" EQU "1" echo [Completed Download of SQL Full Update]
  34. if /I "%SQLUPDATE%" EQU "2" echo [Checking for SQL Update and Downloading]
  35. if /I "%SQLUPDATE%" EQU "2" wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://zeklabs.com/dl/eq2dbupdate.rar
  36. if /I "%SQLUPDATE%" EQU "2" unrar x -y -inul eq2dbupdate.rar
  37. if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.rar
  38. if /I "%SQLUPDATE%" EQU "2" echo [Completed Download of SQL Update]
  39. if /I "%EXEUPDATE%" EQU "1" echo [Checking for EXE Updates. **NOTE** If something goes wrong, backups files can be found in the oldfiles folder]
  40. if /I "%EXEUPDATE%" EQU "1" cd server
  41. if /I "%EXEUPDATE%" EQU "1" mkdir oldfiles
  42. if /I "%EXEUPDATE%" EQU "1" move eq2*.exe oldfiles
  43. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2Login__Debug64.exe
  44. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2World__Debug_x64.exe
  45. if /I "%EXEUPDATE%" EQU "1" echo [New EXE Could Mean NEW Structs. Checking...]
  46. if /I "%EXEUPDATE%" EQU "1" move SpawnStructs.xml oldfiles/
  47. if /I "%EXEUPDATE%" EQU "1" move WorldStructs.xml oldfiles/
  48. if /I "%EXEUPDATE%" EQU "1" move EQ2_Structs.xml oldfiles/
  49. if /I "%EXEUPDATE%" EQU "1" move ItemStructs.xml oldfiles/
  50. if /I "%EXEUPDATE%" EQU "1" move LoginStructs.xml oldfiles/
  51. if /I "%EXEUPDATE%" EQU "1" move CommonStructs.xml oldfiles/
  52. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
  53. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
  54. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
  55. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
  56. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
  57. if /I "%EXEUPDATE%" EQU "1" wget -q http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/CommonStructs.xml
  58. if /I "%EXEUPDATE%" EQU "1" echo [Completed Struct Updates]
  59. if /I "%EXEUPDATE%" EQU "1" echo [Completed EXE Updates]
  60. if /I "%EXEUPDATE%" EQU "1" cd ..
  61. if /I "%LUAUPDATE%" EQU "1" echo [Checking for LUA Updates]
  62. if /I "%LUAUPDATE%" EQU "1" echo [This will take a moment due to number of files]
  63. if /I "%LUAUPDATE%" EQU "1" cd server
  64. if /I "%LUAUPDATE%" EQU "1" wget -q -N --no-check-certificate --show-progress --progress=bar:force:noscroll https://zeklabs.com/dl/eq2emulua.rar
  65. if /I "%LUAUPDATE%" EQU "1" ..\unrar x -y -inul eq2emulua.rar
  66. if /I "%LUAUPDATE%" EQU "1" del eq2emulua.rar
  67. if /I "%LUAUPDATE%" EQU "1" echo [Completed LUA Updates]
  68. if /I "%LUAUPDATE%" EQU "1" cd ..
  69. if /I "%MAPUPDATE%" EQU "1" echo [Checking for MAP Updates]
  70. if /I "%MAPUPDATE%" EQU "1" echo [This will take a LONG time. The maps are 2+ GB in size.]
  71. if /I "%MAPUPDATE%" EQU "1" cd server
  72. 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
  73. 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
  74. 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
  75. 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
  76. 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
  77. 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
  78. 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
  79. 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
  80. 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
  81. 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
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. 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
  88. 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
  89. if /I "%MAPUPDATE%" EQU "1" echo [Any downloads below here means NEW maps!]
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. if /I "%MAPUPDATE%" EQU "1" ..\unrar x -o+ -inul eq2emumaps*.rar
  99. if /I "%MAPUPDATE%" EQU "1" del /f /q eq2emumaps*.rar
  100. if /I "%MAPUPDATE%" EQU "1" echo [Completed MAP Updates]
  101. if /I "%MAPUPDATE%" EQU "1" cd ..
  102. echo [Loading MariaDB]
  103. cd mariadb\bin
  104. start db.bat
  105. echo [You Can Press Any Key To Continue Once MYSQL has Completed Loading]
  106. timeout /t 60
  107. echo [MariaDB Loaded]
  108. cd ..\..
  109. if /I "%LSUPDATE%" EQU "1" echo [Updating LoginServer SQL]
  110. if /I "%LSUPDATE%" EQU "1" cd server
  111. if /I "%LSUPDATE%" EQU "1" mkdir oldfiles
  112. if /I "%LSUPDATE%" EQU "1" echo [Saving Character Data before Import]
  113. if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysqldump -ueq2emu -peq2emu eq2ls login_characters > lschars.sql
  114. if /I "%LSUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emulssql.rar
  115. if /I "%LSUPDATE%" EQU "1" ..\unrar x -y -inul eq2emulssql.rar
  116. if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysql -ueq2emu -peq2emu --database=eq2emu < eq2emulssql.sql
  117. if /I "%LSUPDATE%" EQU "1" echo [Importing old character data (if any)]
  118. if /I "%LSUPDATE%" EQU "1" ..\mariadb\bin\mysql -ueq2emu -peq2emu --database=eq2ls <lschars.sql
  119. if /I "%LSUPDATE%" EQU "1" echo [Characters Backported to DB]
  120. if /I "%LSUPDATE%" EQU "1" del /f /q lschars.sql
  121. if /I "%LSUPDATE%" EQU "1" move eq2emuls* oldfiles/
  122. if /I "%LSUPDATE%" EQU "1" echo [Completed Updating LoginServer SQL]
  123. if /I "%LSUPDATE%" EQU "1" cd ..
  124. if /I "%SENDBUGS%" EQU "1" echo [Uploading BUG Reports to Devn00b]
  125. if /I "%SENDBUGS%" EQU "1" cd mariadb\bin\
  126. 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
  127. if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -pidontgive2shits --host=eq2db.devn00b.com --database=eq2emu <bugs.sql
  128. if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu < options\clearbugs.sql
  129. if /I "%SENDBUGS%" EQU "1" del bugs.sql
  130. if /I "%SENDBUGS%" EQU "1" echo [Completed BUG Report Upload. Thank You.]
  131. if /I "%SENDBUGS%" EQU "1" cd ..\..
  132. if /I "%SQLUPDATE%" EQU "1" echo [Importing Full DB Update]
  133. if /I "%SQLUPDATE%" EQU "1" cd mariadb\bin\
  134. if /I "%SQLUPDATE%" EQU "1" echo [Deleting Character and Guild Info]
  135. if /I "%SQLUPDATE%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2emu.sql
  136. if /I "%SQLUPDATE%" EQU "1" cd ..\..
  137. if /I "%SQLUPDATE%" EQU "1" del eq2emudb.rar
  138. if /I "%SQLUPDATE%" EQU "1" del eq2emu.sql
  139. if /I "%SQLUPDATE%" EQU "1" echo [Completed Full DB Update]
  140. if /I "%SQLUPDATE%" EQU "2" echo [Importing Partial DB Update]
  141. if /I "%SQLUPDATE%" EQU "2" cd mariadb\bin\
  142. if /I "%SQLUPDATE%" EQU "2" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2dbupdate.sql
  143. if /I "%SQLUPDATE%" EQU "2" cd ..\..
  144. if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.rar
  145. if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.sql
  146. if /I "%SQLUPDATE%" EQU "2" echo [Completed Partial DB Update]
  147. echo [Starting World And Login]
  148. start srvls.bat
  149. start srvwrld.bat
  150. exit