我一直在尝试使用Steamkit2向CSGO大厅发送消息。 我使用了Hook和Analyzer来从steam获取发送消息时调用的函数。
首先我连接到我的csgo大厅!
var JoinLobby = new ClientMsgProtobuf<CMsgClientMMSJoinLobby>(EMsg.ClientMMSJoinLobby);
JoinLobby.ProtoHeader.routing_appid = 730;
JoinLobby.Body.app_id = 730;
JoinLobby.Body.persona_name = "DEIN-NAME-HIER";
JoinLobby.Body.steam_id_lobby = (ulong)109775243834561419; // Lobby link 109775243834561419/76561198312797851
Console.WriteLine(JoinLobby.Body.steam_id_lobby);
Client.Send(JoinLobby);
现在我已经得到了一个“OK”响应,我想用这个发送我的消息:
message CMsgClientMMSSendLobbyChatMsg {
optional uint32 app_id = 1;
optional fixed64 steam_id_lobby = 2;
optional fixed64 steam_id_target = 3;
optional bytes lobby_message = 4;
}
所以我尝试了这个:
var SendMessage = new ClientMsgProtobuf<CMsgClientMMSSendLobbyChatMsg>(EMsg.ClientMMSSendLobbyChatMsg);
SendMessage.Header.Proto.routing_appid = 730;
SendMessage.Body.app_id = 730;
SendMessage.Body.steam_id_lobby = 109775243834354861;
SendMessage.Body.steam_id_target = 109775243834354861;
//SendMessage.Body.lobby_message
但我不知道如何将文本写入“lobby_message”,因为它是一个字节。 也许你们可以帮助我:)