Jump to content
McKay Development

R3v3rso

Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by R3v3rso

  1. Hello, I have some bots that I created for fun, which run on node.js code as well as ASF. My problem is that everytime my server restarts, ASF and the node.js scripts try to login at the same time, which gives me some "code expired" error, because the same 2fa code is used twice by ASF and my node.js script. Right now, when that happens, it prompts me for "2fa login code" in the script window. Is there any way to skip that prompt, and "force" 2fa to retry 30 seconds later if the code is expired or gives any kind of error ? I've already tried some stuff out, which didn't work at all, which is why I came here to ask for some help. Here is the basic code I use for login : const logOnOptions = { accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedSecret), rememberPassword: true }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('succesfully logged on with version '+config.version+'); client.setPersona(1); //"0": "Offline", "1": "Online", "2": "Busy", "3": "Away", "4": "Snooze", "5": "LookingToTrade", "6": "LookingToPlay" client.setUIMode(3); //"None": 0, "BigPicture": 1, "Mobile": 2, "Web": 3 client.gamesPlayed(config.customGamePlayed) if (config.debugMode == true) { console.log("DEBUG MODE IS ACTIVE !") } }); Thanks for reading ! Hopefully there's a way to achieve what I want to do. (People already advised me to just add some delay before my code starts so it doesn't "collide" with ASF : This solution is kinda useless, because this problem usually happens when there are steam downtimes, when every account is reconnecting at the end of the outage. so delay wouldn't work since script is already launched in that case)
  2. Then how should I handle the callback ? I'm currently getting errors on offer.decline(offer) , while offer.accept(offer) is fully working ? (btw I finally managed to make something functional out of the fs module, thank you for the advice !)
  3. Oh yeah I forgot to add that, so it should be offer.accept(offer) right ? Thanks for the suggestion. I'll look into that ! Have a nice day
  4. Hello everyone ! So I spent the last few weeks trying to create a bot that basically trades random steam cards for Steam Game Keys (with a lot of help from Vanilla ;p ) I am now pretty much done with all the trading stuff, and the last thing that I need is to get the Steam Key from my file. Basically, my goal is to - Count how many keys in total are in my .txt or .csv or .anything file and get that to a variable so I can add a line earlier in the code which checks if i have enough keys left before accepting the cards - Get the key(s) from the file (in order to send them in chat) -move the used keys to another file or modify their line to mark them as 'inactive' or something. Here is the part where I stopped : else { totalKeyWeGive = cardCount / cardToKey; console.log("We will give "+totalKeyWeGive+ " SteamKey"); offer.accept(); console.log("OFFER ACCEPTED"); //loop on how much we give the key for (i = 0; i < totalKeyWeGive; i++) { //get steamkey from file here ---------------------------------------------------------------------------- } var textMsg = "Hello ! You bought "+totalKeyWeGive+ " Game keys. Your keys are: "; } client.chatMessage(offer.partner.getSteamID64(), textMsg); } I already have most of the variables setup, and processed earlier in the code : cardToKey - How many cards are needed for one key cardCount - How many cards are there in the offer totalKeyWeGive - If everything is okay in the trade, how many keys should we give Any advices on how I should handle this ?
  5. Hello, I'm currently stuck with something that I assume is very simple, but I can't find any tutorial or help about it anywhere on the internet... I'm currently trying to create a bot that trades random Steam game codes for random steam cards, but my problem right now is that I don't know how to check if all items that the bot will receive are trading cards. I'm aware that this probably is a really easy thing, but I really have no idea where to find my answers :/ Thanks a lot for reading this, hopefully you can me with that This is what I have done so far : //This is where the pain begins. function processOffer(offer) { if (offer.partner.getSteamID64() === config.ownerID) { acceptOffer(offer); } else if (offer.isGlitched() || offer.state === 11) { console.log("Offer was glitched, declining."); declineOffer(offer); } else { var theirItems = offer.itemsToReceive var ourItems = offer.itemsToGive }} manager.on('newOffer', (offer) => { console.log("Offer received, processing"); processOffer(offer); })}
×
×
  • Create New...