CF手游自动挂机刷擎天觉醒魂(1)

1.首先说下原理,其实很简单,利用adb工具模拟手机的触摸来实现自动攻击的过程。

2.创建房间,枪战工坊,地图为营地,保卫者1人,生命值最大,时间最大,人头数150,击杀回血等等,

3.进入游戏,会自动攻击,并且转动视角,由于是第一代,代码不怎么完善,一局游戏下来13分左右,完了之后得手动回到CF初始界面,重新运行程序。

注意:运行该程序需要配置adb环境,并且要成功连接手机。




下面是第一代的源代码,纯C语言 勿喷 谢谢!!:

#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>
int main()
{
	int i,j;
	printf("    CF手游自动挂机刷擎天觉醒魂 版本1.0.0\n");
	printf("*********************************************\n");
	printf("  请确定已经打开CF游戏界面,是1 or 否2\n");
	printf("  请输入:");
	scanf_s("%d", &i);
	if (i == 1)
	{//创建房间
		//system("cls");
		printf("创建房间中.......\n");
		system("adb shell input swipe 1015 240 1015 240 1");//枪战工坊
		system("adb shell input swipe 230 490 230 490 1");//创建房间
		Sleep(1000);
		system("adb shell input swipe 1520 945 1520 945 1");//继续
		system("adb shell input swipe 620 190 620 190 1");//营地
		system("adb shell input swipe 337 327 337 327 1");//基础设置
		system("adb shell input swipe 1220 329 1558 329 300");//人头数
		Sleep(500);
		system("adb shell input swipe 1290 429 1550 429 300");//最大时间
		system("adb shell input swipe 340 427 340 427 1");//角色设置
		system("adb shell input swipe 1473 205 1473 205 1");//所有队伍
		system("adb shell input swipe 1431 363 1431 363 1");//保卫者
		system("adb shell input swipe 1493 326 1035 326 300");//阵营人数
		Sleep(500);
		system("adb shell input swipe 1152 420 1543 420 300");//生命值
		Sleep(200);
		system("adb shell input swipe 615 750 615 454 300");//上拉
		system("adb shell input swipe 1050 523 1500 523 800");//击杀回血
		Sleep(200);
		system("adb shell input swipe 314 544 314 544 1");//武器设置
		system("adb shell input swipe 584 324 584 324 1");//枪系
		system("adb shell input swipe 558 700 558 246 300");//第一次上拉
		system("adb shell input swipe 1548 711 1548 711 1");//详细设置
		system("adb shell input swipe 1157 437 1555 437 300");//伤害
		system("adb shell input swipe 1563 965 1563 965 1");//确定
		system("adb shell input swipe 747 666 747 666 1");//房间名
		system("adb shell input swipe 1048 693 1048 693 1");//句号
		system("adb shell input swipe 288 600 288 600 1");//空白处
		system("adb shell input swipe 948 909 948 909 1");//确定
		system("adb shell input swipe 942 133 942 133 1");//私人房间
		system("adb shell input swipe 1285 1034 1285 1034 1");//发布房间
		//system("cls");
		printf("创建成功! \n");
		printf("是否进入游戏?是1 or 否2\n");
		scanf_s("%d", &j);
		if (j == 1) {
			system("adb shell input swipe 970 1022 970 1022 1");//单人跑图
			printf("进入游戏中...\n");
			Sleep(10000);
		}
		else
			return 0;
	}
	else
		return 0;
	printf("进入成功!!\n");
//游戏中模拟左右转动以及开火按钮,首先是一直转动视角,并且攻击,并不完善。
	for (;;) {
		system("adb shell input swipe 1432 535 965 535 120");
		printf("adb shell input swipe 1432 535 965 535 120\n");
		system("adb shell input swipe 1090 520 1795 520 150");
		printf("adb shell input swipe 1090 520 1795 520 150\n");
		system("adb shell input swipe 1652 900 1652 900 1");//开火
		printf("adb shell input swipe 1652 900 1652 900 1\n");
		system("adb shell input swipe 1090 520 1795 520 150");
		printf("adb shell input swipe 1090 520 1795 520 150\n");
		system("adb shell input swipe 1652 900 1652 900 1");
		printf("adb shell input swipe 1652 900 1652 900 1\n");
		system("adb shell input swipe 1090 520 1795 520 150");
		printf("adb shell input swipe 1090 520 1795 520 150\n");
		system("adb shell input swipe 1652 900 1652 900 1");
		printf("adb shell input swipe 1652 900 1652 900 1\n");
		system("adb shell input swipe 1090 520 1795 520 150");
		printf("adb shell input swipe 1090 520 1795 520 150\n");
		system("adb shell input swipe 1652 900 1652 900 1");
		printf("adb shell input swipe 1652 900 1652 900 1\n");
	}
	system("pause");
	return 0;
}
如果有兴趣,可以加我扣扣:2369903744


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值