mirror of
https://github.com/babalae/bettergi-scripts-list.git
synced 2026-03-25 04:59:52 +08:00
@@ -1,39 +1,41 @@
|
||||
(async function () {
|
||||
|
||||
//检测传送结束 await tpEndDetection();
|
||||
async function tpEndDetection() {
|
||||
const region = RecognitionObject.ocr(1690, 230, 75, 350);// 队伍名称区域
|
||||
let tpTime = 0;
|
||||
await sleep(3000);//点击传送后等待一段时间避免误判
|
||||
//最多30秒传送时间
|
||||
while (tpTime < 300) {
|
||||
let capture = captureGameRegion();
|
||||
let res = capture.find(region);
|
||||
if (!res.isEmpty()){
|
||||
log.info("传送完成");
|
||||
await sleep(1200);//传送结束后有僵直
|
||||
return;
|
||||
}
|
||||
tpTime++;
|
||||
await sleep(100);
|
||||
// 检测传送结束 await tpEndDetection();
|
||||
async function tpEndDetection() {
|
||||
const region = RecognitionObject.ocr(1690, 230, 75, 350); // 队伍名称区域
|
||||
let tpTime = 0;
|
||||
await sleep(3000); // 点击传送后等待一段时间避免误判
|
||||
// 最多30秒传送时间
|
||||
while (tpTime < 300) {
|
||||
let capture = captureGameRegion();
|
||||
let res = capture.find(region);
|
||||
if (!res.isEmpty()) {
|
||||
log.info("传送完成");
|
||||
await sleep(1200); // 传送结束后有僵直
|
||||
return;
|
||||
}
|
||||
tpTime++;
|
||||
await sleep(100);
|
||||
}
|
||||
throw new Error('传送时间超时');
|
||||
}
|
||||
throw new Error('传送时间超时');
|
||||
}
|
||||
|
||||
let teaPot = settings.teaPot ?? 0;
|
||||
let favorTeamName = settings.favorTeamName ?? 0;
|
||||
let delay = 2000;
|
||||
let ksl = settings.kslSelect ?? "枫丹";
|
||||
|
||||
async function kslAutoPath(location) {
|
||||
let filePath = `assets/${location}.json`;
|
||||
await pathingScript.runFile(filePath);
|
||||
let filePath = `assets/${location}.json`;
|
||||
await pathingScript.runFile(filePath);
|
||||
}
|
||||
|
||||
// 前往_凯瑟琳
|
||||
// 前往凯瑟琳
|
||||
await kslAutoPath(ksl);
|
||||
await sleep(1000);
|
||||
if(favorTeamName) await genshin.switchParty("好感队");
|
||||
if (favorTeamName) await genshin.switchParty("好感队");
|
||||
await sleep(1000);
|
||||
|
||||
// 领取邮件
|
||||
keyPress("Escape");
|
||||
await sleep(1500);
|
||||
@@ -49,8 +51,6 @@ async function tpEndDetection() {
|
||||
log.info("已完成 领取邮件");
|
||||
await sleep(delay);
|
||||
|
||||
|
||||
|
||||
// 领取历练点
|
||||
keyPress("F1");
|
||||
await sleep(2500);
|
||||
@@ -71,7 +71,7 @@ async function tpEndDetection() {
|
||||
await sleep(1500);
|
||||
click(960, 540);
|
||||
await sleep(1500);
|
||||
click(1380, 425);
|
||||
click(1380, 360);
|
||||
await sleep(1500);
|
||||
click(960, 540);
|
||||
await sleep(2000);
|
||||
@@ -84,7 +84,7 @@ async function tpEndDetection() {
|
||||
await sleep(2000);
|
||||
click(960, 540);
|
||||
await sleep(1500);
|
||||
click(1400, 580);
|
||||
click(1400, 505);
|
||||
await sleep(1500);
|
||||
click(160, 1010);
|
||||
await sleep(1500);
|
||||
@@ -111,97 +111,103 @@ async function tpEndDetection() {
|
||||
log.info("已领取纪行奖励");
|
||||
await sleep(delay);
|
||||
|
||||
await pathingScript.runFile("assets/recover.json");
|
||||
await sleep(500);//前往神像,避免茶壶放不出来
|
||||
if (teaPot != "") {
|
||||
await pathingScript.runFile("assets/recover.json");
|
||||
await sleep(500); // 前往神像,避免茶壶放不出来
|
||||
|
||||
keyPress("B");
|
||||
await sleep(1500);
|
||||
click(1058, 48); // 小道具
|
||||
await sleep(800);
|
||||
click(765, 190); // 背包第五个道具
|
||||
await sleep(800);
|
||||
click(1700, 1018); // 放置
|
||||
await sleep(1500);
|
||||
keyPress("F"); // 进入
|
||||
await tpEndDetection();
|
||||
await sleep(1500);
|
||||
|
||||
if (teaPot == "璃月") {
|
||||
keyDown("D");
|
||||
await sleep(500);
|
||||
keyUp("D");
|
||||
await sleep(500);
|
||||
} else if (teaPot == "蒙德") {
|
||||
keyDown("A");
|
||||
await sleep(1200);
|
||||
keyUp("A");
|
||||
await sleep(500);
|
||||
} else if (teaPot == "稻妻") {
|
||||
keyDown("A");
|
||||
await sleep(1700);
|
||||
keyUp("A");
|
||||
await sleep(500);
|
||||
keyDown("S");
|
||||
await sleep(1700);
|
||||
keyUp("S");
|
||||
await sleep(500);
|
||||
} else if (teaPot == "须弥") {
|
||||
keyDown("D");
|
||||
await sleep(1300);
|
||||
keyUp("D");
|
||||
await sleep(500);
|
||||
} else if (teaPot == "枫丹") {
|
||||
keyDown("S");
|
||||
await sleep(1300);
|
||||
keyUp("S");
|
||||
await sleep(500);
|
||||
keyDown("A");
|
||||
await sleep(500);
|
||||
keyUp("A");
|
||||
await sleep(500);
|
||||
}
|
||||
|
||||
if(teaPot){
|
||||
keyPress("B");
|
||||
await sleep(1500);
|
||||
click(1058, 48); //小道具
|
||||
await sleep(800);
|
||||
click(765, 190); //背包第五个道具
|
||||
await sleep(800);
|
||||
click(1700, 1018); //放置
|
||||
await sleep(1500);
|
||||
keyPress("F"); //进入
|
||||
await tpEndDetection();
|
||||
await sleep(1500);
|
||||
if (teaPot == "璃月"){
|
||||
keyDown("D");
|
||||
await sleep(500);
|
||||
keyUp("D");
|
||||
await sleep(500);
|
||||
}else if(teaPot == "蒙德"){
|
||||
keyDown("A");
|
||||
await sleep(1200);
|
||||
keyUp("A");
|
||||
await sleep(500); }else if(teaPot == "稻妻"){
|
||||
keyDown("A");
|
||||
await sleep(1700);
|
||||
keyUp("A");
|
||||
await sleep(500);
|
||||
keyDown("S");
|
||||
await sleep(1700);
|
||||
keyUp("S");
|
||||
await sleep(500);
|
||||
}else if(teaPot == "须弥"){
|
||||
keyDown("D");
|
||||
await sleep(1300);
|
||||
keyUp("D");
|
||||
await sleep(500);
|
||||
}else if(teaPot == "枫丹"){
|
||||
keyDown("S");
|
||||
await sleep(1300);
|
||||
keyUp("S");
|
||||
await sleep(500);
|
||||
keyDown("A");
|
||||
await sleep(500);
|
||||
keyUp("A");
|
||||
await sleep(500);
|
||||
}else{
|
||||
async function buyResin() {
|
||||
// 进入商店
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("F");
|
||||
await sleep(2000);
|
||||
click(350, 200); // 选择树脂
|
||||
await sleep(1000);
|
||||
click(1750, 1010); // 兑换
|
||||
await sleep(1000);
|
||||
keyPress("ESCAPE"); // 点击空白处
|
||||
await sleep(500);
|
||||
keyPress("ESCAPE"); // 回到对话界面
|
||||
await sleep(3000);
|
||||
}
|
||||
|
||||
keyPress("F"); // 阿圆对话
|
||||
await sleep(2500);
|
||||
click(1081, 955); // 跳过对话
|
||||
await sleep(2500);
|
||||
|
||||
// 检测今天是否是周一
|
||||
const today = new Date();
|
||||
if (today.getDay() === 1) { // getDay() 返回 0(周日)到 6(周六)
|
||||
await buyResin(); // 如果是周一则购买树脂
|
||||
}
|
||||
|
||||
click(1383, 430); // 信任等阶
|
||||
await sleep(2500);
|
||||
click(1081, 955); // 宝钱
|
||||
await sleep(2500);
|
||||
click(1812, 716); // 好感度
|
||||
await sleep(2500);
|
||||
click(1863, 48);
|
||||
await sleep(5000);
|
||||
click(1356, 804);
|
||||
await sleep(2500);
|
||||
click(1356, 804);
|
||||
await sleep(1500);
|
||||
|
||||
await pathingScript.runFile("assets/recover.json");
|
||||
await sleep(5000); // 回归大世界,避免后续部分js脚本没有路径追踪卡死
|
||||
}
|
||||
async function buyResin() {
|
||||
//进入商店
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("w");
|
||||
await sleep(500);
|
||||
keyPress("F");
|
||||
await sleep(2000);
|
||||
click(350, 200); //选择树脂
|
||||
await sleep(1000);
|
||||
click(1750, 1010); //兑换
|
||||
await sleep(1000);
|
||||
keyPress("ESCAPE");//点击空白处
|
||||
await sleep(500);
|
||||
keyPress("ESCAPE");//回到对话界面
|
||||
await sleep(3000);
|
||||
}
|
||||
keyPress("F");//阿圆对话
|
||||
await sleep(2500);
|
||||
click(1081, 955); //跳过对话
|
||||
await sleep(2500);
|
||||
// 检测今天是否是周一
|
||||
const today = new Date();
|
||||
if (today.getDay() === 1) { // getDay() 返回 0(周日)到 6(周六)
|
||||
await buyResin();// 如果是周一则购买树脂
|
||||
}
|
||||
click(1383, 430);//信任等阶
|
||||
await sleep(2500);
|
||||
click(1081, 955);//宝钱
|
||||
await sleep(2500);
|
||||
click(1812, 716);//好感度
|
||||
await sleep(2500);
|
||||
click(1863, 48);;
|
||||
await sleep(5000);
|
||||
click(1356, 804);
|
||||
await sleep(2500);
|
||||
click(1356, 804);
|
||||
await sleep(1500);
|
||||
await pathingScript.runFile("assets/recover.json");
|
||||
await sleep(5000);//回归大世界,避免后续部分js脚本没有路径追踪卡死
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "无树脂每日领奖",
|
||||
"version": "1.2",
|
||||
"version": "1.3",
|
||||
"description": "完成周本或首领讨伐等不使用浓缩树脂的副本挑战后,切换好感队前往凯瑟琳领奖、派遣、纪行、尘歌壶。如果是周一会在尘歌壶自动购买树脂",
|
||||
"authors": [
|
||||
{
|
||||
"name": "柒叶子",
|
||||
"links": "https://github.com/5117600049"
|
||||
},
|
||||
{
|
||||
"name": "Colin",
|
||||
"links": "https://github.com/ColinXHL"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"type": "select",
|
||||
"label": "宅邸类型(默认不去)",
|
||||
"options": [
|
||||
"",
|
||||
"蒙德",
|
||||
"璃月",
|
||||
"稻妻",
|
||||
|
||||
Reference in New Issue
Block a user