Merge pull request #9 from babalae/main

pull upstream
This commit is contained in:
Yang-z
2024-11-25 01:59:35 +08:00
committed by GitHub
14 changed files with 539 additions and 84 deletions

250
repo.json
View File

@@ -1,5 +1,5 @@
{
"time": "20241123231222",
"time": "20241124194633",
"url": "https://github.com/babalae/bettergi-scripts-list/archive/refs/heads/main.zip",
"file": "repo.json",
"indexes": [
@@ -7,6 +7,23 @@
"name": "pathing",
"type": "directory",
"children": [
{
"name": "冒险家协会",
"type": "directory",
"children": [
{
"name": "冒险家协会_枫丹.json",
"type": "file",
"hash": "831340576c297eed16c7476c9b2cc6c77c1774fb",
"version": "8313405",
"author": "yemaxul",
"description": "传送到枫丹冒险家协会",
"tags": [
"冒险家协会"
]
}
]
},
{
"name": "劫波莲",
"type": "directory",
@@ -257,6 +274,23 @@
}
]
},
{
"name": "合成台",
"type": "directory",
"children": [
{
"name": "合成台_璃月.json",
"type": "file",
"hash": "5b9704fc242b1c43f8329fe537ae07871bbd7efa",
"version": "5b9704f",
"author": "Yemaxul",
"description": "璃月合成台,搭配树脂自动合成使用",
"tags": [
"合成台"
]
}
]
},
{
"name": "嘟嘟莲",
"type": "directory",
@@ -820,8 +854,8 @@
{
"name": "【收尾】狗粮-稻妻-神无冢-踏鞴砂-21个.json",
"type": "file",
"hash": "8621fbcf460765dd063fbf1a251370b6213baf78",
"version": "8621fbc",
"hash": "8febaf5a6750a1995c9ccdffad2db2108535943f",
"version": "8febaf5",
"author": "Yang-z",
"description": "",
"tags": [
@@ -988,6 +1022,18 @@
"备选"
]
},
{
"name": "狗粮-璃月-珉林-绝云间-3个.json",
"type": "file",
"hash": "10acfd4fd85aac95851fd281955c640524d4a8ce",
"version": "10acfd4",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
},
{
"name": "狗粮-璃月-碧水源-望舒客栈-1个.json",
"type": "file",
@@ -1299,14 +1345,62 @@
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-璃月-沉玉谷南陵.json",
"type": "file",
"hash": "6d0ba98f9eb9725021e4706002f26874cb41faab",
"version": "6d0ba98",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-璃月-珉林.json",
"type": "file",
"hash": "5b851e2a77d257f4587fe777071fe2c048f430a7",
"version": "5b851e2",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-纳塔-镜璧山(旁边有采集点,容易点卡神像).json",
"type": "file",
"hash": "ae9ffa9dd2d34426e6dbea44aac4f03cf5ea34c1",
"version": "ae9ffa9",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-须弥-千壑沙地.json",
"type": "file",
"hash": "947eecedb2cac74a444413575a959fe96fc13dc8",
"version": "947eece",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
}
]
},
{
"name": "狗粮-璃月-珉林-东北-9个.json",
"type": "file",
"hash": "8c435e280db31f09636ce71619a3294669232ce1",
"version": "8c435e2",
"hash": "d0d7f3a43a9cf3d70f8ee3951ff70bb670f2f550",
"version": "d0d7f3a",
"author": "Yang-z",
"description": "",
"tags": [
@@ -1324,17 +1418,6 @@
"圣遗物"
]
},
{
"name": "狗粮-璃月-珉林-绝云间-3个.json",
"type": "file",
"hash": "83422310c06a27ccaa47f34ddf57da6d0ea8c466",
"version": "8342231",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
},
{
"name": "狗粮-璃月-琼玑野-绿华池-3个.json",
"type": "file",
@@ -1369,10 +1452,10 @@
]
},
{
"name": "狗粮-纳塔-坚岩隘谷-回声之子南-47个 .json",
"name": "狗粮-纳塔-坚岩隘谷-回声之子南-67个 .json",
"type": "file",
"hash": "23f7082aa0392a3df2d35dcf03f3f31098a2a188",
"version": "23f7082",
"hash": "02ade0dea2fabcdca85660c1e0f87858e8e422df",
"version": "02ade0d",
"author": "Yang-z",
"description": "",
"tags": [
@@ -1391,10 +1474,10 @@
]
},
{
"name": "狗粮-纳塔-奥奇卡纳塔-托佐兹之岛-5个6个.json",
"name": "狗粮-纳塔-奥奇卡纳塔-托佐兹之岛-6个.json",
"type": "file",
"hash": "7a4a9501a27ea3e113bb87d015da1948e4872165",
"version": "7a4a950",
"hash": "8030f3443b947327d9660cda016360d8720b8c90",
"version": "8030f34",
"author": "Yang-z",
"description": "",
"tags": [
@@ -1511,28 +1594,6 @@
"圣遗物"
]
},
{
"name": "(恢复)狗粮-璃月-沉玉谷南陵.json",
"type": "file",
"hash": "6d0ba98f9eb9725021e4706002f26874cb41faab",
"version": "6d0ba98",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
},
{
"name": "(恢复)狗粮-璃月-珉林.json",
"type": "file",
"hash": "5b851e2a77d257f4587fe777071fe2c048f430a7",
"version": "5b851e2",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
},
{
"name": "(恢复)狗粮-璃月-琼玑野.json",
"type": "file",
@@ -1556,10 +1617,10 @@
]
},
{
"name": "(恢复)狗粮-纳塔-镜璧山.json",
"name": "(恢复)狗粮-纳塔-涌流地.json",
"type": "file",
"hash": "ae9ffa9dd2d34426e6dbea44aac4f03cf5ea34c1",
"version": "ae9ffa9",
"hash": "caabee992cca79374f8b831cd095182f7be229d5",
"version": "caabee9",
"author": "Yang-z",
"description": "",
"tags": [
@@ -1576,17 +1637,6 @@
"tags": [
"圣遗物"
]
},
{
"name": "(恢复)狗粮-须弥-千壑沙地.json",
"type": "file",
"hash": "947eecedb2cac74a444413575a959fe96fc13dc8",
"version": "947eece",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
}
]
},
@@ -1728,6 +1778,30 @@
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-枫丹-莫尔泰区.json",
"type": "file",
"hash": "12faa459e729b637c4547cdda7a0920435d54d5a",
"version": "12faa45",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
},
{
"name": "(恢复)狗粮-稻妻-鹤观.json",
"type": "file",
"hash": "3741d68e434ec2158255dc14e1c40a5711b09e06",
"version": "3741d68",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物",
"备选"
]
}
]
},
@@ -2006,17 +2080,6 @@
"圣遗物"
]
},
{
"name": "(恢复)狗粮-枫丹-莫尔泰区.json",
"type": "file",
"hash": "12faa459e729b637c4547cdda7a0920435d54d5a",
"version": "12faa45",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
},
{
"name": "(恢复)狗粮-枫丹-黎翡区.json",
"type": "file",
@@ -2049,17 +2112,6 @@
"tags": [
"圣遗物"
]
},
{
"name": "(恢复)狗粮-稻妻-鹤观.json",
"type": "file",
"hash": "3741d68e434ec2158255dc14e1c40a5711b09e06",
"version": "3741d68",
"author": "Yang-z",
"description": "",
"tags": [
"圣遗物"
]
}
]
},
@@ -2092,8 +2144,8 @@
{
"name": "【额外】狗粮-须弥-水天丛林+7个.json",
"type": "file",
"hash": "01d11ebe21e8136037c0d0e912690ce3bb279632",
"version": "01d11eb",
"hash": "4029396919abf41c9c35d778cd2f0784d5877fb6",
"version": "4029396",
"author": "Yang-z",
"description": "",
"tags": [
@@ -8415,6 +8467,15 @@
"name": "js",
"type": "directory",
"children": [
{
"name": "Auto Commission && Expedition",
"type": "directory",
"hash": "e6352ba625ef16e41aa2dbb0b09cce114bb83e5c",
"version": "1.0",
"author": "yemaxul",
"description": "自动领取委托或派遣~|~自动传送到枫丹并领取每日委托或探索派遣,两个都要请运行两次,建议搭配领取历练点使用",
"tags": []
},
{
"name": "AutoArtifacts",
"type": "directory",
@@ -8436,8 +8497,8 @@
{
"name": "AutoArtifacts_A_B_Extra",
"type": "directory",
"hash": "05b5fbcc122d792634d990bb475870da468fa13a",
"version": "1.3",
"hash": "21b05156bde2c9ed08305e80f335628eb489c227",
"version": "1.4",
"author": "Yang-z",
"description": "狗粮ABE路线自动拾取分解~|~圣遗物狗粮AB路线自动轮换及额外点位拾取途中自动分解。更新纳塔5.2优质点位。",
"tags": []
@@ -8469,6 +8530,15 @@
"description": "传送并自动秘境~|~BetterGI自带脚本用于传送后并执行自动秘境",
"tags": []
},
{
"name": "AutoFriendship",
"type": "directory",
"hash": "fc5fe084ae6893a46f1aba467b8c35b3cf2fdee1",
"version": "1.0",
"author": "HZYgrandma & 愚溪",
"description": "自动好感度~|~通过突发事件刷好感度,请配合好感度战斗脚本使用",
"tags": []
},
{
"name": "AutoWoodcutting",
"type": "directory",
@@ -8904,6 +8974,18 @@
"宵宫"
]
},
{
"name": "[好感度]芙宁娜芭芭拉.txt",
"type": "file",
"hash": "71d1a46a9dda8cc4a59f28a84dbb9dbcd6509307",
"version": "71d1a46",
"author": "HZYgrandma",
"description": "用于自动好感度脚本,另外两个位置带需要刷好感度的角色",
"tags": [
"芙宁娜",
"芭芭拉"
]
},
{
"name": "[效率低]二命优菈钟离挂机队.txt",
"type": "file",

View File

@@ -0,0 +1,7 @@
// 作者:HZYgrandma
// 描述:用于自动好感度脚本,另外两个位置带需要刷好感度的角色
芙宁娜 e,q
芭芭拉 e,attack(8)
芙宁娜 e,q
芭芭拉 e,attack(6)

View File

@@ -0,0 +1,28 @@
{
"info": {
"name": "冒险家协会_枫丹",
"type": "collect",
"author": "yemaxul",
"version": "2.0",
"description": "传送到枫丹冒险家协会",
"bgiVersion": "0.35.0"
},
"positions": [
{
"id": 1,
"x": 4508.97509765625,
"y": 3630.557373046875,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": 4495.7001953125,
"y": 3637.89501953125,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,11 @@
(async function () {
//传送到枫丹
log.info('开始传送到枫丹廷');
let Catherine_Egeria = `assets/AutoPath/冒险家协会_枫丹.json`;
await pathingScript.runFile(Catherine_Egeria);
log.info('开始每日委托或探索派遣,若无退出对话,则说明重复领取或未完成派遣');
// 自动每日或纪行
await keyPress("f");
dispatcher.addTimer(new RealtimeTimer("AutoSkip", { "forceInteraction": true }));
})();

View File

@@ -0,0 +1,13 @@
{
"manifest_version": 1,
"name": "自动领取委托或派遣",
"version": "1.0",
"description": "自动传送到枫丹并领取每日委托或探索派遣,两个都要请运行两次,建议搭配领取历练点使用",
"authors": [
{
"name": "yemaxul",
"link": "https://github.com/yemaxul"
}
],
"main": "main.js"
}

View File

@@ -0,0 +1,28 @@
{
"info": {
"name": "两武士",
"type": "collect",
"author": "HZYgrandma",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": -2738.38671875,
"y": -3414.45703125
},
{
"id": 2,
"x": -2739.7236328125,
"y": -3400.15625,
"type": "path",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,52 @@
{
"info": {
"name": "清理原住民",
"type": "collect",
"author": "HZYgrandma",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 1,
"x": -2740.609375,
"y": -3410.6923828125,
"action": "",
"move_mode": "walk",
"type": "teleport"
},
{
"id": 2,
"x": -2739.4873046875,
"y": -3437.853515625,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 3,
"x": -2764.4423828125,
"y": -3465.810546875,
"action": "",
"move_mode": "walk",
"type": "path"
},
{
"id": 4,
"x": -2771.2705078125,
"y": -3453.2373046875,
"action": "fight",
"move_mode": "walk",
"type": "path"
},
{
"id": 5,
"x": -2776.25,
"y": -3454.6982421875,
"action": "",
"move_mode": "walk",
"type": "path"
}
]
}

View File

@@ -0,0 +1,36 @@
{
"info": {
"name": "盗宝团",
"type": "collect",
"author": "HZYgrandma",
"version": "1.0",
"description": "",
"bgiVersion": "0.35.1"
},
"positions": [
{
"id": 3,
"x": -2739.7197265625,
"y": -3399.060546875,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 4,
"x": -2738.671875,
"y": -3427.38671875,
"type": "path",
"move_mode": "run",
"action": ""
},
{
"id": 5,
"x": -2756.6748046875,
"y": -3467.6328125,
"type": "path",
"move_mode": "walk",
"action": "fight"
}
]
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,108 @@
(async function () {
const defaultExitDelay = 12;
const defaultLoadingDelay = 15;
function validateAndSetDefaults(exitDelay, loadingDelay) {
if (isNaN(exitDelay) || exitDelay <= 0) {
log.warn("你没有设置退出延迟将使用默认值12秒");
exitDelay = defaultExitDelay;
}
if (isNaN(loadingDelay) || loadingDelay <= 0) {
log.warn("你没有设置加载延迟将使用默认值15秒");
loadingDelay = defaultLoadingDelay;
}
return { exitDelay, loadingDelay };
}
async function runGameActionsMultipleTimes() {
await sleep(1000);
keyPress("ESCAPE");
await sleep(1000);
click(50, 1030);
await sleep(1000);
click(1000, 750);
await sleep(validatedExitDelay * 1000);
click(1000, 550);
await sleep(validatedLoadingDelay * 1000);
}
async function resetMap() {
log.info("重置地图大小...");
await sleep(1000);
keyPress("M");
await sleep(1000);
click(1840, 1010);
await sleep(1000);
click(1450, 460);
await sleep(1000);
click(1840, 1010);
await sleep(1000);
click(1450, 140);
await sleep(1000);
keyPress("M");
log.info("重置地图大小完成");
}
async function AutoPath(locationName) {
try {
let filePath = `assets/AutoPath/${locationName}.json`;
await pathingScript.runFile(filePath);
} catch (error) {
log.error(`执行 ${locationName} 路径时发生错误`);
}
await sleep(2000);
}
async function AutoFriendshipDev(times) {
await resetMap();
log.info(`清理原住民...`);
await AutoPath('清理原住民');
log.info(`自动好感开始...`);
for (let i = 0; i < times; i++) {
await AutoPath('两武士');
await runGameActionsMultipleTimes();
log.info(`自动好感当前次数:${i + 1}/${times}`);
await AutoPath('盗宝团');
logTimeTaken(startTime);
}
log.info('自动好感已完成');
}
function logTimeTaken(startTime) {
const currentTime = Date.now();
const totalTimeInSeconds = (currentTime - startTime) / 1000;
const minutes = Math.floor(totalTimeInSeconds / 60);
const seconds = totalTimeInSeconds % 60;
const formattedTime = `${minutes}${seconds.toFixed(0).padStart(2, '0')}`;
log.info(`当前运行总时长:${formattedTime}`);
}
// 启用自动拾取的实时任务
const startTime = Date.now();
dispatcher.addTimer(new RealtimeTimer("AutoPick"));
let exitdelay = Number(settings.exitdelay);
let loadingdelay = Number(settings.loadingdelay);
const { exitDelay: validatedExitDelay, loadingDelay: validatedLoadingDelay } = validateAndSetDefaults(exitdelay, loadingdelay);
const messages = [
'请确保当前队伍为好感度队伍',
'好感度队伍:用待刷好感角色替换战斗策略中的人物即可',
'随后将自动匹配到战斗策略脚本',
];
for (let message of messages) {
log.info(message);
await sleep(1000);
}
log.info('自动好感开始...');
log.info(`退出延迟: ${validatedExitDelay}秒, 加载延迟: ${validatedLoadingDelay}`);
//默认10次自动好感
await AutoFriendshipDev(10);
// 计算并输出总时长
const endTime = Date.now();
const totalTimeInSeconds = (endTime - startTime) / 1000;
const minutes = Math.floor(totalTimeInSeconds / 60);
const seconds = totalTimeInSeconds % 60;
const formattedTime = `${minutes}${seconds.toFixed(0).padStart(2, '0')}`;
log.info(`自动好感运行总时长:${formattedTime}`);
})();

View File

@@ -0,0 +1,13 @@
{
"manifest_version": 1,
"name": "自动好感度",
"version": "1.0",
"description": "通过突发事件刷好感度,请配合好感度战斗脚本使用",
"authors": [
{
"name": "HZYgrandma & 愚溪",
}
],
"settings_ui": "settings.json",
"main": "main.js"
}

View File

@@ -0,0 +1,12 @@
[
{
"name": "exitdelay",
"type": "input-text",
"label": "退出延迟(秒)(选填)"
},
{
"name": "loadingdelay",
"type": "input-text",
"label": "加载延迟(秒)(选填)"
}
]

View File

@@ -0,0 +1,28 @@
{
"info": {
"name": "冒险家协会_枫丹",
"type": "collect",
"author": "yemaxul",
"version": "2.0",
"description": "传送到枫丹冒险家协会",
"bgiVersion": "0.35.0"
},
"positions": [
{
"id": 1,
"x": 4508.97509765625,
"y": 3630.557373046875,
"type": "teleport",
"move_mode": "walk",
"action": ""
},
{
"id": 2,
"x": 4495.7001953125,
"y": 3637.89501953125,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}

View File

@@ -0,0 +1,36 @@
{
"info": {
"name": "合成台_璃月",
"type": "collect",
"author": "Yemaxul",
"version": "1.0",
"description": "璃月合成台,搭配树脂自动合成使用",
"bgiVersion": "0.35.0"
},
"positions": [
{
"id": 1,
"action": "",
"move_mode": "walk",
"type": "teleport",
"x": 266.86328125,
"y": -652.8173828125
},
{
"id": 2,
"x": 258.4609375,
"y": -658.4111328125,
"type": "path",
"move_mode": "walk",
"action": ""
},
{
"id": 3,
"x": 266.3046875,
"y": -653.61328125,
"type": "target",
"move_mode": "walk",
"action": ""
}
]
}