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