当前位置: 首页 > news >正文

Android ADB实现COC夜世界自动打资源

@chcp 65001 >nul
@echo off
:body
for /l %%i  in (1,1,10) do call:night
@REM pause
set /p input=是否继续(Y/N)?
if input=="Y" goto:body
if input=="y" 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 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 10 10
call:tap 100 10
call:tap 1000 200
call:tap 2000 200
call:tap 2000 500
call:tap 10 10
call:tap 100 10
call:tap 1000 200
call:tap 2000 200
call:tap 2000 500
@REM wait fight
timeout /t 40 /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 1
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
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

过程中了解到的点

  • 判断入参为空
  • 与,或,非
  • 循环
  • 跳转
  • 函数,函数参数,函数结果返回
  • 延时

http://www.mrgr.cn/news/20097.html

相关文章:

  • 某云彩SRM2.0任意文件下载漏洞
  • 【附指定环境安装包】在Visual Studio Code中配置Python环境!
  • OpenAI 联合创始人的 AI 安全公司 SSI 筹集 10 亿美元资金|TodayAI
  • Linux - Linux安装部署Maven以及环境变量配置
  • 基于Pytorch深度学习——Transformer论文讲解/代码实现
  • 园区/高能耗企业 水-电-气-热-油采集系统-能源管理系统
  • 在 Ubuntu 下通过 Docker 部署 Minecraft 服务器
  • Java 面试题:从源码理解 ThreadLocal 如何解决内存泄漏 ConcurrentHashMap 如何保证并发安全 --xunznux
  • 陪诊志愿服务正在开展,喜鹊医疗打造国内首家陪诊聚合平台
  • C#中的GDI和GDI+(Graphics Device Interface Plus)图形设备接口
  • ubuntu 20.04 安装微信,WPS,腾讯会议
  • 【JavaScript】标准库:Math对象
  • 深入理解 Python 并发编程:多线程、多进程与异步
  • 大坝安全监测设备的工作原理
  • 稚晖君回应被称天才少年:没有必要如此称呼 只是兴趣使然
  • 观测云产品更新 | 日志、场景、异常追踪、监控、Pipeline等
  • 连接线转接线--KH-122-SMA-50
  • 【netty系列-10】通过netty实现http请求
  • 蓝牙技术|超高精度蓝牙位置服务将成为蓝牙定位产品发展方向
  • 背完langchain入门指南,你就是LLM大师