Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Вопрос How can i invite another account by id (dota friend id) ?

  • Автор темы Автор темы Un1xCr3w
  • Дата начала Дата начала
You can’t type Friend ID directly into the party invite - you first need to add them as a friend, then they’ll appear in your friends list for invites.

In Friends tab, click "Add Friend", enter the ID. When they accept, you can invite them to the party normally.
 
how can i invite another account by id (dota friend id) ?
dota friend id is just steamid32;
bp/hook gc message send, then invite them normally and observe what happens and then rebuild that yourself(better yet, just invoke the wrapper that sends that message in the first place)
 
You can use external GC via SteamKit2 (
Пожалуйста, авторизуйтесь для просмотра ссылки.
) and send
Пожалуйста, авторизуйтесь для просмотра ссылки.
proto packet
If you can get login credentials and ready to use this method, there's example code to check the usage out (no clienthello or clientwelcome, so you can use it in already launched dota without injection):

C#:
Expand Collapse Copy
using SteamKit2.GC;
using SteamKit2.GC.Dota.Internal;

using SteamKit2;

var user = "user";
var pass = "pass";
uint APPID = 570;

string authCode = null, twoFactorAuth = null;

var steamClient = new SteamClient();
var manager = new CallbackManager( steamClient );

var steamUser = steamClient.GetHandler<SteamUser>();

manager.Subscribe<SteamClient.ConnectedCallback>( OnConnected );

manager.Subscribe<SteamUser.LoggedOnCallback>( OnLoggedOn );

Console.WriteLine( "Connecting to Steam..." );

steamClient.Connect();
SteamGameCoordinator gameCoordinator;

while ( true )
    manager.RunWaitCallbacks( TimeSpan.FromSeconds( 1 ) );

void OnConnected( SteamClient.ConnectedCallback callback )
{
    Console.WriteLine( "Connected to Steam! Logging in '{0}'...", user );

    steamUser.LogOn( new SteamUser.LogOnDetails
    {
        Username = user,
        Password = pass
    } );
}

void OnLoggedOn(SteamUser.LoggedOnCallback callback)
{
    bool isSteamGuard = callback.Result == EResult.AccountLogonDenied;
    bool is2FA = callback.Result == EResult.AccountLoginDeniedNeedTwoFactor;
    gameCoordinator = steamClient.GetHandler<SteamGameCoordinator>();

    if (isSteamGuard || is2FA)
    {
        Console.WriteLine("This account is SteamGuard protected!");

        if (is2FA)
        {
            Console.Write("Please enter your 2 factor auth code from your authenticator app: ");
            twoFactorAuth = Console.ReadLine();
        }
        else
        {
            Console.Write("Please enter the auth code sent to the email at {0}: ", callback.EmailDomain);
            authCode = Console.ReadLine();
        }

        return;
    }

    if (callback.Result != EResult.OK)
    {
        Console.WriteLine("Unable to logon to Steam: {0} / {1}", callback.Result, callback.ExtendedResult);
        return;
    }

    Console.WriteLine("Successfully logged on!");
    var r = new ClientGCMsgProtobuf<CMsgInviteToParty>((uint)EGCBaseMsg.k_EMsgGCInviteToParty);
    r.Body.steam_id = 76561197960287930;
    
    gameCoordinator.Send( r, APPID );
    
}
 
Назад
Сверху Снизу