Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

日本服务器上有修改的方法吗? #5

Open
MongMikng opened this issue Nov 2, 2023 · 2 comments
Open

日本服务器上有修改的方法吗? #5

MongMikng opened this issue Nov 2, 2023 · 2 comments

Comments

@MongMikng
Copy link

日本服务器上有修改的方法吗?

@HomeArchbishop
Copy link
Owner

需要做以下修改:

  • 将用户脚本源码 user/index.ts 的 Line75 和 Line90 两行均修改为
// 原为
//  if (!url.includes('/game-gateway')) { return data }
// 修改为
if (!url.includes('mjjpgs.mahjongsoul.com')) { return data }
  • 重新编译后,将脚本的 @match 规则修改为
// @match       https://game.mahjongsoul.com/*

修改后之后除了模拟点击外,都可以正常运行。但是请注意,目前的模拟点击(也就是bot模块)只支持识别繁体模板,因此不能正确地点击 吃/碰/杠/拔北/和/自摸/加杠 等图标。 如需适配,还需要替换 server/bot/templates/ 目录下的相应图片模板。(模板尺寸应为网页端 canvas.width = 1536px 时的对应尺寸,即:将canvas调整至1536px宽再截图。)

希望有所帮助。

@321098123
Copy link

321098123 commented Dec 9, 2023

How does Global Server edit user/index.ts?

*solved. if (!url.includes('mjusgs.mahjongsoul.com')) { return data }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants