Jump to content
McKay Development

klonaway

Member
  • Posts

    9
  • Joined

  • Last visited

klonaway's Achievements

  1. Thanks Doc ! I implemented your advice, and now everything is working smoothly ! For anyone willing to run a very simple idling bot, here is the code I use so far : // Reload every 2 hours setTimeout(function () { process.exit(0); }, 1000*3600*2); // Requires var SteamUser = require('steam-user') var SteamTOTP = require('steam-totp'); // Instance var client = new SteamUser(); // Secret personal data : klonaway var accountName = "yourAccount"; var password = "yourPassword"; var sharedSecret = "yourSharedSecret"; var identitySecret = "yourIdentitySecret"; // Preparing log on options var logOnOptions = { 'accountName': accountName, 'password': password, 'twoFactorCode': SteamTOTP.generateAuthCode(sharedSecret) }; // Sign into Steam client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Successfully logged on Steam as " + accountName); client.webLogOn(); client.setPersona(1); client.gamesPlayed([730]); }); The bot exits programmatically every 2 hours, and the "forever" javascript file below reloads it when it dies. I use this dirty trick with all my Steam bots to ensure the bot works almost permanently, despite the many Steam bugs and oddities ;-) var forever = require('forever-monitor'); var child = new (forever.Monitor)('./idlerLKS.js', { max: 100000, silent: false }); child.on('exit', function () { console.log('Forever has programmatically exited after 100000 restarts'); }); child.start(); Hope it helps someone. Happy botting !
  2. Hi Doc, hi everybody, I have been trying to code a simple game idler for CS:GO, and I dug into Steam-card-farmer's code to customize it as simply as possible. So far, the code I have is : // Reload every hour through an external "forever" call setTimeout(function () { process.exit(0); }, 1000*3600*1); // Requires var SteamUser = require('steam-user') var SteamTOTP = require('steam-totp'); // Instance var client = new SteamUser(); // Secret personal data : klonaway var accountName = "myAccount"; var password = "myPassword"; var sharedSecret = "mySharedSecret"; var identitySecret = "myIdentitySecret"; // Preparing log on options var logOnOptions = { 'accountName': accountName, 'password': password, 'twoFactorCode': SteamTOTP.generateAuthCode(sharedSecret) }; // Sign into Steam client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Successfully logged on Steam as " + accountName); client.webLogOn(); client.once('webSession', function(sessionID, cookies) { client.gamesPlayed({ "game_id": 730, }); }); });From the console, it seems to work fine, but I cant't get any of the thousands of card drops awaiting to actually drop. Any insight into what I must have missed ? Thanks a lot for any hint and happy botting !
  3. Yes, I just did. I guess they will ask me about the device I use for Steam Guard Mobile confirmations, and I don't know what I can answer without being rejected / banned : "Steam Desktop Authenticator" ? "API access through node-steam-tradeoffer-manager" ? Any good answer to feed them ?
  4. After investigating a bit more with all my accounts : all are working as usual, except the stuck account. The stuck account displays a 504 Gateway Timeout Error when loading confirmations on SDA, and the same behavior seems to happen with my node-steam-tradeoffer-manager script. I'm highly concerned, since this account holds a growing amount of thousands of items dispatched all over the internet ;-) Pleeeeeease, any kind of advice ? Cheers !
  5. Hi, I've been using node-steam-tradeoffer-manager flawlessly for months, and I'm suddenly running into trouble, with my script accepting offers continuously, but it seems unable to confirm afterwards. Gift offers are accepted as usual, but all offers requiring confirmation are stuck. I checked manually using Steam Desktop Authenticator, and the "Trade Confirmations" window is stuck, either unable to load pending confirmations, or loading a buggy shitload of confirmations. Anyone experiencing such a behavior ? Steam related ? Thx for any input :-) Happy botting !
  6. Thanks a lot for your time and attention. I thought interfacing my code with Steam would be the worst part of my project, and it ended up being the easiest ; all thanks to your amazing work ! Can't tell you how grateful I am. I'll keep you in my heart and will think about sending you some skins or bitcoins if my code proves lucrative. Cheers !
  7. Thanks for your quick answer and your amazing work (no wonder OpSkins is a moneymaker ;-)). I'll take a look at v3.23.1 but I couldn't care less about chatting : this bot is never meant to interact with human beings, he's a pure trader ! Two more questions and one remark : 1) Since : - the TradeOfferManager side checks pending trade offers every 2 minutes, - the confirmationChecker checks pending confirmations every minute, I guess 'sessionExpired' will be triggered within a minute if needed, so my checkedSteamLogged() thingy really seems useless to me, nope ? 2) An account firing max 2 or 3 (let's say 5) automatic requests per minute is ok with Steam ? I can't afford getting banned... I'm sure there are some awfully more spamming bots out there, but better feel safe... Do you know if there is a kind of safe request limit I shouldn't ever cross ? (didn't find any info about that) 3) That's just a remark which could improve your documentation : I noticed that if my app fails to login the first time, it will be stuck with a SteamGuardMobile error. This led me to the two-factor code and I *think* the code below only generates the ephemeral code once when booting : var logOnOptions = { 'accountName': accountName, 'password': password, 'twoFactorCode': SteamTOTP.generateAuthCode(sharedSecret) }; function logOnSteam() { steamCommunity.login(logOnOptions, function (e, sessionID, cookies, steamguard) {...}); } I tried wrapping the options in a generator and now it works 100% (so far...) : function generateLogon() { return { 'accountName': accountName, 'password': password, 'twoFactorCode': SteamTOTP.generateAuthCode(sharedSecret) }; } function logOnSteam() { steamCommunity.login(generateLogon(), function (e, sessionID, cookies, steamguard) {...}); } If my assumptions are correct and an ephemeral generator is indeed required, it might prove useful to put it somewhere in the documentation (don't remember seeing it)... Hope you'll take some time to read and answer all this, I'm closing this thread right after !
  8. To be honest with you, it will be very difficult unless you understand at least a bit the documentation. Dr. Mc Kay's Node.js libraries are amazingly well built and I have set up a basic Steambot in 30 minutes thanks to his work. But it took only 30 minutes because I had spent hundreds of hours learning programming / javascript / Node.js before that. If you want to build a Steam Bot using Dr. Mc Kay's libraries, you will need to understand at least : basic javascript (youtube/google => basic javascript tutorial) ---> 10 to 999 hours asynchronous javascript and how to use callbacks (youtube/google => ...) ---> 3928 hours unless you're smarter than me ;-) install Node.js and setup the environment ---> 1 hour read the documentation of node-steamcommunity and node-steam-tradeoffer-manager on Github ---> 1 hour put together the code for your bot in Node ---> 10 minutes to 999 hours depending on what you want your bot to do...The only thing I can tell you : building a Node-based bot is a good choice. Everything you need is publicly available and well-documented. Good luck with your project. Mine started hundreds of hours ago ;-)
  9. I have spent some time checking the node-steamcommunity GitHub wiki, and first of all : Dr. McKay, you are a hero for building up such an easy npm interface for the messy Steam API... I came up with some code to make sure I'm logged in almost 24/7 : // Modules are required and secret stuff is ready... function logOnSteam() { console.log("Logging in to Steam..."); steamCommunity.login(logOnOptions, function (e, sessionID, cookies, steamguard) { if (e) { console.log("There was an error logging in ! Error details : " + e.message); setTimeout(logOnSteam, 1000*60*4); // try to reconnect in 4 minutes return; } else { console.log("Successfully logged in as " + logOnOptions.accountName + " !"); steamCommunity.chatLogon(); // to appear online tradeOfferManager.setCookies(cookies, function (err) { if (err) { console.log(err); return; } }); } // automatic confirmation of EVERYTHING every "confirmationPeriod" ms steamCommunity.startConfirmationChecker(confirmationPeriod, identitySecret); }); } function checkSteamLogged() { steamCommunity.loggedIn( function (err, loggedIn, familyView) { if (err) { console.log(err); setTimeout(checkSteamLogged, 1000*60*4); // check again in 4 min } else if ( ! loggedIn ) { console.log("Steam login check : NOT LOGGED IN !"); logOnSteam(); } else { console.log("Steam login check : already logged in !"); } }); } steamCommunity.on('sessionExpired', function (err) { if (err) {console.log(err);} logOnSteam(); }); logOnSteam(); setInterval(checkSteamLogged, 1000*60*30); I guess this is enough to be safe... (unless I made some rookie mistake ?) This code is obviously the starting point for some TradeOfferManager handling, and I was wondering if I didn't go too far : if the 'sessionExpired' event is really triggered whenever we are not logged in, does it mean the 'checkSteamLogged()' function can be safely removed without harm ?'.startConfirmationChecker()' doesn't create a new instance each time it is called ? (I don't want to trigger 10 confirmations checkers leading to 10 times the intended check rate...)Thanks for any input !
×
×
  • Create New...