LAUNCH EQ2EMU.bat 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. SET NAME=Zeklabs.com
  12. TITLE %NAME%
  13. SET SQLUPDATE=1
  14. SET EXEUPDATE=1
  15. SET LUAUPDATE=1
  16. SET MAPUPDATE=1
  17. SET SENDBUGS=1
  18. SET STRUCTCHK=1
  19. 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 ************
  20. if /I "%SQLUPDATE%" EQU "1" echo [Checking for SQL Full Update and Downloading]
  21. if /I "%SQLUPDATE%" EQU "1" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emudb.rar
  22. if /I "%SQLUPDATE%" EQU "1" unrar x -y -inul eq2emudb.rar
  23. if /I "%SQLUPDATE%" EQU "1" echo [Completed Download of SQL Full Update]
  24. if /I "%SQLUPDATE%" EQU "2" echo [Checking for SQL Update and Downloading]
  25. if /I "%SQLUPDATE%" EQU "2" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2dbupdate.rar
  26. if /I "%SQLUPDATE%" EQU "2" unrar x -y -inul eq2dbupdate.rar
  27. if /I "%SQLUPDATE%" EQU "2" echo [Completed Download of SQL Update]
  28. if /I "%EXEUPDATE%" EQU "1" echo [Checking for EXE Updates]
  29. if /I "%EXEUPDATE%" EQU "1" cd server
  30. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2Login__Debug64.exe
  31. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2World__Debug_x64.exe
  32. if /I "%EXEUPDATE%" EQU "1" echo [New EXE Could Mean NEW Structs. Checking...]
  33. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
  34. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
  35. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
  36. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
  37. if /I "%EXEUPDATE%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
  38. if /I "%EXEUPDATE%" EQU "1" echo [Completed Struct Updates]
  39. if /I "%EXEUPDATE%" EQU "1" echo [Completed EXE Updates]
  40. if /I "%EXEUPDATE%" EQU "1" cd ..
  41. if /I "%STRUCTCHK%" EQU "1" echo [Checking for Struct Updates]
  42. if /I "%STRUCTCHK%" EQU "1" cd server
  43. if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/SpawnStructs.xml
  44. if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/WorldStructs.xml
  45. if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/EQ2_Structs.xml
  46. if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/ItemStructs.xml
  47. if /I "%STRUCTCHK%" EQU "1" wget -q -nc http://cutpon.com:3000/devn00b/EQ2EMu/raw/master/server/LoginStructs.xml
  48. if /I "%STRUCTCHK%" EQU "1" cd ..
  49. if /I "%STRUCTCHK%" EQU "1" echo [Competed Struct Updates]
  50. if /I "%LUAUPDATE%" EQU "1" echo [Checking for LUA Updates]
  51. if /I "%LUAUPDATE%" EQU "1" echo [This will take a moment due to number of files]
  52. if /I "%LUAUPDATE%" EQU "1" cd server
  53. if /I "%LUAUPDATE%" EQU "1" wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emulua.rar
  54. if /I "%LUAUPDATE%" EQU "1" ..\unrar x -y -inul eq2emulua.rar
  55. if /I "%LUAUPDATE%" EQU "1" del eq2emulua.rar
  56. if /I "%LUAUPDATE%" EQU "1" echo [Completed LUA Updates]
  57. if /I "%LUAUPDATE%" EQU "1" cd ..
  58. if /I "%MAPUPDATE%" EQU "1" echo [Checking for MAP Updates]
  59. if /I "%MAPUPDATE%" EQU "1" echo [This will take a moment due to LARGE map size]
  60. if /I "%MAPUPDATE%" EQU "1" cd server
  61. if /I "%MAPUPDATE%" EQU "1" ..\wget -q -N --no-check-certificate https://zeklabs.com/dl/eq2emumaps.rar
  62. if /I "%MAPUPDATE%" EQU "1" ..\unrar x -y -inul eq2emumaps.rar
  63. if /I "%MAPUPDATE%" EQU "1" del eq2emumaps.rar
  64. if /I "%MAPUPDATE%" EQU "1" echo [Completed MAP Updates]
  65. if /I "%MAPUPDATE%" EQU "1" cd ..
  66. echo [Loading MariaDB]
  67. cd mariadb\bin
  68. start db.bat
  69. echo [You Can Press Any Key To Continue Once MYSQL has Completed Loading]
  70. timeout /t 60
  71. echo [MariaDB Loaded]
  72. cd ..\..
  73. if /I "%SENDBUGS%" EQU "1" echo [Uploading BUG Reports to Devn00b]
  74. if /I "%SENDBUGS%" EQU "1" cd mariadb\bin\
  75. 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
  76. if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -pidontgive2shits --host=eq2db.devn00b.com --database=eq2emu <bugs.sql
  77. if /I "%SENDBUGS%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu < options\clearbugs.sql
  78. if /I "%SENDBUGS%" EQU "1" del bugs.sql
  79. if /I "%SENDBUGS%" EQU "1" echo [Completed BUG Report Upload. Thank You.]
  80. if /I "%SENDBUGS%" EQU "1" cd ..\..
  81. if /I "%SQLUPDATE%" EQU "1" echo [Importing Full DB Update]
  82. if /I "%SQLUPDATE%" EQU "1" cd mariadb\bin\
  83. if /I "%SQLUPDATE%" EQU "1" echo [Deleting Character and Guild Info]
  84. if /I "%SQLUPDATE%" EQU "1" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2emu.sql
  85. if /I "%SQLUPDATE%" EQU "1" cd ..\..
  86. if /I "%SQLUPDATE%" EQU "1" del eq2emudb.rar
  87. if /I "%SQLUPDATE%" EQU "1" del eq2emu.sql
  88. if /I "%SQLUPDATE%" EQU "1" echo [Completed Full DB Update]
  89. if /I "%SQLUPDATE%" EQU "2" echo [Importing Partial DB Update]
  90. if /I "%SQLUPDATE%" EQU "2" cd mariadb\bin\
  91. if /I "%SQLUPDATE%" EQU "2" mysql -ueq2emu -peq2emu --database=eq2emu <..\..\eq2dbupdate.sql
  92. if /I "%SQLUPDATE%" EQU "2" cd ..\..
  93. if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.rar
  94. if /I "%SQLUPDATE%" EQU "2" del eq2dbupdate.sql
  95. if /I "%SQLUPDATE%" EQU "2" echo [Completed Partial DB Update]
  96. echo [Starting World And Login]
  97. start srvls.bat
  98. start srvwrld.bat
  99. exit