今天分享一个汉字大英雄,阿伟爱消消,西瓜爱消除,全民来收菜,家园保卫战,老司机网吧等二十几个小游戏挂机合集脚本源码。自定义时间,可24小时挂机操作,只需要下载对应的软件即可。下面是部分核心源码,用Auto.js开发。
//完整脚本源码访问网站:rz3w.com
var lj = "https://shimo.im/docs/JhywqVTrPYxgrhck/"//"https://shimo.im/docs/pVjpghgxWR9vrhXX/"
var a = http.get(lj + "read").body.string().split("代理商")[1];
var 自定义内容 = http.get(lj + "read").body.string().split("自定义内容")[1];
var 内容 = http.get(lj + "read").body.string().split("内容")[1];
var 自定义标题 = http.get(lj + "read").body.string().split("自定义标题")[1];
var 本地内容 = http.get(lj + "read").body.string().split("本地内容")[1];
var 自定义取消 = http.get(lj + "read").body.string().split("自定义取消")[1];
var 自定义进群 = http.get(lj + "read").body.string().split("自定义进群")[1];
if (a == 1) {
//toastLog("当前版本为最新版本")
} else if (a == 2) {
toastLog("有新版本")
dialogs.build({
//对话框标题
title: "发现新版本",
//对话框内容
content: 内容,
neutral: "取消",
//左边
negative: "群内下载最新版",
//右边
}).on("negative", () => {
//监听中性键
app.startActivity({
action: "android.intent.action.VIEW",
data: "mqqapi://card/show_pslcard?card_type=group&uin=" + q,
packageName: "com.tencent.mobileqq",
})
}).on("check", (checked) => {
//监听勾选框
log(checked);
}).show();
} else if (a == 3) {
dialogs.build({
//对话框标题
title: 自定义标题,
//对话框内容
content: 自定义内容,
//确定键内容
//取消键内容
neutral: 自定义取消,
//中性键内容
positive: 自定义进群,
//勾选框内容
// checkBoxPrompt: "不再提示"
}).on("positive", () => {
//监听确定键
}).on("positive", () => {
//监听中性键
app.startActivity({
action: "android.intent.action.VIEW",
data: "mqqapi://card/show_pslcard?card_type=group&uin=" + q,
packageName: "com.tencent.mobileqq",
})
}).on("check", (checked) => {
//监听勾选框
logstr(checked);
}).show();
} else if (a == 4) {
exit()
}
var storage = storages.create("零线报");
ui.statusBarColor("#000000");
ui.layout(
<frame>
<img w="*" scaleType="centerCrop" src="http://picacg.cc/2021/06/03/f642b4c914748.jpg" alpha="10" clickable = "true"/>背景图片
<drawer id="drawer" colors="#ffffff"clickable = "true" >
<ScrollView>
<card w="*" h="auto" margin="5"bg="#00FFFFFF" cardCornerRadius="3dp" cardElevation="2dp" gravity="center">
<vertical bg="#00FFFFFF" margin="5" >
<horizontal>
<img id="添加QQ" src="{{头像}}" w="65" h="65" circle="true"/>
<text margin="5" w="auto" h="60" gravity="center_vertical"margin="23 0 0 0" color="black" size="23sp" textStyle="bold">日赚3万网脚本</text>
<img id="更新" src="@drawable/ic_cloud_download_black_48dp" w="65" h="65"margin="27 0 -17 0" circle="true"/>
</horizontal>
<vertical>
<linear orientation="horizontal">
<Switch id="autoService" text="无障碍服务" textColor="#212121" w="auto" checked="{{auto.service != null}}" padding="3 0 0 0" textSize="15sp" />
<Switch size="15sp" id="overlayService" text="悬浮窗权限" textColor="#000000"w="auto" checked="" padding="3 0 0 0" />
<text text="音量上键停止" w="auto" h="auto" textColor="#000000" />
</linear>
<horizontal>
<card id="ca11" w="auto" h="25" cardCornerRadius="2dp" margin="2 2" cardElevation="1dp" gravity="center_vertical" alpha="1" cardBackgroundColor="#6BF0FF" cardCornerRadius="15dp">
<button id="添加QQ群"h="*"text="进入脚本群"style="Widget.AppCompat.Button.Borderless.Colored"margin="-5 -6 -5 -6"textColor="#000000"textSize="11sp" h="*"w="*"/>
</card>
<card id="ca1" w="auto" h="25" cardCornerRadius="2dp" margin="2 2" cardElevation="1dp" gravity="center_vertical" alpha="1" cardBackgroundColor="#6BF0FF" cardCornerRadius="15dp">
<button id="lxzz"h="*"text="反馈作者"style="Widget.AppCompat.Button.Borderless.Colored"margin="-5 -6 -5 -6"textColor="#000000"textSize="11sp" h="*"w="*"/>
</card>
<text text="从第" w="auto" h="auto" textStyle="bold" margin="5 -3 -5 -6"textColor="#ff0000" />
<input id="运行顺序" hint="" text="1" gravity="center" margin="5 -3 -5 -6"singleLine="true" textStyle="bold" w="auto" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="个脚本开始运行" w="auto" h="auto" margin="5 -3 -5 -6"textStyle="bold" textColor="#ff0000" />
</horizontal>
<text textSize="13sp" textColor="BLUE" text="卡密激活————请输入卡密" />
<input id="card" text="" />
<linear>
<checkbox id="火线救援" text="火线救援" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime1" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接1"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="全民来收菜" text="全民来收菜" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime2" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接2"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="疯狂弹力球" text="疯狂弹力球" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime3" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接3"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="鸿运封神" text="鸿运封神" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime4" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接4"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="聚宝盆" text="聚宝盆" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime5" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接5"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="球球大丰收" text="球球大丰收" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime6" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接6"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="西瓜爱消除" text="西瓜爱消除" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime7" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接7"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="植物乐园" text="植物乐园" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime8" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接8"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="萌宠之星" text="萌宠之星" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime9" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接9"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="家园保卫战" text="家园保卫战" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime10" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接10"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="待添加" text="待添加" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime5" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接5"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<vertical>
<linear>
<checkbox id="待添加" text="待添加" textStyle="bold" layout_weight="1" />
<text text="运行时长" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<input id="Runningtime5" hint="null" gravity="center" singleLine="true" textStyle="bold" w="60" backgroundTint="#000000" textColor="#000000" textSize="13" />
<text text="分" w="auto" h="auto" textStyle="bold" textColor="#ff0000" />
<button id="下载链接5"text="下载链接"style="Widget.AppCompat.Button.Borderless.Colored"margin="-13 0 -17 0"textColor="#ff00bfff"textSize="13sp" h="auto"w="auto"/>
</linear>
</vertical>
<horizontal>
<text text="屏幕识别率:" textColor="#212121" marginLeft="7" w="auto" marginTop="9" textSize="15sp" />
<seekbar marginLeft="-15" w="180" id="识别" progress="-10" max="9" marginTop="11" textSize="15sp" />
<text id="sb" text="1" textColor="#FFFF0000" w="35" marginTop="9" textSize="15sp" />
<text text="率" textColor="#212121" w="30" marginTop="9" textSize="15sp" />
</horizontal>
{/*运行日记*/}
<text h="1" alpha="0.1" bg="#00FFFFFF" />
<card bg="#00FFFFFF" alpha="1" w="*" h="auto" cardCornerRadius="2dp" cardElevation="2dp" >
<com.stardust.autojs.core.console.ConsoleView id="console" gravity="center" margin="5 5 5 5" textSize="11sp" h="100"/>
</card>
<card cardCornerRadius="10dp" bg="#000000" >
<linear gravity="center">
<button id="开始运行" text="开始运行" w="*" textColor="#ffffff" style="Widget.AppCompat.Button.Borderless" textStyle="bold"/>
</linear>
</card>
</vertical>
</card>
</ScrollView>
</drawer>
</frame>
);
log("欢迎使用周恋恋合集~")
log("在开始运行前先去锁定脚本,防止清理后台被清理,不会设置百度查找自己的机型方法")
log("软件有bug问题反馈作者集中修复")
if (getStorage("Runningtime1")) {
ui.Runningtime1.setText(getStorage("Runningtime1"))
}
if (getStorage("Runningtime2")) {
ui.Runningtime2.setText(getStorage("Runningtime2"))
}
if (getStorage("Runningtime3")) {
ui.Runningtime3.setText(getStorage("Runningtime3"))
}
if (getStorage("Runningtime4")) {
ui.Runningtime4.setText(getStorage("Runningtime4"))
}
if (getStorage("Runningtime5")) {
ui.Runningtime5.setText(getStorage("Runningtime5"))
}
if (getStorage("Runningtime6")) {
ui.Runningtime6.setText(getStorage("Runningtime6"))
}
if (getStorage("Runningtime7")) {
ui.Runningtime7.setText(getStorage("Runningtime7"))
}
if (getStorage("Runningtime8")) {
ui.Runningtime8.setText(getStorage("Runningtime8"))
}
if (getStorage("Runningtime9")) {
ui.Runningtime9.setText(getStorage("Runningtime9"))
}
if (getStorage("Runningtime10")) {
ui.Runningtime10.setText(getStorage("Runningtime10"))
}
function putStorage(name, value) {
var storage = storages.create("零线报");
storage.put(name, value);
}
function getStorage(name) {
var storage = storages.create("零线报");
return storage.get(name);
}
ui.ca1.setBackground(setNgde(3, 10, "#00ffffff", "#ff00bfff"));
ui.ca11.setBackground(setNgde(3, 10, "#00ffffff", "#ff00bfff"));
storage = storages.create("awtlq")
识别率 = storage.get("识别率", 0.75)
ui.sb.setText(String(识别率))
ui.识别.progress = 识别度返回(识别率)
ui.识别.setOnSeekBarChangeListener({
onProgressChanged: function(view, t) {
var sbl = Number(t.toString())
识别率 = 识别度(sbl)
storage.put("识别率", 识别率);
}
})
//输入边框宽度,输入圆角半径,输入背景填充色,输入边框颜色
function setNgde(i, i2, str, str2) {
let f2 = android.graphics.Color.parseColor(str);
let f3 = android.graphics.Color.parseColor(str2);
let gradientDrawable = new android.graphics.drawable.GradientDrawable();
gradientDrawable.setColor(f2);
if (i2 > 0) {
gradientDrawable.setCornerRadius(i2);
}
if (i > 0) {
gradientDrawable.setStroke(i, f3);
}
return gradientDrawable;
}
ui.开始运行.click(function() {
threads.start(function() {
CDKLogin();
if (auto.service == null) {
toast("请先开启无障碍服务!");
return;
}
if (!requestScreenCapture()) {
console.info("请求截图失败");
exit();
}
//调整窗口上下左右移动
console.setPosition(500, 40)
//调整窗口大小
console.setSize(550, 450);
console.show()
sleep(1000)
主程序()
})
});
function 主程序() {
while (true) {
if (ui.火线救援.checked) {
第一个脚本()
}
if (ui.全民来收菜.checked) {
第二个脚本()
}
if (ui.疯狂弹力球.checked) {
第三个脚本()
}
if (ui.鸿运封神.checked) {
第四个脚本()
}
if (ui.聚宝盆.checked) {
第五个脚本()
}
if (ui.球球大丰收.checked) {
第六个脚本()
}
if (ui.西瓜爱消除.checked) {
第七个脚本()
}
if (ui.植物乐园.checked) {
第八个脚本()
}
if (ui.萌宠之星.checked) {
第九个脚本()
}
if (ui.家园保卫战.checked) {
第十个脚本()
}
}
}
//全民乐消消
function 第一个脚本() {
var 软件名 = "火线救援"
var 包名 = "com.maoli.hxjyv3"
//检测APP没有安装
if (!packageIsExists(包名)) {
toastLog("您的设备未安装" + 软件名 + ".")
sleep(2000)
return;
};
var Runningtime1 = ui.Runningtime1.getText().toString() //分钟
putStorage("Runningtime1", Runningtime1);
var 时间开始 = new Date().getTime() //记录开始运行时间
清理后台()
launchPackage(包名)
log("正在启动 " + 软件名 + "...");
log("屏幕识别率"+识别率)
sleep(5000)
//第一个脚本
while (true) { //这里有循环了
//脚本内容_不要写死循环
找图(识别率)
激励视频通杀(包名, 10);
激励视频_特殊();
广告检测();
检测界面();
//判断不存在界面()
//判断时间是否已到指定时间,并且跳出
var 时间结束 = new Date().getTime()
var 时间间隔 = Math.floor((时间结束 - 时间开始) / 1000);
if (时间间隔 >= Runningtime1.toString() * 60) {
console.info("定时时间已到")
sleep(1000)
关闭应用()
console.info("当前平台运行结束,即将开始下一个平台~~")
break
}
}
function 找图(识别率) {
var arr = [
气泡红包,
领红包,
关闭2,
离线领取,
关闭1,
恭喜获得,
平台关闭,
解锁,
领红包1,
确定,
免费领取,
]
var arr1 = [
"气泡红包",
"领红包",
"关闭2",
"离线领取",
"关闭1",
"恭喜获得",
"平台关闭",
"解锁",
"领红包1",
"确定",
"免费领取",
]
for (var i = 0; i < arr.length; i++) {
var sfk = device.width / 1080 //得到 宽缩放比
var gdg = 2340 * sfk //得到 固定高
// var img = images.read(软件名 + "/" + hzm + ".jpg");
var 小图 = images.scale(arr[i], sfk, gdg / 2340) //进行缩放
var 大图 = captureScreen() //截图
图片 = findImage(大图, 小图, {
region: [0, 0, device.width, device.height], //区域找图
threshold: 识别率, //识别率
});
if (图片) {
var a = 小图.getWidth()
var b = 小图.getHeight()
var c = random(1, a)
var d = random(1, b)
var 偏移x = Number(图片.x) + Number(c)
var 偏移y = Number(图片.y) + Number(d)
//小图.recycle()
//log("发现:" + arr1[i])
click(图片.x + c, 图片.y + d) //点击
console.info("点击:" + arr1[i] + " 随机坐标:" + 偏移x + "," + 偏移y)
sleep(1000)
} else {
//log("未找到" + arr1[i])
}
}
};
/***激励视频区 */
function 激励视频通杀(AppName, sleepTime) {
单击代码("id", AppName + ":id/tt_video_ad_close_layout", sleepTime);
单击代码("id", AppName + ":id/ksad_video_page_close", sleepTime);
单击代码("id", AppName + ":id/cancle", sleepTime);
单击代码("id", AppName + ":id/ksad_end_close_btn", sleepTime);
单击代码("id", AppName + ":id/tt_negtive", sleepTime);
单击代码("id", "com.game.matrix_crazygame:id/wx", sleepTime);
单击代码("id", "com.game.matrix_crazygame:id/tt_video_ad_close_layout", sleepTime);
// 单击代码("id", "com.game.matrix_crazygame:id/tt_video_ad_close_layout", sleepTime);
// 单击代码("id", "com.game.matrix_crazygame:id/tt_video_ad_close_layout", sleepTime);
单击代码("id", "com.game.matrix_crazygame:id/c7", sleepTime);
单击代码("id", AppName + ":id/tt_insert_dislike_icon_img", sleepTime);
//单击代码("id", AppName + "::id/tt_insert_dislike_icon_img", sleepTime);
单击代码("id", AppName + ":id/mimo_reward_close_img", sleepTime);
单击代码("id", "com.kwad.sdk:id/ksad_end_close_btn", sleepTime);
}
function 检测界面() {
if (currentPackage() != 包名) {
console.log("全局检测中 当前界面不是" + 软件名 + " 再次查看……");
sleep(random(3000, 5000))
}
if (currentPackage() != 包名) {
launchPackage(包名)
console.log("打开" + 软件名)
}
}
};//脚本结束