js:(AutoArtifactsSalvage) 自动分解1-4星圣遗物的工具 (#987)
* Add files via upload * Delete repo/js/AutoArtifactsDestroy(1-4star) directory * Add files via upload
This commit is contained in:
50
repo/js/AutoArtifactsSalvage(1-4star)/main.js
Normal file
50
repo/js/AutoArtifactsSalvage(1-4star)/main.js
Normal file
@@ -0,0 +1,50 @@
|
||||
(async function () {
|
||||
// 读取用户设置
|
||||
let autoSalvage = settings.autoSalvage != undefined && settings.autoSalvage != '是' ? false : true;
|
||||
let autoSalvage1 = settings.autoSalvage1 != undefined && settings.autoSalvage1 != '是' ? true : false;
|
||||
let autoSalvage2 = settings.autoSalvage2 != undefined && settings.autoSalvage2 != '是' ? true : false;
|
||||
let autoSalvage3 = settings.autoSalvage3 != undefined && settings.autoSalvage3 != '是' ? true : false;
|
||||
let autoSalvage4 = settings.autoSalvage4 != undefined && settings.autoSalvage4 != '否' ? true : false;
|
||||
|
||||
log.debug(`autoSalvage: ${autoSalvage}; autoSalvage4: ${autoSalvage4};`);
|
||||
|
||||
// 分解圣遗物
|
||||
async function salvage() {
|
||||
if (!autoSalvage) return;
|
||||
|
||||
await genshin.returnMainUi();
|
||||
|
||||
keyPress("B"); await sleep(2000);
|
||||
click(670, 40); await sleep(1000); // 圣遗物
|
||||
click(660, 1010); await sleep(1000); // 分解
|
||||
click(300, 1020); await sleep(1000); // 快速选择
|
||||
|
||||
if (autoSalvage1) {
|
||||
click(200,150); await sleep(500); // 不包括1星
|
||||
}
|
||||
|
||||
if (autoSalvage2) {
|
||||
click(200,220); await sleep(500); // 不包括2星
|
||||
}
|
||||
|
||||
if (autoSalvage3) {
|
||||
click(200,300); await sleep(500); // 不包括3星
|
||||
}
|
||||
|
||||
if (!autoSalvage4) {
|
||||
click(200, 380); await sleep(500); // 不包括4星
|
||||
}
|
||||
|
||||
click(340, 1000); await sleep(1000); // 确认选择
|
||||
click(1720, 1015); await sleep(1500); // 分解
|
||||
click(1180, 750); await sleep(1000); // 进行分解
|
||||
|
||||
click(1840, 45); await sleep(1500); // 取消
|
||||
click(1840, 45); await sleep(1000); // 取消
|
||||
click(1840, 45); await sleep(1000); // 取消
|
||||
}
|
||||
|
||||
// 执行分解
|
||||
await salvage();
|
||||
log.info("分解完成。");
|
||||
})();
|
||||
15
repo/js/AutoArtifactsSalvage(1-4star)/manifest.json
Normal file
15
repo/js/AutoArtifactsSalvage(1-4star)/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"manifest_version": 1,
|
||||
"name": "自动分解1-4星圣遗物的工具",
|
||||
"version": "1.0.1",
|
||||
"bgi_version": "0.45.1",
|
||||
"description": "自动分解1-4星圣遗物的工具,可选择是否分解1-4星圣遗物。本脚本根据AutoArtifacts_A_B_Extra修改而来,作者还不会修bug,如有问题请先自行解决。",
|
||||
"authors": [
|
||||
{
|
||||
"name": "24qiaoyue",
|
||||
"link": "https://github.com/Yang-z"
|
||||
}
|
||||
],
|
||||
"settings_ui": "settings.json",
|
||||
"main": "main.js"
|
||||
}
|
||||
47
repo/js/AutoArtifactsSalvage(1-4star)/settings.json
Normal file
47
repo/js/AutoArtifactsSalvage(1-4star)/settings.json
Normal file
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"name": "autoSalvage",
|
||||
"type": "select",
|
||||
"label": "自动分解(默认:是)",
|
||||
"options": [
|
||||
"是",
|
||||
"否"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "autoSalvage1",
|
||||
"type": "select",
|
||||
"label": "自动分解包括1星圣遗物(默认:是)",
|
||||
"options": [
|
||||
"是",
|
||||
"否"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "autoSalvage2",
|
||||
"type": "select",
|
||||
"label": "自动分解包括2星圣遗物(默认:是)",
|
||||
"options": [
|
||||
"是",
|
||||
"否"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "autoSalvage3",
|
||||
"type": "select",
|
||||
"label": "自动分解包括3星圣遗物(默认:是)",
|
||||
"options": [
|
||||
"是",
|
||||
"否"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "autoSalvage4",
|
||||
"type": "select",
|
||||
"label": "自动分解包括4星圣遗物(默认:否)",
|
||||
"options": [
|
||||
"是",
|
||||
"否"
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user