Jump to content
McKay Development

SpiTik

Member
  • Posts

    41
  • Joined

  • Last visited

Posts posted by SpiTik

  1. After deleting all node_modules and reinstalling all dependencies, the V4 beta 4 does not ask for a second steamGuard login if I use the loginKey supplied by the 'loginKey' event and do not supply a password, but do supply the username.

     

     

    let loginKey = fs.readFileSync(path).toString();

    this.client.logOn({

    "accountName": username,

    "rememberPassword": true,

    "loginKey": loginKey

    });

     

     

    this works, and does not ask for a steamGuard login every time. If I cleanup the storage of the loginKey, I can let the user store and login to multiple accounts.

    Please show me your save loginKey code please ^^ thanks

  2. mobile Guard and i want login to script without guard

    function dologin(){
      fs.readFile('./config.json', function(err, config_data){
        var data = config_data.toString();
        var config = JSON.parse(data);
          client.setOption('promptSteamGuardCode', false);
          if (fs.existsSync('login_'+botNO+'.json')) {
             console.log('[LOGIN] Login with saved credentials');
             var contents = fs.readFileSync('login_'+botNO+'.json');
             login = JSON.parse(contents);
             client.logOn({
                accountName: config.bots_info[botNO].username,
                loginKey: login.loginKey,
                password: config.bots_info[botNO].password,
                rememberPassword: true
             });
          } else {
             console.log('[LOGIN] Please sign in!');
             const logClient = {
                accountName: config.bots_info[botNO].username,
                password: config.bots_info[botNO].password,
                rememberPassword: true
              }
                client.logOn(logClient);
          };
      })
    }
    
    client.on('loginKey', function(key) {
      console.log(key);
      var out = '{"loginKey":"'+key+'"}';
       fs.writeFile('login_'+botNO+'.json', out, function(err){
          if(err) {
             console.log(err);
          } else {
             console.log('[LOGIN] Saved loginKey to \'login_'+botNO+'.json\'');
          }
       });
    });
    

    CONSOLE LOG

    [18:16:09] - [LOG] Start bot.

    [LOGIN] Please sign in!

    [18:16:10] - [bOT] Guard Request

    [18:16:40] - [LOG] logged in as client

    [ 'sessionid=xxxxxxxxxxx',

      'steamLogin=xxxxxxxxxxx',

      'steamLoginSecure=xxxxxxxxxxx' ]

    loginKey: xxxxxxxxxxx

    [LOGIN] Saved loginKey to 'login_bot_1.json'

    [18:16:50] - [ERROR] steam errror : LogonSessionReplaced

    [18:16:58] - [LOG] Start bot.

    [LOGIN] Login with saved credentials

    [18:16:58] - [ERROR] invalid password

     

  3. function doLogin(){
      fs.readFile('./config.json', function(err, config_data){
        var data = config_data.toString();
        var config = JSON.parse(data);
          client.setOption('promptSteamGuardCode', false);
          const logClient = {
            accountName: config.username,
            password: config.password
          }
    
          client.logOn(logClient);
      })
    }
    

    and all login info is ok and console write this 

     

    [steam-user] Warning: Logging into anonymous Steam account but a password was specified... did you specify your accountName improperly?

    and how block this. if wrong pass i have error function 

    e.eresult == SteamUser.EResult.InvalidPassword){
      		    console.log('['+getTime()+'] ' +'[ERROR] - invalid password');
              bot.chatMessage(steamid, messages.wrongpass);
              changeJSON1('checklogin', '0');
      		}
    
  4. And i have problem if im write two times in a row !guard guard script crashed Error : Already logged on , cannot logon again. Can you help me with this. Im try use client1.on('disconnect', function () { setTimeout(function () { start(); }, 10000); }); and not work.

  5. not work 

     
    client.on('steamGuard', function (domain, callback) {
        console.log("Steam Guard code needed from ");
          botGuard.chatMessage(clientID, "[bOT] : Idle bot are started please enter you guard. Write !guard <code>");
          botGuard.on("friendMessage", (steamid, message) => {
              if(message.indexOf("!guard") === 0) {
                  var code = (message.replace(/^!guard ?/, ""));
                  callback(code);
                } else {
                  botGuard.chatMessage(steamid, "[bOT] : Unknow command please contact support. If you dont know hot to use bot, bot is not for you!!")
              }
            });
    });
  6. const logOnOptionsBot = {
      accountName: "xxx",
      password: "xxx",
      twoFactorCode: SteamTotp.generateAuthCode("xxxxxxxxxxxxxxxxxxx")
    };
    bot1.logOn(logOnOptionsBot);
    bot1.on("loggedOn", () => {
        console.log("Starting ...");
        sleep(2);
        console.log("Bot");
        client.setPersona(SteamUser.Steam.EPersonaState.Online);
    
    });
    
    const logOnOptions = {
      accountName: "xxx",
      password: "xxx",
    };
    
    SteamUser.prototype._steamGuardPrompt = function(domain, lastCodeWrong, code) {
    	if (this.options.promptSteamGuardCode) {
        bot1.on("friendMessage", (steamid, message) => {
              if(message.indexOf("!guard") === 0) {
                var code = (message.replace(/^!guard ?/, ""));
                callback(code);
            }
          });
    	} else {
    		this.emit('steamGuard', domain, callback, lastCodeWrong);
    	}
    };
    
    client.logOn(logOnOptions);
    client.on("loggedOn", () => {
        console.log("Starting ...");
        sleep(2);
        console.log("You are logged in as : SpiTik Bot");
        client.setPersona(SteamUser.Steam.EPersonaState.Online);
        client.gamesPlayed(["test"]);
    
    });
    

    Im try create type steam guard to the steam chat with command and i have problem and i dont know where is problem 

     

     

    error : 

     
                callback(code);
                ^
     
    ReferenceError: callback is not defined
     
    Thanks for Help
  7. I already have it 

      manager.loadUserInventory(partner, 753, 3, true, (err, theirInv) => {
              if (err) {
                console.log(err);
              } else {
                offer.addTheirItems(theirInv);
    
                offer.setMessage(
                  `U cuppon`
                );
                offer.send((err, status) => {
                  if (err) {
                    console.log(err);
                  } else {
                    console.log(`Sent offer. Status: ${status}.`);
                  }
                });
              }
            }
          );
    
  8. Can you help me i dont know how to create this function with command !all take all partner cupons to offer.NQsd.png

    client.on("friendMessage", (partner, message) => {
      if(message === "!all"){
      const offer = manager.createOffer(partner);
    
          manager.loadUserInventory(partner, 753, 3, true, (err, theirInv) => {
              if (err) {
                console.log(err);
              } else {
                const theirItem =
                  theirInv[Math.floor(Math.random() * theirInv.length - 1)];
                offer.addTheirItems(theirItem);
    
                offer.setMessage(
                  `U cuppon`
                );
                offer.send((err, status) => {
                  if (err) {
                    console.log(err);
                  } else {
                    console.log(`Sent offer. Status: ${status}.`);
                  }
                });
              }
            }
          );
    }
    });
    
  9. var random = [
    'non steamgame1',

    'non steamgame2',

    'non steamgame3',

    'non steamgame4',

    ];
      client.setPersona(SteamUser.Steam.EPersonaState.Online),
        sleep.sleep(2),
    setInterval(function random1() {
      var randomnumber = Math.floor(Math.random() * (random.length));
      client.gamesPlayed([random[randomnumber], 668630, 20710, 200170, 504370, 431960, 207140, 368730, 484830, 356890, 262450, 210770, 730, 753, 466240, 602890, 526740, 238320, 610360, 433850, 428430, 361420, 359550, 242760, 12100, 12110, 581510, 431240, 422870, 716110, 718370, 365670, 479130, 448470, 533300, 485310,]);
    }, 180000); //3min

    'non steamgame1',

    'non steamgame1',

  10. How to accept request who sent with script offline and acc have pending request .

    This dont work.

    steam.on('friendRelationship', (steamid, relationship) => {

    if(relationship == 2){

    steam.addFriend(steamid);

    steam.chatMessage(steamid, "Hi");

    }

    });

×
×
  • Create New...