Skip to content

Instantly share code, notes, and snippets.

@alex7kom
Forked from seishun/givebadgeplz.js
Created September 26, 2013 17:55
Show Gist options
  • Select an option

  • Save alex7kom/6718004 to your computer and use it in GitHub Desktop.

Select an option

Save alex7kom/6718004 to your computer and use it in GitHub Desktop.

Revisions

  1. @seishun seishun created this gist Sep 25, 2013.
    24 changes: 24 additions & 0 deletions givebadgeplz.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    var fs = require('fs');
    var Steam = require('steam');

    var bot = new Steam.SteamClient();
    bot.logOn({
    accountName: 'username',
    password: 'password',
    shaSentryfile: fs.readFileSync('sentry')
    });

    bot.on('loggedOn', function() {
    console.log('Logged in!');
    bot.setPersonaState(Steam.EPersonaState.Online); // to display your bot's status as "Online"
    bot.setPersonaName('Morgiana'); // to change its nickname
    bot._send(Steam.EMsg.ClientCurrentUIMode | 0x80000000, Steam.Internal.CMsgClientUIMode.serialize({
    uimode: 1
    }));
    bot._send(Steam.EMsg.ClientGamesPlayedWithDataBlob | 0x80000000, Steam.Internal.CMsgClientGamesPlayed.serialize({
    gamesPlayed: [{
    gameId: 570,
    gameFlags: 5120
    }]
    }));
    });