Jump to content
McKay Development

rektbot

Member
  • Posts

    34
  • Joined

  • Last visited

Posts posted by rektbot

  1. This issue arose only after updating steam-user with NPM; and i suspect it updated binarykvparser as a dependency.
     
    Key is successfully redeemed however throws this error BEFORE successful confirmation.
     
     
    /home//accounts/accounts/node_modules/binarykvparser/index.js:74
                                    throw new Error("Unknown KV type " + type + " encountered at offset " + offset[0]);
                                    ^
    
    Error: Unknown KV type 10 encountered at offset 106
        at Object.exports.parse (/home//accounts/accounts/node_modules/binarykvparser/index.js:74:11)
        at Object.exports.parse (/home//accounts/accounts/node_modules/binarykvparser/index.js:49:21)
        at /home//accounts/accounts/node_modules/steam-user/components/apps.js:463:38
        at Object.cb (/home//accounts/accounts/node_modules/steam-user/components/messages.js:152:4)
        at CMClient._netMsgReceived (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:276:26)
        at CMClient.handlers.(anonymous function) (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:386:8)
        at CMClient._netMsgReceived (/home//accounts/accounts/node_modules/steam-client/lib/cm_client.js:260:24)
        at emitOne (events.js:96:13)
        at TCPConnection.emit (events.js:188:7)
        at TCPConnection._readPacket (/home//accounts/accounts/node_modules/steam-client/lib/tcp_connection.js:73:7)
    
    

     

  2. Hi There,

     

    I'm currently using a couple of messages from the cstrike15 proto in a standalone script. I'd like to integrate this into my steambot but for the sake of cleanliness and consistency I want to manage it through steam-user.

     

    I'd like to know if there are any impediments or advice you might have for me. My understanding is:

    1. Protobufs - Drop the proto file + dependency into protobufs folder -> your protobufs.js will import it and add to schema
    2. Messages - Edit messages.js to add a SteamUser.EMsg.xxx reference for the request & response message (2 lines)
    3. Component - Add a new function in friends.js (or another file & add to index.js) to send a message for that proto eg. this._send(SteamUser.EMsg.xxxxx
    4. EMsg/Enums - Ensure EMsg exists for that message
    Point 4 is where I get stuck. There already appears to be a reference within EMsg.js but it's for a different message. I'm not sure what happens if i override this number. Within cstrike15 proto the enum type  is "ECsgoGCMsg".

     

    Nb. I don't really want to post what i'm trying to do because it could be abused from copy/paste script kiddies. Happy to provide more info 1:1 though.

     

    Thanks in advance for any guidance/advice/help.

     

    Regards,

    Kai
  3. I also found personas function sub-optimal compared with users. A very simple example illustrates this below. No need for callbacks.
     
     console.log((client.users[steamIDhere].persona_state==1) ? "online" : "offline");
    

    Nb. Per the documentation we only get data for "users we've encountered or requested data for" so be careful. I would handle it like this.

    var userInfo = client.users[steamIDhere];
    
    if(userInfo){
    // output info
    } 
    else {
    // no data on user
    } 
    

    Disclaimer: I'm a n00b, could be wrong.

  4. Hi There,

     

    I've created a script to get some info about a users account. getOwnedApps() and ownsApp() is really nice but I would like to understand more about licenses and getProductInfo.

     

     

    licenses:

     

    1. How do we know what this package is? Is there anyway to look it up?
    client.on('licenses', (licenses) => {
        //console.log(licenses.length);
      console.log(licenses[0]);
    });
    
    

    Returns the below. 

    { package_id: 15740,
      time_created: 1487406101,
      time_next_process: 0,
      minute_limit: 0,
      minutes_used: 0,
      payment_method: 1,
      flags: 0,
      purchase_country_code: 'AU',
      license_type: 1,
      territory_code: 55,
      change_number: 1796623,
      owner_id: 633543528,
      initial_period: 0,
      initial_time_unit: 0,
      renewal_period: 0,
      renewal_time_unit: 0 }
    

    getProductInfo

     

    1. What are all the object responses in appinfo?
    function getProd(){
    client.getProductInfo([730],[],function(res){
       console.log(res);
    });
    

    Returns:

    { '730': 
       { changenumber: 2713931,
         missingToken: false,
         appinfo: 
          { appid: '730',
            common: [Object],
            extended: [Object],
            config: [Object],
            install: [Object],
            depots: [Object],
            ufs: [Object] } } }
    
×
×
  • Create New...