Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2019
592
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * node-steam-user
  3.  * https://github.com/DoctorMcKay/node-steam-user
  4.  * npm install --save steam-user
  5.  */
  6. const steamUser = require('steam-user');
  7. /**
  8.  * 2FA Code SteamTotp
  9.  * https://github.com/DoctorMcKay/node-steam-totp
  10.  * npm install --save steam-totp
  11.  */
  12. var SteamTotp = require('steam-totp');
  13. var code2fa = SteamTotp.generateAuthCode(config.STEAM_ACCOUNT.secret2fa);
  14. /**
  15.  * node-globaloffensive
  16.  * https://github.com/DoctorMcKay/node-globaloffensive
  17.  * npm install --save globaloffensive
  18.  */
  19. const globalOffensive = require('globaloffensive');
  20. /**
  21.  * node-steam-user
  22.  * node-globaloffensive
  23.  * Steam und CSGO Client erzuegen und Login Optionen
  24.  */
  25. const steamclient = new steamUser();
  26. const csgoclient = new globalOffensive(steamclient);
  27. const logOnOptions = {
  28.     accountName: config.STEAM_ACCOUNT.name,
  29.     password: config.STEAM_ACCOUNT.password,
  30.     twoFactorCode: code2fa
  31. /**
  32.  * node-steam-user
  33.  * Login + Name setzen und auf CSGO GameID 730 starten
  34.  */
  35. steamclient.logOn(logOnOptions);
  36. steamclient.on('loggedOn', function() {
  37.     util.log('[STEAM] -> Logged into Steam with:', logOnOptions.accountName + 'SteamID:', steamclient.steamID.getSteam3RenderedID());
  38.     steamclient.setPersona(steamUser.EPersonaState.Online);
  39.     steamclient.setPersona(steamUser.Steam.EPersonaState.Online, config.BOT_CONFIG.botname);
  40.     steamclient.gamesPlayed(config.BOT_CONFIG.botgameid);
  41. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement