Jump to content
McKay Development

Search the Community

Showing results for tags 'node.js'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. Hello all, Not sure if I'm posting this in the right place or if anyone can help me but I'm trying to make a trading bot for the first time and I'm having trouble trying to send a trade request to my friend. Here's the code: var SteamUser = require('steam-user'); // The heart of the bot. We'll write the soul ourselves. var SteamTrade = require('steam-trade'); var username = 'test'; var password = 'test'; // We have to use application IDs in our requests--this is just a helper var appid = { TF2: 440, DOTA2: 570, CSGO: 730, Steam: 753 }; // We also have to know context IDs which are a bit tricker since they're undocumented. // For Steam, ID 1 is gifts and 6 is trading cards/emoticons/backgrounds // For all current Valve games the context ID is 2. var contextid = { TF2: 2, DOTA2: 2, CSGO: 2, Steam: 6 } // Initialize the Steam client and our trading library var client = new SteamUser(); //steam client var trade = new SteamTrade(); //steam trade // Sign into Steam client.logOn({ accountName: username, password: password }); client.on('loggedOn', function (details) { logger.info("Logged into Steam as " + client.steamID.getSteam3RenderedID()); }); client.on('error', function (e) { logger.error(e); process.exit(1); }); client.on('webSession', function(sessionid) { trade.sessionID = sessionid; client.webLogOn(function(cookie) { cookie.forEach(function(part) { trade.setCookie(part.trim()); }); logger.info('Logged into web'); // No longer appear offline client.setPersonaState(steam.EPersonaState.LookingToTrade); }); }); client.trade('STEAM_0:1:55683311');I'm using some outdated tutorials from google ( I'm on the right track with it but I can't work out what I'm doing wrong. I keep running the script but my friend isn't getting a trade request so I don't know what I'm missing from it. Any help would be appreciated. Thanks, Adam
  2. Hello all! I have seen a similar question here, but to my understanding, it wasn't answered. https://dev.doctormckay.com/topic/251-cant-make-a-simple-login-due-to-steamguardmobile/ My code is as follows: var diff = 0; SteamTotp.getTimeOffset(function(err, d, l) { diff = d; }); console.log(diff); var code = SteamTotp.generateAuthCode(config.secret, diff); community.login({ "accountName": config.username, "password": config.password, "twoFactorCode": code, }, function(err){ if (err) { console.log(err); process.exit(1); } communityloggedin = true; console.log("Logged on to SteamCommunity with "+config.username); }); Unfortunately, I get the error [Error: SteamGuardMobile]. The answer to the other question linked above had an answer but I failed to see the fix. Thanks for your time, Spazhead
  3. From time to time (I think when more time has elapsed) webLogOn won't work properly, i have to wait for about 3-4 minutes (with message HTTP error 401) to send trade offer. Example debug output: .................................................. info: Offer type receive----Error: HTTP error 401info: Resend because of error ----Error: HTTP error 401info: Offer type receive----Error: HTTP error 401info: Resend because of error ----Error: HTTP error 401info: Offer type receive----Error: HTTP error 401info: Resend because of error ----Error: HTTP error 401info: Offer type receive----Error: HTTP error 401info: Resend because of error ----Error: HTTP error 401info: Logged into Steam as xxxxxdebug: Got web sessiondebug: Trade offer cookies set. Got API Key: xxxxxx My send offer function: function sendOffer(offer, tradeToken, offerType, socketClient, bot, gameId) { offer.send('', tradeToken, function (err) { if (err) { bot.webLogOn(function (sessionID, newCookie) { getSteamAPIKey({ sessionID: sessionID, webCookie: newCookie }, function (err, APIKey) { offers.setup({ sessionID: sessionID, webCookie: newCookie, APIKey: APIKey }); }); }); logger.info('Offer type ' + offerType + '----' + err); if (err == 'Error: HTTP error 401' || err == 'Error: HTTP error 503') { logger.info('Resend because of error ----' + err); sendOffer(offer, tradeToken, offerType, socketClient, bot, gameId); } else { if (offerType == 'receive') { console.log('receive' + err); socketClient.emit('send-offer-error', err); } } } else { ....... });}
  4. Hello, how can i make it that the bot delince incomoing tradeoffers: with grey skins, blue skins, sounvier skins, cases and stickers automaticlly? Thank You with best regards Tirrex3
  5. Hey, when i try to send 2 offers with the same item (for example it's a csgo key) and if one offer is accepted, the other one gets a steam error "items now unavailable for trade". I have more than 2 csgo keys in my inventory. What should i do? Save assetids in mysql or something else?
  6. Can I sell my items using method httpRequest to /sellitem with options? I tried but always failed, I know that automating market listings is against Steam ToS, but how it knows that my requests are automated?
  7. Hi, if I try to create an Account, it logs in, but doesn't do anything after that: var SteamUser = require('steam-user'); var steam_user = new SteamUser(); steam_user.logOn(); steam_user.createAccount("*username*", "*password*", "*email*", function(result,steamid){ console.log(result); console.log(steamid); }); I also tried logging in as an actual user, but then the createAccount function still doesn't do anything, what am I doing wrong? Thank you in advanced.
  8. When I use the example of your edit-group-announcement.js, then at the time of entering captcha I receive the address on the captcha , but there are no letters and numbers, how to fix it ? Thank you very much in advance. Sorry for my English.
  9. Hello. Is any possible to first login on steam account with this node-steamcommunity module, and next login on other website (sth like jackpot). Someone Could tell me what I should do?
  10. Hello, How can I add a friend if a friend request is received? I tried using addFriend(steamID), here's the code, am I doing something wrong? var SteamUser = require('steam-user'); var client = new SteamUser(); client.on("friend", function (steamID) { client.addFriend(steamID); } ); Thanks for the help! UKF
  11. Hello, I tried absolutely everything to run this bot (Idle Games) nothing works... but never figured out where is the problem.. Can somebody help me?
  12. All trades made via node are not accepted, but do not appear on my phone's mobile authenticator. This was not happening for 2 months while the bot was working perfectly. setInterval(function() { App.Bot.steamWebLogon.webLogOn(function(webSessionID, cookies){ App.Bot.offers.setup({ 'sessionID': webSessionID, 'webCookie': cookies, 'APIKey': App.config.apiKey }); App.Bot.community.setCookies(cookies); App.Bot.community.startConfirmationChecker(10000, 'u8OxVY+GJ10IlZ9mlmcrkW/d4B4='); }); }, 1000 * 90); App.Bot.community.on('newConfirmation', function (confirmation ) { debug(confirmation); });
  13. Hi, After accepting any trades and the status change to Accepted, I call the offer.getReceivedItems to update my bot database but the actions array comes without any action. Is this normal? Because if after I accept the trade if I call the tradeOfferManager.loadInventory I get the actions array with some data (and sometimes the assetid changes, but it's not an issue to me). In particular, I just need the inspect in game link. Is this a normal thing or is it a bug?
  14. Hi, I am using node-steamcommunity to login and then pass the cookies to node-steam-tradeoffer-manager. Whenever session expires, I relogin and pass the cookies to tradeoffer manager: community.on('sessionExpired', function(err) { community.login(logOnOptions,function(err,sessionID,cookies,steamguard) { if(err) { connectRetry-=1; if(connectRetry==0) { connectRetry=5; setTimeout(function(){logger.info("Couldn't reach server, will log in after 30 min");logIn();},1000*60*30); // try again after 30 minutes } } fs.writeFile(homeDir+'data/steamguard.txt', steamguard); logger.info("Logged into Steam"); connectRetry=5; //use steamcommunity cookies for tradeoffer-manager manager.setCookies(cookies, function(err) { if (err) { logger.error(err); process.exit(1); return; } logger.info("Got API key: " + manager.apiKey); }); community.chatLogon(); //Log on to the chat so that bot appears online community.startConfirmationChecker(10000,secrets.identity_secret); //poll every 10 seconds and confirm }); }); Sometimes I get the following error: info: Logged into Steam C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212 cookies.forEach(function(cookie) { ^ TypeError: Cannot read property 'forEach' of undefined at SteamCommunity.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212:9) at TradeOfferManager.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steam-tradeoffer-manager\lib\index.js:80:18) at C:\MyData\education\NodeJsTutorial\steam-trade-bot\tradingBot.js:344:11 at SteamCommunity.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:128:5) at Request._callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\components\http.js:62:14) at Request.self.callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:200:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:1067:10) at emitOne (events.js:82:20) The error is coming on the line manager.setCookies(). Am I handling it in the wrong way or is this some bug? Thanks & Regards, Bheem
  15. Greetings All, I was curious if anyone has tested the workings of BlueBird with Node-Steam-User? Do we know if it works currently? I would love to move away from callbacks, and into promises if it's an easy transition. Ideas?
  16. Im using this code: offer.getReceivedItems(true, function(err, items) { console.log(err); console.log(JSON.stringify(items)); });But response dont have float value, how can I get it?
  17. The question is how do I 'filter' trade offers. So only accept the offer if the trade contains ... itemsToReceive and ... itemsToGive. I want to achieve this using another file containing those option. I don't know how I should store them (like as an array, array of objects etc). I think an array of objects could work. So I made this as sample file: module.exports = { trades: [{ "itemsToReceive": "Breakout Key", "itemsToGive": "Mac-10 | Neon Rider (Factory New)" }, { "itemsToReceive": "Falchion Key", "itemsToGive": "P250 | Sand Dune (Battle Scarred)" }] } //all values represent their market_hash_name's
  18. Hi, I have tried to deposit 56 items using node bot, and on accepting Trade it returns only 29 Items as new items. I am using getReceivedItems() to get the Items with update assetid.Here is the link, https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOffer#getreceiveditemsgetactions-callback On accepting Trade, i have manageed "sentOfferChanged" event and with in that i have called getReceivedItems og TradeOffer objct to get updated information of Items in Trade as Below: tradeOffer.getReceivedItems(function(err,items){ }) I'm asking on behalf for my developer. any help appreciated!
  19. After send a trade offer with my bot to pick some user items and after accepted, sometimes this event is called... manager.on('sentOfferChanged', function(offer) {Sometimes this event is called: manager.on('receivedOfferChanged', function(offer, oldState) {What is the difference? :/
  20. You can use multiple apps by providing an array of any mixture of the above formats. How would I do that? Like this? client.gamesPlayed({ "game_id": 440 }, { "game_id": 730 });
  21. I am currently using the market_hash_name since it is always the same for the item (It's the english version of the market_hash). I've heard something about assetid aswell. I am not sure what to use. (By the way sorry for spamming this forum ) Adding on to that how do I accept trades as long as the itemsToReceive and itemsToGive are correct? I would like to save the itemToReceive and itemToGive that make the bot accept the trade in a trades.js file and add it to this if statement so that it works: if (offer.partner.getSteamID64() === '76561198127334975' | offer.itemsToGive.length === 0 /*|| itemsToReceive.market_hash_name and itemsToGive.market_hash_name from the offer equal those from the config*/) { offer.accept(); } So if anybody can help me with that it would be awesome
  22. Hello, I would like to ask is there a way for me to send a trade offer to a certain player and follow up if the offer is accepted or declined ? If yes, can you please point me in some direction. Thank you in advance
  23. I use node-steamcommunity , steam-user , steam-trade-offer-manager modul. But sometime at night crash my steambot. Erorr: Error: read ETIMEDOUT\n at exports._errnoException (util.js:893:11)\n at TCP.onread (net.js:555:26)" What's this?
×
×
  • Create New...