@chcp 65001 >nul
@echo off
:body
for /l %%i in (1,1,10) do call:night
@REM pause
CHOICE /T 20 /D Y
if "%errorlevel%"=="1" goto:body
goto:eof
:night
@REM start fight x[110,270] y[870,1030]
call:tap 110 870 1
@REM confirm x[1500,270] y[660,1030]
call:tap 1500 660 5
@REM 缩小地图 需要root
@REM call:shrink
@REM pick hero x[380,270] y[900,1030]
call:tap 380 900 1
@REM click any clearing x[2000,270] y[200,1030]
call:tap 2000 200 1
@REM pick troops x[380,270] y[900,1030]
call:tap 580 900 1
@REM click any clearing x[2000,270] y[200,1030]
call:tap 110 10
call:tap 110 100
call:tap 110 800
call:tap 1000 10
call:tap 1000 100
call:tap 1000 800
call:tap 1500 10
call:tap 1500 100
call:tap 1500 800
call:tap 2000 10
call:tap 2000 100
call:tap 2000 800
@REM wait fight
timeout /t 5 /nobreak >nul
@REM pick hero x[380,270] y[900,1030]
call:tap 380 900 1
@REM pick troops x[380,270] y[900,1030]
call:tap 550 900 1
call:tap 700 900
call:tap 850 900
call:tap 1000 900
call:tap 1150 900
call:tap 1300 900
@REM wait fight
timeout /t 25 /nobreak >nul
@REM stop fight x[110,270] y[736,1030]
call:tap 110 736 1
@REM confirm x[1250,270] y[640,1030]
call:tap 1250 640 1
@REM home x[1100,270] y[880,1030]
call:tap 1100 880 2
goto:eof
:tap
rem echo tap %1 %2 %3
set /a x = %1 +%random%/256
set /a y = %2 +%random%/512
adb shell input tap %x% %y%
if not "%3"=="" (timeout /t %3 /nobreak >nul)
goto:eof
:swipe
echo swipe暂时用不到
adb shell input swipe %1 %2 %3 %4 %5
goto:eof
@REM 放大
:enlarge
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0057 18880
adb shell sendevent /dev/input/event2 0001 0330 1
adb shell sendevent /dev/input/event2 0003 0050 6
adb shell sendevent /dev/input/event2 0003 0053 8226
adb shell sendevent /dev/input/event2 0003 0054 18304
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0057 18881
adb shell sendevent /dev/input/event2 0003 0053 8865
adb shell sendevent /dev/input/event2 0003 0054 21729
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0058 9
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0048 11
adb shell sendevent /dev/input/event2 0003 0058 11
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0048 13
adb shell sendevent /dev/input/event2 0003 0058 13
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0050 13
adb shell sendevent /dev/input/event2 0003 0053 8958
adb shell sendevent /dev/input/event2 0003 0054 22077
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9027
adb shell sendevent /dev/input/event2 0003 0054 22346
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9094
adb shell sendevent /dev/input/event2 0003 0054 22585
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9134
adb shell sendevent /dev/input/event2 0003 0054 22810
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9172
adb shell sendevent /dev/input/event2 0003 0054 22969
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9219
adb shell sendevent /dev/input/event2 0003 0054 23193
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9297
adb shell sendevent /dev/input/event2 0003 0054 23477
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 7856
adb shell sendevent /dev/input/event2 0003 0054 18147
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9351
adb shell sendevent /dev/input/event2 0003 0054 23781
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 7550
adb shell sendevent /dev/input/event2 0003 0054 18007
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9428
adb shell sendevent /dev/input/event2 0003 0054 24134
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 7258
adb shell sendevent /dev/input/event2 0003 0054 17859
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9523
adb shell sendevent /dev/input/event2 0003 0054 24478
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 7008
adb shell sendevent /dev/input/event2 0003 0054 17718
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9623
adb shell sendevent /dev/input/event2 0003 0054 24833
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 6673
adb shell sendevent /dev/input/event2 0003 0054 17528
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9734
adb shell sendevent /dev/input/event2 0003 0054 25188
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0058 6
adb shell sendevent /dev/input/event2 0003 0053 6305
adb shell sendevent /dev/input/event2 0003 0054 17242
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0048 11
adb shell sendevent /dev/input/event2 0003 0058 11
adb shell sendevent /dev/input/event2 0003 0053 9832
adb shell sendevent /dev/input/event2 0003 0054 25515
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0057 4294967295
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 9913
adb shell sendevent /dev/input/event2 0003 0054 25827
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 9999
adb shell sendevent /dev/input/event2 0003 0054 26096
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0048 5
adb shell sendevent /dev/input/event2 0003 0058 9
adb shell sendevent /dev/input/event2 0003 0053 10083
adb shell sendevent /dev/input/event2 0003 0054 26332
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 10122
adb shell sendevent /dev/input/event2 0003 0054 26563
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0057 4294967295
adb shell sendevent /dev/input/event2 0001 0330 0
adb shell sendevent /dev/input/event2 0000 0000 0
goto:eof
@REM 缩小
:shrink
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0057 18910
adb shell sendevent /dev/input/event2 0001 0330 1
adb shell sendevent /dev/input/event2 0003 0050 9
adb shell sendevent /dev/input/event2 0003 0048 5
adb shell sendevent /dev/input/event2 0003 0058 9
adb shell sendevent /dev/input/event2 0003 0053 11282
adb shell sendevent /dev/input/event2 0003 0054 24582
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0048 11
adb shell sendevent /dev/input/event2 0003 0058 11
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0048 13
adb shell sendevent /dev/input/event2 0003 0058 13
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0057 18911
adb shell sendevent /dev/input/event2 0003 0048 5
adb shell sendevent /dev/input/event2 0003 0058 9
adb shell sendevent /dev/input/event2 0003 0053 3596
adb shell sendevent /dev/input/event2 0003 0054 13378
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 4270
adb shell sendevent /dev/input/event2 0003 0054 14087
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0053 4575
adb shell sendevent /dev/input/event2 0003 0054 14418
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 11010
adb shell sendevent /dev/input/event2 0003 0054 24098
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 4829
adb shell sendevent /dev/input/event2 0003 0054 14675
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10871
adb shell sendevent /dev/input/event2 0003 0054 23816
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5054
adb shell sendevent /dev/input/event2 0003 0054 14888
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10804
adb shell sendevent /dev/input/event2 0003 0054 23626
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5281
adb shell sendevent /dev/input/event2 0003 0054 15086
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10762
adb shell sendevent /dev/input/event2 0003 0054 23469
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5497
adb shell sendevent /dev/input/event2 0003 0054 15276
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10711
adb shell sendevent /dev/input/event2 0003 0054 23331
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5562
adb shell sendevent /dev/input/event2 0003 0054 15325
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10703
adb shell sendevent /dev/input/event2 0003 0054 23189
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5720
adb shell sendevent /dev/input/event2 0003 0054 15457
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10702
adb shell sendevent /dev/input/event2 0003 0054 23182
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 5944
adb shell sendevent /dev/input/event2 0003 0054 15631
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10688
adb shell sendevent /dev/input/event2 0003 0054 23128
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 6159
adb shell sendevent /dev/input/event2 0003 0054 15801
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10673
adb shell sendevent /dev/input/event2 0003 0054 23046
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 6394
adb shell sendevent /dev/input/event2 0003 0054 15981
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10645
adb shell sendevent /dev/input/event2 0003 0054 22912
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 6610
adb shell sendevent /dev/input/event2 0003 0054 16162
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10627
adb shell sendevent /dev/input/event2 0003 0054 22776
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 6848
adb shell sendevent /dev/input/event2 0003 0054 16332
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10610
adb shell sendevent /dev/input/event2 0003 0054 22639
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 7075
adb shell sendevent /dev/input/event2 0003 0054 16504
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10604
adb shell sendevent /dev/input/event2 0003 0054 22492
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 7288
adb shell sendevent /dev/input/event2 0003 0054 16660
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0048 11
adb shell sendevent /dev/input/event2 0003 0058 11
adb shell sendevent /dev/input/event2 0003 0053 10594
adb shell sendevent /dev/input/event2 0003 0054 22337
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 7492
adb shell sendevent /dev/input/event2 0003 0054 16793
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10567
adb shell sendevent /dev/input/event2 0003 0054 22182
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 7684
adb shell sendevent /dev/input/event2 0003 0054 16912
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10556
adb shell sendevent /dev/input/event2 0003 0054 22021
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 7859
adb shell sendevent /dev/input/event2 0003 0054 17023
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10549
adb shell sendevent /dev/input/event2 0003 0054 21865
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8030
adb shell sendevent /dev/input/event2 0003 0054 17126
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0054 21844
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8089
adb shell sendevent /dev/input/event2 0003 0054 17164
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10548
adb shell sendevent /dev/input/event2 0003 0054 21806
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8124
adb shell sendevent /dev/input/event2 0003 0054 17186
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0054 21750
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8178
adb shell sendevent /dev/input/event2 0003 0054 17224
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0048 5
adb shell sendevent /dev/input/event2 0003 0058 9
adb shell sendevent /dev/input/event2 0003 0053 10547
adb shell sendevent /dev/input/event2 0003 0054 21674
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8251
adb shell sendevent /dev/input/event2 0003 0054 17280
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10546
adb shell sendevent /dev/input/event2 0003 0054 21585
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8348
adb shell sendevent /dev/input/event2 0003 0054 17346
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0054 21490
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8444
adb shell sendevent /dev/input/event2 0003 0054 17411
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10557
adb shell sendevent /dev/input/event2 0003 0054 21293
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8536
adb shell sendevent /dev/input/event2 0003 0054 17472
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10572
adb shell sendevent /dev/input/event2 0003 0054 21194
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0058 6
adb shell sendevent /dev/input/event2 0003 0053 8635
adb shell sendevent /dev/input/event2 0003 0054 17523
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0053 10599
adb shell sendevent /dev/input/event2 0003 0054 21093
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0053 8731
adb shell sendevent /dev/input/event2 0003 0054 17577
adb shell sendevent /dev/input/event2 0000 0000 0
adb shell sendevent /dev/input/event2 0003 0047 0
adb shell sendevent /dev/input/event2 0003 0057 4294967295
adb shell sendevent /dev/input/event2 0003 0047 1
adb shell sendevent /dev/input/event2 0003 0057 4294967295
adb shell sendevent /dev/input/event2 0001 0330 0
adb shell sendevent /dev/input/event2 0000 0000 0
goto:eof
:getRand
echo getRand
set /a n=%random%/128
goto:eof
@REM //模拟输入“001”
@REM adb shell input text “001”
@REM //模拟home按键
@REM adb shell input keyevent 3
@REM //模拟点击(540, 1104)坐标
@REM adb shell input tap 540 1104
@REM //模拟滑动,从(250,250)滑动到(300,300)
@REM adb shell input swipe 250 250 300 300
过程中了解到的点
- 判断入参为空
- 与,或,非
- 循环
- 跳转
- 函数,函数参数,函数结果返回
- 延时
904

被折叠的 条评论
为什么被折叠?



