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

[建议]自动化能否设置添加mute all功能 #51

Closed
ShimaRain opened this issue Jun 13, 2024 · 6 comments
Closed

[建议]自动化能否设置添加mute all功能 #51

ShimaRain opened this issue Jun 13, 2024 · 6 comments

Comments

@ShimaRain
Copy link

大乱斗习惯mute all

@BakaFT
Copy link

BakaFT commented Jun 19, 2024

这个软件不是有一个发送自定义文本的功能吗?把发送文本内容换成/mute all就行了`

似乎是模拟键盘操作吧,没细看,

https://github.com/Hanxven/LeagueAkari?tab=readme-ov-file#28-%E6%B2%A1%E4%BB%80%E4%B9%88%E7%94%A8%E7%9A%84%E5%8A%9F%E8%83%BD

async function sendCustomSequence() {

@ShimaRain
Copy link
Author

想要的是自动化,这个和我tab手动mute没有区别

@Hanxven
Copy link
Owner

Hanxven commented Jun 21, 2024

我无法修改游戏客户端,该功能很难实现。

@BakaFT
Copy link

BakaFT commented Jun 21, 2024

一个思路,判断游戏时间等于1s(或者其他任何接近于开局但是不是0的值)时,来发送/mute all

那么分两部分:

  1. 判断游戏时间
  2. 发送消息

判断游戏时间

两个办法

liveclientdata

localhost:2999 提供了不准确的游戏时间,但是精度够用了

读内存

Vanguard已经明确禁止读内存

这很好找,不多说。

发送消息

模拟键盘

LeagueAkari已经做到了,此时只需要加一个CheckBox,随后在指定时间自动执行一次就好。尽管这可能和开局的玩家输入产生冲突

调用内部函数

在我的认知里,CALL一个函数必然伴随着写内存,这也是极度危险的

static void SendChat(std::wstring_view Message, int Channel) {、
    // 地址是13.x的,有心者自行去分析
    // Channel
    // 1 for all , 2 for team , 4 for party

    typedef void(__thiscall* tSendChat)(DWORD64 ChatClient, const char* Message, int Color);
    tSendChat fnSendChat = (tSendChat)(0x1404D1640);

    DWORD bufSize = WideCharToMultiByte(CP_UTF8, NULL, Message.data(), -1, NULL, 0, NULL, NULL);
    LPSTR destStr = new CHAR[bufSize];
    WideCharToMultiByte(CP_UTF8, NULL, Message.data(), -1, destStr, bufSize, NULL, NULL);

    fnSendChat(*(DWORD64*)(0x14222E4B0), destStr, 3);
}

不过你既然开局按一个键来发送消息都懒得做,我觉得开发者也不至于在这个问题上过于纠结,懒一些就好了。

这个功能要么实现得不完美且复杂,要么完美但危险,仅仅是为了少按一个键,不值。

@ShimaRain
Copy link
Author

好的,谢谢你的解答👌

@ShimaRain
Copy link
Author

我无法修改游戏客户端,该功能很难实现。

好的,感谢你的回复

@Hanxven Hanxven closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
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