-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpokemon.bat
508 lines (507 loc) · 17.8 KB
/
pokemon.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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
@echo off
title pokemon
cls
chcp 65001
:start
cls
color a
type logo.txt
echo.
timeout 2 > nul
if exist name.txt goto setname
goto new
:setname
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (name.txt) do set name=%%a
echo Welcome back %name%
timeout 1 > nul
if exist poke.txt goto setpoke
goto pokemon
:new
cls
echo Welcome to pokemon
echo what is your name?
set /p name=
if %name% == "" goto new
echo %name% > name.txt
echo hello %name%
pause
goto pokemon
:setpoke
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (poke.txt) do set poke=%%a
if exist money.txt goto setmoney
goto money
:money
cls
set money=20
echo %money% > money.txt
::ATTRIB +R money.txt
if exist ball.txt goto setball
goto ball
:setmoney
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (money.txt) do set money=%%a
if exist ball.txt goto setball
goto ball
:ball
set ball=5
echo 5 > ball.txt
goto hp
:setball
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (ball.txt) do set ball=%%a
goto hp
:hp
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (hp.txt) do set hp=%%a
if %hp% LSS 0 set /A hp=0
if %hp% == 0 set /A hp=%hp%+50
goto level
:level
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (lv.txt) do set level=%%a
if exist exp.txt goto setexp
goto exp
:exp
cls
set /A exp=0
echo %exp% > exp.txt
goto
:setexp
cls
setlocal DisableDelayedExpansion
for /f "Delims=" %%a in (exp.txt) do set exp=%%a
goto menu
:pokemon
cls
echo.
type poke\Bulbasaur.txt
echo.
type poke\Charmander.txt
echo.
type poke\Pikachu.txt
echo.
type poke\Squirtle.txt
echo.
echo ╔═══════════════════╗
echo ║Choose your pokemon║
echo ╚═══════════════════╝
cmdmenusel f971 "Bulbasaur" "Charmander" "Pikachu" "Squirtle"
if %ERRORLEVEL% == 1 goto bulbasaur
if %ERRORLEVEL% == 2 goto charmander
if %ERRORLEVEL% == 3 goto pikachu
if %ERRORLEVEL% == 4 goto squirtle
:bulbasaur
set poke=1
set hp=45
set level=5
echo %poke% > poke.txt
echo %hp% > hp.txt
echo %level% > lv.txt
echo ╔════════════════════════╗
echo ║you choosed bulbasaur! ║
echo ║now start your adventure║
echo ╚════════════════════════╝
pause
cls
echo try to catch new pokemon
pause
goto menu
:charmander
set poke=2
set hp=39
set /A level=5
echo %hp% > hp.txt
echo %level% > lv.txt
echo %poke% > poke.txt
echo ╔════════════════════════╗
echo ║you choosed charmander! ║
echo ║now start your adventure║
echo ╚════════════════════════╝
pause
cls
echo try to catch new pokemon
goto menu
:pikachu
set /A poke=3
set /A hp=35
set /A level=5
echo %hp% > hp.txt
echo %level% > lv.txt
echo %poke% > poke.txt
echo ╔════════════════════════╗
echo ║you choosed pikachu! ║
echo ║now start your adventure║
echo ╚════════════════════════╝
pause
cls
echo try to catch new pokemon
goto menu
:squirtle
set /A poke=4
set /A hp=44
set /A level=5
echo %hp% > hp.txt
echo %level% > lv.txt
echo %poke% > poke.txt
echo ╔════════════════════════╗
echo ║you choosed squirtle! ║
echo ║now start your adventure║
echo ╚════════════════════════╝
pause
cls
echo try to catch new pokemon
goto menu
:menu
cls
color a
if %poke% == 1 set namepoke=Bulbasaur
if %poke% == 2 set namepoke=Charmander
if %poke% == 3 set namepoke=Pikachu
if %poke% == 4 set namepoke=Squirtle
if %poke% == 5 set namepoke=Golem
if %poke% == 6 set namepoke=Caterpie
echo money:%money%
echo pokeball:%ball%
type house_pokemon.txt
cmdmenusel f971 "open map" "restart game"
if %ERRORLEVEL% == 1 goto map
if %ERRORLEVEL% == 2 goto start
:map
color 0f
if %hp% LSS 0 set /A hp=0
if %hp% == 0 set /A hp=%hp%+50
goto InitSetup
:InitSetup
set Xcoord=3
set Ycoord=3
:DisplaySetup
cls
set X1Y1=
set X1Y2=
set X1Y3=
set X1Y4=
set X1Y5=
set X2Y1=
set X2Y2=
set X2Y3=
set X2Y4=
set X2Y5=
set X3Y1=
set X3Y2=
set X3Y3=
set X3Y4=
set X3Y5=
set X4Y1=
set X4Y2=
set X4Y3=
set X4Y4=
set X4Y5=
set X5Y1=
set X5Y2=
set X5Y3=
set X5Y4=
set X5Y5=
:Display
::??
SET /A r=%RANDOM% * 5 / 32768 + 1
set X%Xcoord%Y%Ycoord%=[]
echo M to exit
echo.
echo.
echo.
echo.
echo ,______________.
echo ^|%X1Y5%^|%X2Y5%^|%X3Y5%^|%X4Y5%^|%X5Y5%^|
echo ^|--^|--^|--^|--^|--^|
echo ^|%X1Y4%^|%X2Y4%^|%X3Y4%^|%X4Y4%^|%X5Y4%^|
echo ^|--^|--^|--^|--^|--^|
echo ^|%X1Y3%^|%X2Y3%^|%X3Y3%^|%X4Y3%^|%X5Y3%^|
echo ^|--^|--^|--^|--^|--^|
echo ^|%X1Y2%^|%X2Y2%^|%X3Y2%^|%X4Y2%^|%X5Y2%^|
echo ^|--^|--^|--^|--^|--^|
echo ^|%X1Y1%^|%X2Y1%^|%X3Y1%^|%X4Y1%^|%X5Y1%^|
echo `______________'
if %r% == 5 goto have
::choice /c wsadm /n
::set direction=%ERRORLEVEL%
::goto direction%direction%
getinput
if %ERRORLEVEL% == 294 goto direction1
if %ERRORLEVEL% == 296 goto direction2
if %ERRORLEVEL% == 293 goto direction3
if %ERRORLEVEL% == 295 goto direction4
if %ERRORLEVEL% == 109 goto direction5
goto DisplaySetup
:direction1
set /A Ycoord=%Ycoord%+1
if %Ycoord% GTR 5 (
set /A Ycoord=%Ycoord%-1
goto DisplaySetup
) ELSE (
goto DisplaySetup
)
:direction2
set /A Ycoord=%Ycoord%-1
if %Ycoord% LSS 1 (
set /A Ycoord=%Ycoord%+1
goto DisplaySetup
) ELSE (
goto DisplaySetup
)
:direction3
set /A Xcoord=%Xcoord%-1
if %Xcoord% LSS 1 (
set /A Xcoord=%Xcoord%+1
goto DisplaySetup
) ELSE (
goto DisplaySetup
)
:direction4
set /A Xcoord=%Xcoord%+1
if %Xcoord% GTR 5 (
set /A Xcoord=%Xcoord%-1
goto DisplaySetup
) ELSE (
goto DisplaySetup
)
:direction5
cls
goto menu
:have
set /A music=%RANDOM% * 3 / 32768 + 1
if %music% == 1 start Music_Battle_gym.vbs & set /A randommusic=1
if %music% == 2 start Music_Battle_Trainer.vbs & set /A randommusic=2
if %music% == 3 start Music_Battle_Wild.vbs & set /A randommusic=3
echo.
echo ╔═══════════════════╗
echo ║ you see a pokemon ║
echo ╚═══════════════════╝
timeout 1 > nul
cls
::set /A music=%RANDOM% * 3 / 32768 + 1
::if %music% == 1 start Music_Battle_gym.vbs & set /A randommusic=1
::if %music% == 2 start Music_Battle_Trainer.vbs & set /A randommusic=2
::if %music% == 3 start Music_Battle_Wild.vbs & set /A randommusic=3
cmdmenusel f971 "attack" "run"
if %ERRORLEVEL% == 1 start click.vbs & goto attack
if %ERRORLEVEL% == 2 start click.vbs & timeout 1 > nul & Taskkill /F /IM wscript.exe > nul & goto map
:attack
cls
SET /A battlerandom=%RANDOM% * 5 / 32768 + 1
set Bulbasaur=1
set Charmander=2
set Pikachu=3
set Squirtle=4
set Golem=5
set Caterpie=6
set /A turn=1
if %poke% == %battlerandom% goto attack
::if %poke% == %Bulbasaur% or if %poke% == %Charmander% or if %poke% == %Pikachu% or if %poke% == %Squirtle% or if %poke% == %Golem% or if %poke% == %Caterpie% goto attack
if %battlerandom% == 1 set /A hpattack=45 & set /A levelattack=5 & set namepokeattack=Bulbasaur & set skill1attack=Solar_Beam & set skill2attack=Protect & set skill3attack=Outrage
if %battlerandom% == 2 set /A hpattack=39 & set /A levelattack=5 & set namepokeattack=Charmander & set skill1attack=Fire_Spin & set skill2attack=Flamethrower & set skill3attack=Outrage
if %battlerandom% == 3 set /A hpattack=35 & set /A levelattack=5 & set namepokeattack=Pikachu & set skill1attack=Thunder & set skill2attack=10,000,000_Volt_Thunderbolt & set skill3attack=Iron_Tail
if %battlerandom% == 4 set /A hpattack=44 & set /A levelattack=5 & set namepokeattack=Squirtle & set skill1attack=ice_punch & set skill2attack=Water_Gun & set skill3attack=Ice_Beam
if %battlerandom% == 5 set /A hpattack=80 & set /A levelattack=5 & set namepokeattack=Golem & set skill1attack=rock_throw & set skill2attack=Superpower & set skill3attack=Mega_Punch
if %battlerandom% == 6 set /A hpattack=45 & set /A levelattack=5 & set namepokeattack=Caterpie & set skill1attack=elec_thunder & set skill2attack=bug_bite & set skill3attack=Tackle
goto attacking
:attacking
cls
echo hp:%hp% lv:%level% poke:%poke% exp:%exp%
echo battlerandom:%battlerandom%
if %hp% == 0 goto lose
if %hp% LSS 0 goto lose
if %hpattack% == 0 goto win
if %hpattack% LSS 0 goto win
if %poke% == 1 set skill1=Solar_Beam & set skill2=Protect & set skill3=Outrage
if %poke% == 2 set skill1=Fire_Spin & set skill2=Flamethrower & set skill3=Outrage
if %poke% == 3 set skill1=Thunder & set skill2=10,000,000_Volt_Thunderbolt & set skill3=Iron_Tail
if %poke% == 4 set skill1=ice_punch & set skill2=Water_Gun & set skill3=Ice_Beam
if %poke% == 5 set skill1=Rock_Throw & set skill2=Superpower & set skill3=Mega_Punch
if %poke% == 6 set skill1=elec_thunder & set skill2=bug_bite & set skill3=Tackle
if %battlerandom% == 1 type poke\Bulbasaur.txt
if %battlerandom% == 2 type poke\Charmander.txt
if %battlerandom% == 3 type poke\Pikachu.txt
if %battlerandom% == 4 type poke\Squirtle.txt
if %battlerandom% == 5 type poke\Golem.txt
if %battlerandom% == 6 type poke\Caterpie.txt
SET /A num=%RANDOM% * 25 / 32768 + 1
set /A damge=2 * %level% / 5 + 2 * %hp% / 2 * %num% / 50 + 2
SET /A numattack=%RANDOM% * 20 / 32768 + 1
set /A damgeattack=2 * %levelattack% / 5 + 2 * %hpattack% / 2 * %numattack% / 50 + 2
echo.
echo ____________________________________________________________
echo / Lv.%levelattack% %namepokeattack% HP:%hpattack% /
echo `----------------------------------------------------------'
echo.
echo __________________________________________
echo / Lv.%level% %namepoke% HP:%hp% /
echo `----------------------------------------'
if %turn% == 1 goto turnme
if %turn% == 2 goto turnyour
:turnme
cmdmenusel f971 "%skill1%" "%skill2%" "%skill3%" "run"
if %ERRORLEVEL% == 1 start click.vbs & goto use1
if %ERRORLEVEL% == 2 start click.vbs & goto use2
if %ERRORLEVEL% == 3 start click.vbs & goto use3
if %ERRORLEVEL% == 4 Taskkill /F /IM wscript.exe > nul & start click.vbs & goto map
:turnyour
set /A randomskill=%RANDOM% * 3 / 32768 + 1
if %randomskill% == 1 goto use1attack
if %randomskill% == 2 goto use2attack
if %randomskill% == 3 goto use3attack
:use1
cls
set /A turn=2
set /A hpattack=%hpattack% - %damge%
if %poke% == 1 type skill\solar_beam.txt & start Solar_Beam.vbs
if %poke% == 2 type skill\fire_spin.txt & start Fire_Spin.vbs
if %poke% == 3 type skill\thunder.txt & start Thunder.vbs
if %poke% == 4 type skill\ice_punch.txt & start Ice_Punch.vbs
if %poke% == 5 type skill\Rock_Throw.txt & start Rock_Throw.vbs
if %poke% == 6 type skill\elec_Thunder.txt & start elec_thunder.vbs
echo.
echo ╔════════════════════════════════════════╗
echo ║%namepoke% use %skill1%! ║
echo ╚════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔════════════════════════════════════════╗
echo ║%namepokeattack% loses %damge% hp! ║
echo ╚════════════════════════════════════════╝
pause
goto attacking
:use2
cls
set /A turn=2
set /A hpattack=%hpattack% - %damge%
if %poke% == 2 start Flamethrower.vbs
if %poke% == 3 start 100_volt.vbs
if %poke% == 4 type skill\water_gun.txt & start Water_Gun.vbs
if %poke% == 5 start Superpower.vbs
if %poke% == 6 type skill\bug_bite.txt & start Bug_Bite.vbs
echo.
echo ╔════════════════════════════════════════╗
echo ║%namepoke% use %skill2%! ║
echo ╚════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔════════════════════════════════════════╗
echo ║%namepokeattack% loses %damge% hp! ║
echo ╚════════════════════════════════════════╝
pause
goto attacking
:use3
cls
set /A turn=2
set /A hpattack=%hpattack% - %damge%
if %poke% == 1 start Outrage.vbs
if %poke% == 2 start Outrage.vbs
if %poke% == 3 start Iron_Tail.vbs
if %poke% == 4 type skill\ice_beam.txt & start Ice_Beam.vbs
if %poke% == 5 type skill\mega_punch.txt & start Mega_Punch.vbs
if %poke% == 6 start Tackle.vbs
echo.
echo ╔════════════════════════════════════════╗
echo ║%namepoke% use %skill3%! ║
echo ╚════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔════════════════════════════════════════╗
echo ║%namepokeattack% loses %damge% hp! ║
echo ╚════════════════════════════════════════╝
pause
goto attacking
:use1attack
cls
set /A turn=1
set /A hp=%hp%-%damgeattack%
if %battlerandom% == 1 type skill\solar_beam.txt & start Solar_Beam.vbs
if %battlerandom% == 2 type skill\fire_spin.txt & start Fire_Spin.vbs
if %battlerandom% == 3 type skill\thunder.txt & start Thunder.vbs
if %battlerandom% == 4 type skill\ice_punch.txt & start Ice_Punch.vbs
if %battlerandom% == 5 type skill\Rock_Throw.txt & start Rock_Throw.vbs
if %battlerandom% == 6 type skill\elec_Thunder.txt & start elec_thunder.vbs
echo.
echo ╔════════════════════════════════════════════════════╗
echo ║%namepokeattack% use %skill1attack%! ║
echo ╚════════════════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔══════════════════════════════════════════════╗
echo ║You loses %damgeattack% hp! ║
echo ╚══════════════════════════════════════════════╝
pause
goto attacking
:use2attack
cls
set /A turn=1
set /A hp=%hp% - %damgeattack%
if %battlerandom% == 2 start Flamethrower.vbs
if %battlerandom% == 3 start 100_volt.vbs
if %battlerandom% == 4 type skill\water_gun.txt & start Water_Gun.vbs
if %battlerandom% == 5 start Superpower.vbs
if %battlerandom% == 6 type skill\bug_bite.txt & start Bug_Bite.vbs
echo.
echo ╔════════════════════════════════════════════════════╗
echo ║%namepokeattack% use %skill2attack%! ║
echo ╚════════════════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔══════════════════════════════════════════════╗
echo ║You loses %damgeattack% hp! ║
echo ╚══════════════════════════════════════════════╝
pause
goto attacking
:use3attack
cls
set /A turn=1
set /A hp=%hp% - %damgeattack%
if %battlerandom% == 1 start Outrage.vbs
if %battlerandom% == 2 start Outrage.vbs
if %battlerandom% == 3 start Iron_Tail.vbs
if %battlerandom% == 4 type skill\ice_beam.txt & start Ice_Beam.vbs
if %battlerandom% == 5 type skill\mega_punch.txt & start Mega_Punch.vbs
if %% == 6 start Tackle.vbs
echo.
echo ╔════════════════════════════════════════════════════╗
echo ║%namepokeattack% use %skill3attack%! ║
echo ╚════════════════════════════════════════════════════╝
timeout 3 > nul
cls
echo ╔══════════════════════════════════════════════╗
echo ║You loses %damgeattack% hp! ║
echo ╚══════════════════════════════════════════════╝
pause
goto attacking
:lose
Taskkill /F /IM wscript.exe > nul
cls
echo your hp down to 0
echo ╔═══════════════════╗
echo ║you lose! ║
echo ╚═══════════════════╝
pause
goto map
:win
Taskkill /F /IM wscript.exe > nul
if %randommusic% == 1 start Music_Victory_Gym.vbs
if %randommusic% == 2 start Music_Victory_Trainer.vbs
if %randommusic% == 3 start Music_Victory_Wild.vbs
cls
echo ╔═══════════════════╗
echo ║you won ║
echo ╚═══════════════════╝
pause
set /A exp=%exp%+2
echo %exp% > exp.txt
set /A hp=%hp%+5
echo %hp% > hp.txt
Taskkill /F /IM wscript.exe > nul
goto map