Jump to content
McKay Development

Recommended Posts

Posted (edited)
import {
    CDataGCCStrike15_v2_MatchInfo,
    CMsgGCCStrike15_v2_MatchList,
    CMsgGCCStrike15_v2_MatchListRequestFullGameInfo,
    CMsgGCCStrike15_v2_MatchListRequestRecentUserGames,
} from "csgo-protobuf";
import SteamUser from "steam-user";


const payload = new CMsgGCCStrike15_v2_MatchListRequestFullGameInfo({
    matchid: 3679454899302563903n,
    outcomeid: 3679460199292207251n,
    token: 16014,
});

const user = new SteamUser();
user.logOn({ accountName: "forum_win", password: "" });
user.on("debug", msg => {
    console.log("DEBUG", msg);
});
user.on("error", msg => {
    console.log("error", msg);
});
user.on("disconnected", (e, m) => console.log("DISCONNECTED", e, m));
user.on("loggedOn", () => {
    //https://github.com/SteamDatabase/Protobufs/blob/master/csgo/cstrike15_gcmessages.proto#L41
    //https://steamdb.info/app/730/info/
    user.sendToGC(730, 9147, {}, Buffer.from(payload.toBinary()));
});
user.on("receivedFromGC", (appid, msgType, payload) => {
    console.log(`Received message ${msgType} from GC ${appid} with ${payload.length} bytes`);
});

user.on("appQuit", () => {
    console.log(`quit!!!`);
});

Following logic found:
https://github.com/akiver/boiler-writter/blob/main/boiler-writter/main.cpp
https://github.com/akiver/boiler-writter/blob/main/boiler-writter/CSGOMatchList.cpp
https://github.com/akiver/boiler-writter/blob/main/boiler-writter/CSGOClient.cpp

Trying to leverage steam-user to call protobuf GC, but never receinving receivedFromGC event. Using the @types as well. Tried stepping through and have had no luck. Wondering if there's just a miss in the implementation.

Tried encoding the protobuf payload using a few different npm libs such as protobufjs and copying proto from: https://github.com/SteamDatabase/Protobufs/blob/master/csgo/cstrike15_gcmessages.proto#L41

Any direction would be greatly appreciated. Thanks!pre widget

Edited by forum_win
Redact old pw
Posted

You need to report that you're in CS2 by calling user.gamesPlayed(730), then complete the GC handshaking process before sending any other GC messages. For CS, this is sending ClientHello (4006) with the proper version number and waiting for ClientWelcome (4004) in response.

You can check node-globaloffensive for reference.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...