From d910ef1fbcecf24e8ccad5bb0282f214864ceb73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B7=E4=B8=AA=E5=90=8D=E5=AD=97=E5=A5=BD=E9=9A=BE?= <25520958+MisakaAldrich@users.noreply.github.com> Date: Mon, 10 Mar 2025 18:09:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?JS=E8=84=9A=E6=9C=AC=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=8C=E5=80=8D=E5=A5=BD=E6=84=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=B9=B6=E7=A8=8D=E8=AE=B8=E5=A2=9E=E5=8A=A0=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?&=E6=96=B0=E5=A2=9E=E5=86=85=E7=BD=AE=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E9=98=9F=E4=BC=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/Team.json | 10 ++++ .../js/Auto TP 7Statue to SwitchParty/main.js | 56 +++++++++++++++++++ .../manifest.json | 13 +++++ .../settings.json | 13 +++++ .../DoubleFriendshipEncounterPoints/main.js | 20 +++---- .../settings.json | 5 ++ 6 files changed, 107 insertions(+), 10 deletions(-) create mode 100644 repo/js/Auto TP 7Statue to SwitchParty/assets/Team.json create mode 100644 repo/js/Auto TP 7Statue to SwitchParty/main.js create mode 100644 repo/js/Auto TP 7Statue to SwitchParty/manifest.json create mode 100644 repo/js/Auto TP 7Statue to SwitchParty/settings.json diff --git a/repo/js/Auto TP 7Statue to SwitchParty/assets/Team.json b/repo/js/Auto TP 7Statue to SwitchParty/assets/Team.json new file mode 100644 index 00000000..4d39bc7b --- /dev/null +++ b/repo/js/Auto TP 7Statue to SwitchParty/assets/Team.json @@ -0,0 +1,10 @@ +{"macroEvents":[{"type":4,"mouseX":1000,"mouseY":800,"mouseButton":"Left","time":100}, +{"type":2,"mouseX":1000,"mouseY":900,"time":150}, +{"type":2,"mouseX":1000,"mouseY":1000,"time":200}, +{"type":2,"mouseX":1000,"mouseY":1100,"time":250}, +{"type":2,"mouseX":1000,"mouseY":1200,"time":300}, +{"type":2,"mouseX":1000,"mouseY":1300,"time":350}, +{"type":2,"mouseX":1000,"mouseY":1400,"time":400}, +{"type":2,"mouseX":1000,"mouseY":1500,"time":450}, +{"type":5,"mouseX":1000,"mouseY":1500,"mouseButton":"Left","time":500}], +"info":{"name":"","description":"","x":746,"y":620,"width":1920,"height":1080,"recordDpi":1.75}} \ No newline at end of file diff --git a/repo/js/Auto TP 7Statue to SwitchParty/main.js b/repo/js/Auto TP 7Statue to SwitchParty/main.js new file mode 100644 index 00000000..3029d481 --- /dev/null +++ b/repo/js/Auto TP 7Statue to SwitchParty/main.js @@ -0,0 +1,56 @@ +(async function () { + async function SwitchCurrentParty() { + setGameMetrics(3840, 2160, 2); + await genshin.tp(2297.60, -824.45); + await sleep(3000); + await genshin.returnMainUi(); + await sleep(2000); + keyPress("L"); + await sleep(4500); + click(100, 2050); + await sleep(800); + + for(let i = 0; i < 2; i++){ + await keyMouseScript.runFile(`assets/Team.json`); + await sleep(800); + } + + click(100, 300); + await sleep(800); + click(100, 2050); + await sleep(800); + + for(let i = 1; i < settings.n; i++){ + click(3684, 1078); + await sleep(800); + } + + click(3200, 2050); + await sleep(1000); + keyPress("Escape"); + await sleep(1000); + + log.info("已切换至第"+ settings.n +"队"); + } + + if (!!settings.partyName) { + try { + log.info("正在传送回七天神像切换队伍"); + await genshin.tp(2297.60, -824.45); + await sleep(3000); + log.info("正在尝试切换至" + settings.partyName); + await genshin.switchParty(settings.partyName); + } catch { + log.warn("队伍切换失败,可能处于联机模式或其他不可切换状态"); + await genshin.returnMainUi(); + } + } else { + if (isNaN(settings.n)) { + log.warn("不是戈门,你连几号队伍都还没设置,你想让BetterGI切换成啥啊?赶紧去设置一下。如果不会,那就去去看看《BetterGI快速入门》,认真学习一下怎么“修改JS脚本自定义设置”吧,要是这都学不会的话还是去宛平南路600号看看"); + }else if (settings.n <= 0 || settings.n > 15){ + log.warn("不是戈门,你...你设置了个啥啊,BetterGI这也没法切啊"); + }else{ + await SwitchCurrentParty(); + } + } +})(); \ No newline at end of file diff --git a/repo/js/Auto TP 7Statue to SwitchParty/manifest.json b/repo/js/Auto TP 7Statue to SwitchParty/manifest.json new file mode 100644 index 00000000..cebb55a1 --- /dev/null +++ b/repo/js/Auto TP 7Statue to SwitchParty/manifest.json @@ -0,0 +1,13 @@ +{ + "manifest_version": 1, + "name": "返回七天神像切换指定队伍", + "version": "1.0", + "description": "回七天神像(脱战&回血),再按顺序切换指定队伍", + "authors": [ + { + "name": "LL&起个名字好难的喵" + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} \ No newline at end of file diff --git a/repo/js/Auto TP 7Statue to SwitchParty/settings.json b/repo/js/Auto TP 7Statue to SwitchParty/settings.json new file mode 100644 index 00000000..d5638348 --- /dev/null +++ b/repo/js/Auto TP 7Statue to SwitchParty/settings.json @@ -0,0 +1,13 @@ +[ + { + "name": "partyName", + "type": "input-text", + "label": "(二选一)需要切换的队伍名称" + }, + { + "name": "n", + "type": "input-text", + "label": "(二选一)需要切换的队伍序号" + } + +] \ No newline at end of file diff --git a/repo/js/DoubleFriendshipEncounterPoints/main.js b/repo/js/DoubleFriendshipEncounterPoints/main.js index 5cc98a54..63eaa842 100644 --- a/repo/js/DoubleFriendshipEncounterPoints/main.js +++ b/repo/js/DoubleFriendshipEncounterPoints/main.js @@ -1,6 +1,6 @@ (async function () { - async function RequestToVisitSereniteaPot() { + async function RequestToVisitSereniteaPot(total_clicks) { setGameMetrics(3840, 2160, 1.5); await sleep(2000); keyPress("VK_ESCAPE"); @@ -15,7 +15,6 @@ const avatar_increment = 250; //两按钮相隔坐标 const request_increment = 249; //两按钮相隔坐标 const request_fixed_value = 1118; //第四~七位好友申请造访按钮Y坐标 - const total_clicks = 14; let request_count = 0; // 先申请造访首位好友的尘歌壶 @@ -87,17 +86,18 @@ await sleep(20000); } - log.warn("注意:队伍中小于等于两人时,才会触发双倍奖励"); - await sleep(1500); - log.warn("注意:队伍中小于等于两人时,才会触发双倍奖励"); - await sleep(1500); - log.warn("注意:队伍中小于等于两人时,才会触发双倍奖励"); - await sleep(1500); - + let request_times = settings.request_times * 2; + let total_clicks = request_times ? request_times : 14; + + for (let n = 0 ; n < 6 ; n++) + log.warn("注意:队伍中小于等于两人时,才会触发双倍奖励"); + await sleep(2000); + if (!!settings.partyName) { try { log.info("正在传送回七天神像切换队伍"); await genshin.tp(2297.60, -824.45); + await sleep(3000); log.info("正在尝试切换至" + settings.partyName); await genshin.switchParty(settings.partyName); } catch { @@ -107,7 +107,7 @@ } else { await genshin.returnMainUi(); } - await RequestToVisitSereniteaPot(); + await RequestToVisitSereniteaPot(total_clicks); await claimEncounterPointsRewards(); await sleep(1500); await genshin.returnMainUi(); diff --git a/repo/js/DoubleFriendshipEncounterPoints/settings.json b/repo/js/DoubleFriendshipEncounterPoints/settings.json index eb99d0d6..8042a16d 100644 --- a/repo/js/DoubleFriendshipEncounterPoints/settings.json +++ b/repo/js/DoubleFriendshipEncounterPoints/settings.json @@ -3,5 +3,10 @@ "name": "partyName", "type": "input-text", "label": "(选填)需要切换的队伍名称" + }, + { + "name": "request_times", + "type": "input-text", + "label": "(选填)申请好友数,需小于等于7,不支持翻页" } ] \ No newline at end of file From 86a9d66a97dc74c4d9374975003d9f92369aea49 Mon Sep 17 00:00:00 2001 From: MisakaAldrich <25520958+MisakaAldrich@users.noreply.github.com> Date: Mon, 10 Mar 2025 10:17:21 +0000 Subject: [PATCH 2/2] update repo.json --- repo.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/repo.json b/repo.json index c798667f..045378a2 100644 --- a/repo.json +++ b/repo.json @@ -1,5 +1,5 @@ { - "time": "20250310173144", + "time": "20250310181719", "url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip", "file": "repo.json", "indexes": [ @@ -26915,6 +26915,15 @@ "description": "自动领取委托或派遣~|~自动传送到枫丹并领取每日委托或探索派遣,两个都要请运行两次,建议搭配领取历练点使用", "tags": [] }, + { + "name": "Auto TP 7Statue to SwitchParty", + "type": "directory", + "hash": "659020e42dac5e37fafc8e8875bfda34005438b2", + "version": "1.0", + "author": "LL&起个名字好难的喵", + "description": "返回七天神像切换指定队伍~|~回七天神像(脱战&回血),再按顺序切换指定队伍", + "tags": [] + }, { "name": "Auto TP 7Statue to SwitchTeams", "type": "directory",