Jump to content
McKay Development

ruben1

Member
  • Posts

    1
  • Joined

  • Last visited

ruben1's Achievements

  1. Hey I wanted to create a bot that farms hours on a few games and if I (player) start let's say CS:GO. The bot will give an error: Logged into Steam Boosting our hours on chosen games ... Set state to Snooze // starting CS:GO here { Error: LoggedInElsewhere at SteamUser._handleLogOff (C:\Users\Admin\node_modules\steam-user\components\logon.js:400:11) at SteamUser._handlers.(anonymous function) (C:\Users\Admin\node_modules\steam-user\components\logon.js:380:7) at SteamUser._handleMessage (C:\Users\Admin\node_modules\steam-user\components\messages.js:235:30) at emitThree (events.js:136:13) at CMClient.emit (events.js:217:7) at CMClient._netMsgReceived (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:323:8) at CMClient.handlers.(anonymous function) (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:603:8) at CMClient._netMsgReceived (C:\Users\Admin\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:305:24) at emitOne (events.js:116:13) at TCPConnection.emit (events.js:211:7) eresult: 6 } This is the bot's code: var colors = require("colors"); const SteamUser = require("steam-user"); const client = new SteamUser(); const logOnOptions = { accountName: "u", password: "p", }; autoRelogin = true; //correct? client.logOn(logOnOptions); client.on("loggedOn", () => { console.log("Logged into Steam".green); client.gamesPlayed(["Boosting Hours", 20, 70, 50, 9480, 300, 40, 130, 10, 730]); console.log("Boosting our hours on chosen games ...".yellow); client.setPersona(SteamUser.Steam.EPersonaState.Snooze); console.log("Set state to Snooze".blue); }); client.on('error', function (err) { console.log(err); client.gamesPlayed(["Boosting Hours", 20, 70, 50, 9480, 300, 40, 130, 10, 730]); }); I'm not sure if I need to use the autoRelogin boolean. I do know I need to handle the error. Not sure how to. So my thought now was to just add the gamesPlayed function again to start those games when the errors appear. But my thought of creating the bot was: // Farm bot 1. Log in on the account 2. Run a check if the account is already playing game(s) (with interval, so it constantly checks) 3. If it is playing a game -> do nothing 4. If it is not playing any games -> start idling a list of games 5. Also handle the LoggedInElsewhere? I'm learning C++ atm. And this is how I start my projects. Writing down what I want my program to do. And turn the text into code. I just can't with JS. Simply because I don't understand the language that well. Trust me, I don't like being spoonfed but I just can't code from scratch with JS. If anyone is planning to spoonfeed me. Do know I'd love some explaination. Otherwise I cannot learn from it. Best regards Ruben.
×
×
  • Create New...