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