diff --git a/repo/js/Auto TP 7Statue to SwitchTeams/assets/Team.json b/repo/js/Auto TP 7Statue to SwitchTeams/assets/Team.json deleted file mode 100644 index 4d39bc7b..00000000 --- a/repo/js/Auto TP 7Statue to SwitchTeams/assets/Team.json +++ /dev/null @@ -1,10 +0,0 @@ -{"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 SwitchTeams/main.js b/repo/js/Auto TP 7Statue to SwitchTeams/main.js deleted file mode 100644 index 485c44cb..00000000 --- a/repo/js/Auto TP 7Statue to SwitchTeams/main.js +++ /dev/null @@ -1,39 +0,0 @@ -(async function () { - setGameMetrics(3840, 2160, 2); - await genshin.tp(2297.60, -824.45); - - if (isNaN(settings.n)) { - log.warn("不是戈门,你连几号队伍都还没设置,你想让BetterGI切换成啥啊?赶紧去设置一下。如果不会,那就去去看看《BetterGI快速入门》,认真学习一下怎么“修改JS脚本自定义设置”吧,要是这都学不会的话还是去宛平南路600号看看"); - }else if (settings.n <= 0 || settings.n > 15){ - log.warn("不是戈门,你...你设置了个啥啊,BetterGI这也没法切啊"); - }else{ - 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 +"队"); - } - -})(); \ No newline at end of file diff --git a/repo/js/Auto TP 7Statue to SwitchTeams/manifest.json b/repo/js/Auto TP 7Statue to SwitchTeams/manifest.json deleted file mode 100644 index cebb55a1..00000000 --- a/repo/js/Auto TP 7Statue to SwitchTeams/manifest.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "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 SwitchTeams/settings.json b/repo/js/Auto TP 7Statue to SwitchTeams/settings.json deleted file mode 100644 index 17cb02b0..00000000 --- a/repo/js/Auto TP 7Statue to SwitchTeams/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "name": "n", - "type": "input-text", - "label": "队伍序号" - } -] \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸).json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸).json new file mode 100644 index 00000000..bbb26ef4 --- /dev/null +++ b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸).json @@ -0,0 +1,48 @@ +{ + "info": { + "name": "好感-张牙舞爪的恶党-循环(二净甸)", + "type": "collect", + "author": "起个名字好难的喵", + "version": "1.0", + "description": "", + "bgiVersion": "0.42.3" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "dash", + "type": "path", + "x": 3614.6240234375, + "y": -521.58154296875, + "action_params": "" + }, + { + "id": 2, + "x": 3574.46875, + "y": -501.7119140625, + "type": "path", + "move_mode": "dash", + "action": "fight", + "action_params": "" + }, + { + "id": 3, + "x": 3605.1826171875, + "y": -513.31982421875, + "type": "path", + "move_mode": "dash", + "action": "", + "action_params": "" + }, + { + "id": 4, + "x": 3614.505859375, + "y": -521.4970703125, + "type": "path", + "move_mode": "dash", + "action": "", + "action_params": "" + } + ] +} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸刷肉版).json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸刷肉版).json new file mode 100644 index 00000000..aa6cbb63 --- /dev/null +++ b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环(二净甸刷肉版).json @@ -0,0 +1,93 @@ +{ + "info": { + "name": "好感-张牙舞爪的恶党-循环(二净甸刷肉版)", + "type": "collect", + "author": "起个名字好难的喵", + "version": "1.0", + "description": "", + "bgiVersion": "0.42.3" + }, + "positions": [ + { + "id": 1, + "x": 3614.63, + "y": -521.6, + "action": "", + "move_mode": "dash", + "action_params": "", + "type": "path" + }, + { + "id": 2, + "x": 3578.08, + "y": -500.75, + "action": "fight", + "move_mode": "dash", + "action_params": "", + "type": "path" + }, + { + "id": 3, + "x": 3572.375, + "y": -502.4375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 4, + "x": 3577.875, + "y": -497.375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 5, + "x": 3578.78125, + "y": -503.40625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 6, + "x": 3573.53125, + "y": -497.9375, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 7, + "x": 3576.03125, + "y": -503.0625, + "action": "", + "move_mode": "walk", + "action_params": "", + "type": "path" + }, + { + "id": 8, + "x": 3605.18, + "y": -513.32, + "action": "", + "move_mode": "dash", + "action_params": "", + "type": "path" + }, + { + "id": 9, + "x": 3614.63, + "y": -521.6, + "action": "", + "move_mode": "dash", + "action_params": "", + "type": "path" + } + ] +} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环.json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环.json deleted file mode 100644 index 0df1f89d..00000000 --- a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-循环.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "info": { - "name": "好感-张牙舞爪的恶党-循环", - "type": "collect", - "author": "起个名字好难的喵", - "version": "1.0", - "description": "", - "bgiVersion": "0.35.1" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "path", - "x": 2705.7783203125, - "y": -1623.0771484375, - "action_params": "", - "locked": false - }, - { - "id": 2, - "x": 2731.5625, - "y": -1576.40966796875, - "type": "path", - "move_mode": "walk", - "action": "fight", - "action_params": "", - "locked": false - }, - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "path", - "x": 2739.7841796875, - "y": -1571.65234375, - "action_params": "" - }, - { - "id": 2, - "x": 2731.3232421875, - "y": -1568.01171875, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 3, - "x": 2733.05078125, - "y": -1577.15283203125, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 4, - "x": 2727.404296875, - "y": -1575.0263671875, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 5, - "x": 2737.90625, - "y": -1571.599609375, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 6, - "x": 2733.5732421875, - "y": -1577.5380859375, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 7, - "x": 2731, - "y": -1575.51220703125, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 8, - "x": 2734.5048828125, - "y": -1570.70458984375, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 5, - "action": "", - "move_mode": "walk", - "type": "path", - "x": 2705.7783203125, - "y": -1623.0771484375, - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-神像.json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-神像.json deleted file mode 100644 index e567177f..00000000 --- a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-神像.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "info": { - "name": "好感-张牙舞爪的恶党-神像", - "type": "collect", - "author": "起个名字好难的喵", - "version": "1.0", - "description": "", - "bgiVersion": "0.35.1" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": 2567.5400390625, - "y": -1424.11767578125, - "action_params": "" - }, - { - "id": 2, - "x": 2565.2373046875, - "y": -1418.88720703125, - "type": "path", - "move_mode": "walk", - "action": "combat_script", - "action_params": "wait(5)" - }, - { - "id": 3, - "x": 2613.8125, - "y": -1503.6513671875, - "type": "path", - "move_mode": "fly", - "action": "", - "action_params": "" - }, - { - "id": 4, - "x": 2653.1630859375, - "y": -1552.5888671875, - "type": "path", - "move_mode": "fly", - "action": "", - "action_params": "" - }, - { - "id": 5, - "x": 2699.2822265625, - "y": -1616.28515625, - "type": "path", - "move_mode": "fly", - "action": "stop_flying", - "action_params": "" - }, - { - "id": 6, - "x": 2705.837890625, - "y": -1622.46826171875, - "type": "path", - "move_mode": "walk", - "action": "fight", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置(二净甸).json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置(二净甸).json new file mode 100644 index 00000000..8e866956 --- /dev/null +++ b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置(二净甸).json @@ -0,0 +1,30 @@ +{ + "info": { + "name": "好感-张牙舞爪的恶党-触发位置(二净甸)", + "type": "collect", + "author": "起个名字好难的喵", + "version": "1.0", + "description": "", + "bgiVersion": "0.42.3" + }, + "positions": [ + { + "id": 1, + "action": "", + "move_mode": "walk", + "type": "teleport", + "x": 3705.5322265625, + "y": -497.45068359375, + "action_params": "" + }, + { + "id": 2, + "x": 3615.4814453125, + "y": -521.2724609375, + "type": "path", + "move_mode": "fly", + "action": "combat_script", + "action_params": "wait(0.5),keypress(VK_SPACE),wait(2.5),click" + } + ] +} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置.json b/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置.json deleted file mode 100644 index 31904536..00000000 --- a/repo/js/Auto好感&刷兽肉/assets/AutoPath/好感-张牙舞爪的恶党-触发位置.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "info": { - "name": "好感-张牙舞爪的恶党-1", - "type": "collect", - "author": "起个名字好难的喵", - "version": "1.0", - "description": "", - "bgiVersion": "0.35.1" - }, - "positions": [ - { - "id": 1, - "action": "", - "move_mode": "walk", - "type": "teleport", - "x": 2806.4853515625, - "y": -1790.42626953125, - "action_params": "" - }, - { - "id": 2, - "x": 2812.5595703125, - "y": -1740.89013671875, - "type": "path", - "move_mode": "run", - "action": "", - "action_params": "" - }, - { - "id": 3, - "x": 2794.3583984375, - "y": -1707.4033203125, - "type": "path", - "move_mode": "walk", - "action": "", - "action_params": "" - }, - { - "id": 4, - "x": 2746.61328125, - "y": -1601.3955078125, - "type": "path", - "move_mode": "fly", - "action": "stop_flying", - "action_params": "", - "locked": false - }, - { - "id": 5, - "x": 2746.61328125, - "y": -1601.3955078125, - "type": "path", - "move_mode": "walk", - "action": "fight", - "action_params": "" - }, - { - "id": 6, - "x": 2705.7783203125, - "y": -1623.0771484375, - "type": "path", - "move_mode": "walk", - "action": "fight", - "action_params": "" - } - ] -} \ No newline at end of file diff --git a/repo/js/Auto好感&刷兽肉/main.js b/repo/js/Auto好感&刷兽肉/main.js index fb9846bd..0cef68b8 100644 --- a/repo/js/Auto好感&刷兽肉/main.js +++ b/repo/js/Auto好感&刷兽肉/main.js @@ -1,15 +1,15 @@ (async function () { const defaultExitDelay = 12; - const defaultLoadingDelay = 15; + const defaultLoadingDelay = 10; function validateAndSetDefaults(exitDelay, loadingDelay) { if (isNaN(exitDelay) || exitDelay <= 0) { log.warn("你没有设置退出延迟,将使用默认值:12秒"); exitDelay = defaultExitDelay; } - if (isNaN(loadingDelay) || loadingDelay <= 0) { - log.warn("你没有设置加载延迟,将使用默认值:15秒"); + if (isNaN(loadingDelay) || loadingDelay < 0) { + log.warn("你没有设置加载延迟,将使用默认值:10秒"); loadingDelay = defaultLoadingDelay; } return { exitDelay, loadingDelay }; @@ -72,26 +72,25 @@ await sleep(2000); } - async function AutoFriendship(times,statue_times) { - - log.info(`导航至好感-张牙舞爪的恶党-触发位置`); - await AutoPath('好感-张牙舞爪的恶党-触发位置'); - + async function AutoFriendship(times, statue_times, GetMeatMode) { + log.info(`导航至好感-张牙舞爪的恶党-触发位置(二净甸)`); + await AutoPath(`好感-张牙舞爪的恶党-触发位置(二净甸)`); + log.info(`自动好感开始...`); - + for (let i = 0; i < times; i++) { - // 每运行 5 次 '好感-张牙舞爪的恶党-循环' 后运行 '好感-张牙舞爪的恶党-神像' if ((i + 1) % statue_times === 0) { - await AutoPath('好感-张牙舞爪的恶党-神像'); + await genshin.tp(2297.60, -824.45); + await AutoPath(`好感-张牙舞爪的恶党-触发位置(二净甸)`); await ReopenTheGate(); log.info(`当前次数:${i + 1}/${times}`); logTimeTaken(startTime); - await AutoPath('好感-张牙舞爪的恶党-循环'); + await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`); } else { await ReopenTheGate(); log.info(`当前次数:${i + 1}/${times}`); logTimeTaken(startTime); - await AutoPath('好感-张牙舞爪的恶党-循环'); + await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`); } log.info(`已完成次数:${i + 1}/${times}`); logTimeTaken(startTime); @@ -108,21 +107,22 @@ log.info(`当前运行总时长:${formattedTime}`); } - // 启用自动拾取的实时任务 - const startTime = Date.now(); - dispatcher.addTimer(new RealtimeTimer("AutoPick")); - - setGameMetrics(1920, 1080, 1); // 设置游戏窗口大小和DPI let exitdelay = Number(settings.exitdelay); let loadingdelay = Number(settings.loadingdelay); - let UL = settings.UL ? settings.UL : false; - let inputValue = settings.inputValue ? settings.inputValue : 9999; - let times = UL ? (isNaN(inputValue) ? 1667 : Math.ceil(inputValue / 6)) : 10; + // 肉相关 + let GetMeatMode = settings.GetMeatMode ? settings.GetMeatMode : false; + let inputValue = settings.inputValue ? settings.inputValue : 300; + let times = GetMeatMode ? (isNaN(inputValue) ? 50 : Math.ceil(inputValue / 6)) : 10; + // 神像相关 let gostatue = settings.gostatue ? settings.gostatue : false; let statue = settings.statue ? settings.statue : 5; let statue_times = gostatue ? (isNaN(statue) ? 5 : statue) : 0; + // 启用自动拾取的实时任务,并配置成启用急速拾取模式 + dispatcher.addTimer(new RealtimeTimer("AutoPick", { "forceInteraction": true })); + const startTime = Date.now(); + setGameMetrics(1920, 1080, 1); // 设置游戏窗口大小和DPI const { exitDelay: validatedExitDelay, loadingDelay: validatedLoadingDelay } = validateAndSetDefaults(exitdelay, loadingdelay); const messages = [ '请确保队伍满员,并为队伍配置相应的战斗策略', @@ -136,8 +136,22 @@ } log.info('自动好感开始...'); + if (!!settings.partyName) { + try { + 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 { + await genshin.returnMainUi(); + } + //默认10次自动好感 - await AutoFriendship(times,statue_times); + await AutoFriendship(times,statue_times,GetMeatMode); // 计算并输出总时长 const endTime = Date.now(); diff --git a/repo/js/Auto好感&刷兽肉/manifest.json b/repo/js/Auto好感&刷兽肉/manifest.json index 4aeb2132..056431df 100644 --- a/repo/js/Auto好感&刷兽肉/manifest.json +++ b/repo/js/Auto好感&刷兽肉/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 1, "name": "好感-张牙舞爪的恶党(可用于刷兽肉)", - "version": "1.0", + "version": "1.1", "description": "通过突发事件:张牙舞爪的恶党刷好兽肉,并顺带获取好感度(超过10次后不再获取),请使用满员好感度队伍,并为全体队伍角色配置相应的战斗策略", "authors": [ { diff --git a/repo/js/Auto好感&刷兽肉/settings.json b/repo/js/Auto好感&刷兽肉/settings.json index 3a372e08..e1312a91 100644 --- a/repo/js/Auto好感&刷兽肉/settings.json +++ b/repo/js/Auto好感&刷兽肉/settings.json @@ -10,14 +10,19 @@ "label": "加载延迟(秒)(选填)" }, { - "name": "UL", + "name": "partyName", + "type": "input-text", + "label": "(选填)需要切换的队伍名称" + }, + { + "name": "GetMeatMode", "type": "checkbox", - "label": "开启刷兽肉模式" + "label": "开启刷兽肉模式(勾选才拾取散落的兽肉)" }, { "name": "inputValue", "type": "input-text", - "label": "刷取个数(选填,默认为9999)" + "label": "刷取个数(选填,默认为300)" }, { "name": "gostatue", @@ -27,6 +32,6 @@ { "name": "statue", "type": "input-text", - "label": "返回神像周期(选填,默认为5)" + "label": "返回神像周期(选填,默认为5次/周期)" } ] \ No newline at end of file