-
Notifications
You must be signed in to change notification settings - Fork 1
/
JGSL.bat
349 lines (334 loc) · 15.2 KB
/
JGSL.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
::[Bat To Exe Converter]
::
::fBE1pAF6MU+EWHreyHcjLQlHcBODMmy2A7wgzO3o5P6IsnE6XfY3bY3n8L2DB+Ud+U3te6UoxGxfiucNGRVbdhe5UiUTmkJ+umWLMPuZvTD0WQaF50U3ew==
::fBE1pAF6MU+EWHreyHcjLQlHcBODMmy2A7wgzO3o5P6IsnE6XfY3bY3n8L2DB+Ud+U3te6UoxGxfiucNGRVbdhe5UiUTmkJ+umWLMPuGuzDiRAaF50U3ew==
::YAwzoRdxOk+EWAjk
::fBw5plQjdCyDJGyX8VAjFAxVQgOOOWKGIrAP4/z0/9agq1kVQeADUobW/bGAM+ga5HbhZ4AoxFZbjcUPBB5KQjulegozu29Wik2GOPuashnoSUeHqEIzFAU=
::YAwzuBVtJxjWCl3EqQJgSA==
::ZR4luwNxJguZRRnk
::Yhs/ulQjdF+5
::cxAkpRVqdFKZSjk=
::cBs/ulQjdF+5
::ZR41oxFsdFKZSDk=
::eBoioBt6dFKZSTk=
::cRo6pxp7LAbNWATEpSI=
::egkzugNsPRvcWATEpCI=
::dAsiuh18IRvcCxnZtBJQ
::cRYluBh/LU+EWAnk
::YxY4rhs+aU+IeA==
::cxY6rQJ7JhzQF1fEqQJhZksaHErSXA==
::ZQ05rAF9IBncCkqN+0xwdVsFAlTMbAs=
::ZQ05rAF9IAHYFVzEqQIaIRZzSQqRNGK0NbAO/u3pw+uSrE4VUfBf
::eg0/rx1wNQPfEVWB+kM9LVsJDC6LMUy/CKYU4ebI6viRp18xVfcxe4feyNQ=
::fBEirQZwNQPfEVWB+kM9LVsJDC6LMUy/CKYU4ebI6viRp18xVfcxe4feyNQ=
::cRolqwZ3JBvQF1fEqQIaIRZzSQqRNGK0NbAO/u3pw+uSrE4VUfBf
::dhA7uBVwLU+EWPtNxVsqaEkEHlDi
::YQ03rBFzNR3SWATEVosBMQEUHlTQaAs=
::dhAmsQZ3MwfNWATEVosBMQEUHlTQaAs=
::ZQ0/vhVqMQ3MEVWAtB9witJlVR7CbjvoUtU=
::Zg8zqx1/OA3MEVWAtB9witJlVR7CbjvoUtU=
::dhA7pRFwIByZRRkCA4JQ
::Zh4grVQjdCyDJGyX8VAjFAxVQgOOOWKGIrAP4/z0/9agq1kVQeADUobW/bGAM+ga5HbhZ4AoxFZbjcUPBB5KQjulegozu29WikaMOfu2ugLGT0aa7kI+KGBmkWbCoCoubtBgn9FN1ji7nA==
::YB416Ek+Zm8=
::
::
::978f952a14a936cc963da21a135fa983
:restart
@echo off & setlocal enabledelayedexpansion
cls & color 27 & chcp 65001 >nul
set JGSL=%cd%\JGSL
set config=%JGSL%\.config
set lang_folder=%JGSL%\lang
set Api.Github=https://api.github.com/repos/Qianyiaz/JimGenshinServerLauncher/releases/latest
set tempfile=%JGSL%\github.json
move "zh_cn.lang" "%lang_folder%"
move "en_us.lang" "%lang_folder%"
Title %ys-44%
curl -s -o "%tempfile%" %Api.Github%
if %errorlevel% neq 0 (
goto lang
)
for /f "tokens=2 delims=:, " %%B in ('type "%tempfile%" ^| findstr /i "tag_name"') do (
set l=%%B
set l=!l:"=!
)
for /f "tokens=2* delims=: " %%C in ('findstr /i "browser_download_url" "%tempfile%"') do (
set "download_url=%%D"
set "download_url=!download_url:"=!"
)
del %tempfile%
for /f "tokens=1,2,3 delims=." %%a in ("%Version%") do (
set /a C_M=%%a
set /a C_M=%%b
set /a C_P=%%c
)
for /f "tokens=1,2,3 delims=." %%a in ("%l%") do (
set /a L_M=%%a
set /a L_M=%%b
set /a L_P=%%c
)
if !L_M! gtr !C_M! (
goto Download
) else if !L_M! equ !C_M! (
if !L_M! gtr !C_M! (
goto Download
) else if !L_M! equ !C_M! (
if !L_P! gtr !C_P! (
goto Download
)
)
)
:lang
set "content="
for /f "usebackq delims=" %%A in ("%config%") do ( set "content=!content!%%A")
echo !content! | find /i "lang" > nul
if errorlevel 1 (
:cl
cls
(
mkdir "%JGSL%"
mkdir "%lang_folder%"
move "zh_cn.lang" "%lang_folder%"
move "en_us.lang" "%lang_folder%"
) >>nul 2>&1
Color 08
type nul > %config%
(
echo Version=1.0.0
echo Count=0
) >> %config%
echo.
echo Please choose your language:
echo [1] Chinese-s
echo [2] English
echo.
set /p langn="Enter your choice: "
if "%langn%"=="1" (
set "selected_lang=zh_cn"
echo Lang=zh_cn>> "%config%"
) else if "%langn%"=="2" (
set "selected_lang=en_us"
echo Lang=en_us>> "%config%"
) else (
echo Invalid choice. Please try again.
timeout /t 2 > nul
goto cl
)
)
for /f "tokens=1,* delims==" %%a in (%config%) do ( set "%%a=%%b")
for /f "tokens=1,* delims==" %%a in (%lang_folder%\%Lang%.lang) do ( set "%%a=%%b")
title %ys-1%
echo %ys-2%
echo %ys-3%
if not exist "..\genshin impact game\genshinimpact.exe" (
if not exist .\原神路径配置文件_иЇ·е‹їдї®ж”№ж€–е€ й™?txt (
goto :errorgameunfind
)
)
if exist .\原神路径配置文件_иЇ·е‹їдї®ж”№ж€–е€ й™?txt (
set /p game=<.\原神路径配置文件_иЇ·е‹їдї®ж”№ж€–е€ й™?txt
goto :cfg
)
set game=..\"genshin impact game"\genshinimpact.exe
:cfg
echo %ys-4%
echo %ys-5%
ver
echo %ys-6%~dp0
echo %ys-7%
echo в–Ѓв–‚в–ѓв–„в–…в–†в–‡в–€в–‰в–Љв–‹в–Њв–Ќв–Ћв–??в–?
echo ??
echo ABCDEFGHIJKLMNOPQRSTUVWXYZ
echo ,./;:'"\|[{]}-_=+`~/*!@#$%^&*()
timeout 3 > nul
cls
title %ys-8%
echo ------------------------------
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo в–€в–€в–?
echo в–€в–€в–€в–€
echo в–€в–€в–€в–€
echo в–? в–? в–€в–€в–€в–€в–?
echo в–€в–€ в–€в–€ в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€ в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–? в–€в–€ в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€в–? в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–?
echo в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–?в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€
echo в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€в–€в–€в–€в–€
echo в–? в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€ в–€в–€в–? в–€в–€в–€в–€в–? в–€в–€в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€ в–€в–€в–€в–€ в–€в–€в–€в–€в–€в–€
echo в–€в–€ в–€в–€ в–€в–€в–€в–€в–€в–€
echo в–€в–€в–€в–€
echo в–€в–€в–€в–€
echo в–€в–€в–€в–€
echo в–€в–€в–?
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo в–€в–€
echo %ys-9%
echo %ys-10%%date%
echo %ys-11%%time%
echo %ys-12%
echo %ys-13%
echo %ys-14%
echo %ys-15%
echo %ys-16%
pause > nul
cls
title %ys-17%
echo %ys-18%
for /f "tokens=2,4,5" %%a in ('netstat -ano^|find /i ":27017 "') do (
if not "%%c"=="" (
set pid=%%c
) else (
set pid=%%b
)
)
for /f "tokens=1" %%a in ('tasklist /fi "pid eq %pid%"') do set prog=%%a
echo %ys-19%%port%
echo %ys-20%%pid%
echo %ys-21%%prog%
echo %ys-22%
taskkill /f /fi "pid eq %pid%"
echo %ys-23%
echo %ys-16%
cd ж•°жЌ®еє?
echo %ys-24%
start /min mongod.exe --dbpath data --port 27017
echo %ys-25%
cd ..
cd %ys-26%
echo %ys-16%
echo %ys-27%
start 指令和代理工�exe
echo %ys-28%
cd ..
echo %ys-16%
echo %ys-29%
for /f "tokens=2,4,5" %%a in ('netstat -ano^|find /i ":443 "') do (
if not "%%c"=="" (
set pid=%%c
) else (
set pid=%%b
)
)
for /f "tokens=1" %%a in ('tasklist /fi "pid eq %pid%"') do set prog=%%a
echo %ys-19%%port%
echo %ys-20%%pid%
echo %ys-21%%prog%
echo %ys-22%
taskkill /f /fi "pid eq %pid%"
echo %ys-29%
echo %ys-16%
echo %ys-30%
for /f "tokens=2,4,5" %%a in ('netstat -ano^|find /i ":22101 "') do (
if not "%%c"=="" (
set pid=%%c
) else (
set pid=%%b
)
)
for /f "tokens=1" %%a in ('tasklist /fi "pid eq %pid%"') do set prog=%%a
echo %ys-19%%port%
echo %ys-20%%pid%
echo %ys-21%%prog%
echo %ys-22%
taskkill /f /fi "pid eq %pid%"
echo %ys-30%
echo %ys-16%
cd е‰ІиЌ‰жњ?
echo %ys-31%
timeout 3 >nul
start /high ..\иїђиЎЊзЋЇеўѓ\bin\java.exe -jar е‰ІиЌ‰жњєж ёеї?jar
echo %ys-32%
echo %ys-16%
cd ..
color 17
title %ys-33%
echo %ys-34%
echo %ys-16%
start /high /wait %game%
set select1=y
cls
echo. & set /p select1="%ys-35%"
cls
echo %ys-16%
if \"%select1%\"==\"y\" (
color 67
title %ys-36%
echo %ys-37%
taskkill /im 指令和代理工�exe /t /f
echo %ys-38%
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
echo %ys-39%
taskkill /im java.exe /t /f
echo %ys-40%
taskkill /im mongod.exe /t /f
if \"%select1%\"==\"n\" (
color 67
title %ys-41%
echo %ys-42%
exit
)
echo %ys-43%
echo %ys-16%
timeout 3 > nul
exit
:errorgameunfind
cls
color 47
title Error Occurred: Game Not Found
set select2=1
echo %ys-16%
echo An error occurred that cannot be processed automatically, JGSL cannot continue running.
echo Error: Game Not Found
echo Error Code: error_game_unfind(0x0001)
echo If you seek assistance, please provide the above information to the technician.
echo This may be due to an incorrect installation path or the game executable being renamed. The following actions may help resolve this issue:
echo 1. Ensure that JGSL's main folder (jimgenshinserverlauncher) and the main folder of Genshin Impact (genshin impact game) are in the same directory.
echo 2. Ensure that the main folder of Genshin Impact (genshin impact game) contains the game's executable (genshinimpact.exe).
echo 3. You can also manually specify the location of the game's executable.
echo ------------------------------
echo.&set /p select2=You can now enter “e�to exit JGSL or input the path to the game's executable. Please note that folders with spaces should be enclosed in double quotes, for example, “d:\program files\genshin impact game\genshinimpact.exe�
echo ------------------------------
if "%select2%"=="e" exit
if "%select2%"=="e" exit
echo %select2% > .\原神路径配置文件_иЇ·е‹їдї®ж”№ж€–е€ й™?txt
color 67
title Restarting
echo Successfully set "%select2%" as the path to the game's executable, JGSL will automatically restart in 3 seconds!
timeout 3 >nul
goto restart
:Download
powershell Invoke-WebRequest -Uri "https:%download_url%" -OutFile "%JGSL%/JimGenshinServerLauncher.exe"
if %errorlevel% neq 0 (
echo !ys-46!
goto Download
) else (
echo !ys-45!
)
pause
rmdir /s /q "%CF%"
start "" cmd /c "@echo off & del %JGSL% & move "%JGSL%/JimGenshinServerLauncher.exe" "%cd%" & start %cd%/JimGenshinServerLauncher.exe"
exit