Jump to content

Recommended Posts

Posted

Asa, sa incepem.

Intram pe:

https://t.co/Oj9RLaDOoP


Facem free vps de la gugal

dupa scriem node -v, daca apare Version : 0.12.7 scriem

  Quote

nvm use stable

Dupa dam node -v si ar trebui sa apara

v4.2.1

 

 

Bun acum ca am rezolvat cu versiunea de node.js

Cream un nou folder

  Quote

mkdir steambot

cd steambot

 

instalam

 

  Quote

npm install steam

 

dupa facem un nou fisier cu

  Quote

touch bot.js

 

dupa scriem

  Quote

nano bot.js

 

acum in fisier scriem

  Quote

    var Steam = require('steam');
    var fs = require('fs');
    var bot = new Steam.SteamClient();
     
    if (fs.existsSync('sentryfile'))
    {
        var sentry = fs.readFileSync('sentryfile');
        console.log('[STEAM] logging in with sentry ');
        bot.logOn({
          accountName: '',
          password: '',
          shaSentryfile: sentry
        });
    }
    else
    {
        console.log('[STEAM] logging in without sentry');
        bot.logOn({
          accountName: '',
          password: '',
          authCode: ''
        });
    }
    bot.on('loggedOn', function() {
        console.log('[STEAM] Logged in.');
        bot.setPersonaState(Steam.EPersonaState.Online);
        //Tell steam we are playing games.
        //440=tf2
        //550=l4d2
        //730=csgo
        //570=dota2
        bot.gamesPlayed([440, 550, 730, 570]);
    });
     
    bot.on('sentry', function(sentryHash)
    {//A sentry file is a file that is sent once you have
    //passed steamguard verification.
        console.log('[STEAM] Received sentry file.');
        fs.writeFile('sentryfile',sentryHash,function(err) {
        if(err){
          console.log(err);
        } else {
          console.log('[FS] Saved sentry file to disk.');
        }});
    });
     
    //Handle logon errors
    bot.on('error', function(e) {
    console.log('[STEAM] ERROR - Logon failed');
        if (e.eresult == Steam.EResult.InvalidPassword)
        {
        console.log('Reason: invalid password');
        }
        else if (e.eresult == Steam.EResult.AlreadyLoggedInElsewhere)
        {
        console.log('Reason: already logged in elsewhere');
        }
        else if (e.eresult == Steam.EResult.AccountLogonDenied)
        {
        console.log('Reason: logon denied - steam guard needed');
        }
    })

 

 

acum dam CTRL + X / save / save

dupa scriem

  Quote

node bot

Si bot-ul ar trebui sa mearga :)

 

bot.js -> http://pastebin.com/fS4aJzcf

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.