[Bug] 七圣召唤角色邀约全自动:猫尾酒馆地图定位失败,建议使用 moveMapTo 替代固定坐标操作

Open Beginner friendly
#3,742 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
game-dev

Research direction

The change is confined to gotoTavern() in the 七圣召唤角色邀约全自动 JS script, where the fixed-coordinate map steps (keyPress("m"), click(1841, 1015), click(1460, 140)) live. Compare with the 七圣召唤七日历练全自动 script, which uses genshin.moveMapTo(...) for the same job, and replace the block with a similar call. Done means the script reaches 猫尾酒馆 in-game at 1920×1080 and continues the invitation flow; this needs a manual run in the game client.

Written by the indexing model from the issue text.

Description

提交确认
  • 我已搜索现有 Issue,确认没有相同问题
  • 我已阅读相关脚本的 README 或使用说明
  • 我已确认问题来自脚本或脚本仓库;BetterGI 本体问题应提交到主仓库
  • 我已移除日志、截图中的 UID、路径等隐私信息
涉及范围

JS 脚本

BetterGI 版本号

0.66.0

相关脚本名称与版本

七圣召唤角色邀约全自动

运行环境与关键配置

操作系统:Windows11
游戏服务器与语言:国服 简中
游戏分辨率:1920×1080
脚本:七圣召唤角色邀约全自动

问题描述

运行 七圣召唤角色邀约全自动 时,脚本在执行 gotoTavern() 函数的过程中,无法正确定位猫尾酒馆,导致后续流程无法正常执行。

  • 问题分析
    当前脚本使用固定坐标操作地图:
keyPress("m");
await sleep(1500);
click(1841, 1015); // 地图选择
await sleep(1000);
click(1460, 140);  // 蒙德
await sleep(1200);

该实现依赖地图 UI 的位置与状态,存在点击偏移或地图定位失败的风险。

  • 建议修复(已本地验证)
    参考 七圣召唤七日历练全自动 中的地图定位方式,将上述逻辑替换为:
await genshin.moveMapTo(-867, 2281, "蒙德");

其余地图缩放、酒馆选择与传送逻辑保持不变。

  • 验证结果
    本地仅修改上述地图定位逻辑后,脚本已能够正常找到猫尾酒馆并继续运行。
    该修改无需调整识别模板或后续对战逻辑,建议作为最小修复合并。
    参考脚本:七圣召唤七日历练全自动
期望结果

脚本能够稳定定位猫尾酒馆,不依赖地图 UI 的固定屏幕坐标及当前地图状态。
建议在 gotoTavern() 中使用 BetterGI 已提供的 genshin.moveMapTo() 接口完成地图定位,与 七圣召唤七日历练全自动 的实现保持一致,提高脚本的稳定性与可维护性。

复现步骤
  1. 启动原神及 BetterGI,确保游戏处于正常可操作状态。
  2. 在 BetterGI 中运行 七圣召唤角色邀约全自动 脚本。
  3. 等待脚本执行 gotoTavern(),尝试前往猫尾酒馆。
  4. 脚本通过固定屏幕坐标打开地图选择菜单并切换至蒙德。
  5. 观察到地图定位失败,无法正确找到猫尾酒馆,导致后续角色邀请流程无法继续。

验证方式:

将 gotoTavern() 中原有的固定坐标地图操作替换为:

await genshin.moveMapTo(-867, 2281, "蒙德");

重新运行脚本后,已能够正常定位猫尾酒馆并继续执行后续流程,确认该修改在本地有效。

日志、截图或录屏

No response

其他信息

No response

Dominant language
JavaScript
Stars
793
Forks
505
Avg merge
1d 12h
Merged PRs (30d)
68

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from babalae/bettergi-scripts-list

All issues in babalae/bettergi-scripts-list

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.