@@ -32,7 +32,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function comparePosition() {
|
async function comparePosition() {
|
||||||
const targetPosition = { X: 3615.48, Y: -521.27 };
|
const targetPosition = {
|
||||||
|
X: 3615.48,
|
||||||
|
Y: -521.27
|
||||||
|
};
|
||||||
const maxDistance = 20;
|
const maxDistance = 20;
|
||||||
let currentPosition;
|
let currentPosition;
|
||||||
|
|
||||||
@@ -80,14 +83,22 @@
|
|||||||
await AutoPath(`好感-张牙舞爪的恶党-触发位置(二净甸)`);
|
await AutoPath(`好感-张牙舞爪的恶党-触发位置(二净甸)`);
|
||||||
notification.send(`已抵达突发任务(张牙舞爪的恶党)触发位置`);
|
notification.send(`已抵达突发任务(张牙舞爪的恶党)触发位置`);
|
||||||
}
|
}
|
||||||
if (await comparePosition()){
|
// 开启急速拾取
|
||||||
|
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
|
||||||
|
"forceInteraction": true
|
||||||
|
}));
|
||||||
log.info(`当前次数:${i + 1}/${runTimes}`);
|
log.info(`当前次数:${i + 1}/${runTimes}`);
|
||||||
dispatcher.addTimer(new RealtimeTimer("AutoPick", { "forceInteraction": true }));
|
|
||||||
await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`);
|
await AutoPath(`好感-张牙舞爪的恶党-循环${GetMeatMode ? '(二净甸刷肉版)' : '(二净甸)'}`);
|
||||||
dispatcher.addTimer(new RealtimeTimer("AutoPick", { "forceInteraction": false }));
|
// 关闭急速拾取
|
||||||
|
dispatcher.addTimer(new RealtimeTimer("AutoPick", {
|
||||||
|
"forceInteraction": false
|
||||||
|
}));
|
||||||
|
// 判定本轮循环是否执行完毕
|
||||||
|
if (await comparePosition()) {
|
||||||
log.info(`已完成次数:${i + 1}/${runTimes}`);
|
log.info(`已完成次数:${i + 1}/${runTimes}`);
|
||||||
} else {
|
} else {
|
||||||
i = i - 1; // 退回这次次数
|
i = i - 1; // 退回这次次数
|
||||||
|
log.warn(`判定本轮循环执行失败,退回本轮执行次数:${i + 1}/${runTimes}`);
|
||||||
}
|
}
|
||||||
const estimatedCompletion = calculateEstimatedCompletion(startTime, i + 1, runTimes);
|
const estimatedCompletion = calculateEstimatedCompletion(startTime, i + 1, runTimes);
|
||||||
logTimeTaken(startTime);
|
logTimeTaken(startTime);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 1,
|
"manifest_version": 1,
|
||||||
"name": "兽肉好感:自动好感度&刷两只鳄鱼兽肉&卡时间",
|
"name": "兽肉好感:自动好感度&刷两只鳄鱼兽肉&卡时间",
|
||||||
"version": "1.3.1",
|
"version": "1.3.2",
|
||||||
"description": "通过突发事件:张牙舞爪的恶党刷兽肉,并顺带获取好感度(超过10次后不再获取),请使用满员好感度队伍,并为全体队伍角色配置相应的战斗策略",
|
"description": "通过突发事件:张牙舞爪的恶党刷兽肉,并顺带获取好感度(超过10次后不再获取),请使用满员好感度队伍,并为全体队伍角色配置相应的战斗策略",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user