From 3b6a69dbb7858bf963d07b69ca61457a38403561 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, 23 Dec 2024 05:50:13 +0800 Subject: [PATCH] =?UTF-8?q?JS=E8=84=9A=E6=9C=AC=EF=BC=9A=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E8=84=86=E5=BC=B1=E6=A0=91=E8=84=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repo/js/使用脆弱树脂/main.js | 30 ++++++++++++++++++++++++++++++ repo/js/使用脆弱树脂/manifest.json | 15 +++++++++++++++ repo/js/使用脆弱树脂/settings.json | 7 +++++++ 3 files changed, 52 insertions(+) create mode 100644 repo/js/使用脆弱树脂/main.js create mode 100644 repo/js/使用脆弱树脂/manifest.json create mode 100644 repo/js/使用脆弱树脂/settings.json diff --git a/repo/js/使用脆弱树脂/main.js b/repo/js/使用脆弱树脂/main.js new file mode 100644 index 00000000..92302546 --- /dev/null +++ b/repo/js/使用脆弱树脂/main.js @@ -0,0 +1,30 @@ +(async function () { + const defaultTime = 1 + + setGameMetrics(3840, 2160, 1.5); // 设置游戏窗口大小和DPI + + keyPress("M");//打开地图 + await sleep(1200); + click(2475, 95);// 点击添加体力 + await sleep(600); + click(1660, 950)// 选择脆弱树脂 + await sleep(600); + click(2350, 1550);// 点击使用 + await sleep(600); + + if (isNaN(settings.times || settings.times <= 0)) { + times = defaultTime + }else{ + for (let i = 1; i < settings.times; ++i) { + click(2585, 1295);// 点击使用数量 + await sleep(600); + } + } + + click(2350, 1550);// 点击使用 + await sleep(600); + click(1920, 1500);// 点击空白处 + await sleep(600); + keyPress("VK_ESCAPE");//关闭地图 + +})(); diff --git a/repo/js/使用脆弱树脂/manifest.json b/repo/js/使用脆弱树脂/manifest.json new file mode 100644 index 00000000..30c1a632 --- /dev/null +++ b/repo/js/使用脆弱树脂/manifest.json @@ -0,0 +1,15 @@ +{ + "manifest_version": 1, + "name": "使用脆弱树脂", + "version": "1.0", + "bgi_version": "0.37.1", + "description": "", + "authors": [ + { + "name": "起个名字好难", + "link": "https://mualani.fun" + } + ], + "settings_ui": "settings.json", + "main": "main.js" +} diff --git a/repo/js/使用脆弱树脂/settings.json b/repo/js/使用脆弱树脂/settings.json new file mode 100644 index 00000000..3b6b0719 --- /dev/null +++ b/repo/js/使用脆弱树脂/settings.json @@ -0,0 +1,7 @@ +[ + { + "name": "times", + "type": "input-text", + "label": "每次使用个数" + } +] \ No newline at end of file