JS脚本:使用脆弱树脂

This commit is contained in:
起个名字好难
2024-12-23 05:50:13 +08:00
committed by GitHub
parent 8e0586f9af
commit 3b6a69dbb7
3 changed files with 52 additions and 0 deletions

View File

@@ -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");//关闭地图
})();

View File

@@ -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"
}

View File

@@ -0,0 +1,7 @@
[
{
"name": "times",
"type": "input-text",
"label": "每次使用个数"
}
]