Jump to content
McKay Development

Search the Community

Showing results for tags 'Question'.

  • 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. So I'm quite new to this stuff and I'd like to get some help. I want to make a bot that accepts only certain trade offers, for ex, user put a KB-808 in the trade offer and took 3 scrap(/1 rec) and I want that to be accepted, what I have right now accepts everything, here's the bot: ----------------------------------------- var Steam = require ('steam'); var SteamUser = require('steam-user'); var client = new SteamUser(); var SteamTotp = require('steam-totp'); var fs = require("fs"); var SteamCommunity = require('steamcommunity'); var community = new SteamCommunity(steamClient); var steamClient = new Steam.SteamClient(); var SteamUser = new Steam.SteamUser(steamClient); var SteamFriends = new Steam.SteamFriends(steamClient); var crypto = require('crypto'); var SteamTradeOffers = require('steam-tradeoffers'); var offers = new SteamTradeOffers(); var config; try { config = JSON.parse(fs.readFileSync('./config.json')); } catch (err) { console.log("Error: Unable to parse config.json"); console.log(err); process.exit(1); } client.logOn({ "accountName": config.username, "password": config.password }); var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager({ "community": community, "language": "en", "pollInterval": 1000 }); client.on("webSession", function(steamID, cookies){ manager.setCookies(cookies); community.setCookies(cookies); SteamTotp.steamID = steamID; community.startConfirmationChecker(2500, config.identitySecret) }); manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID()); offer.accept(function(err) { if (err) { console.log("Unable to accept offer: " + err.message); } else { community.checkConfirmations(); // Check for confirmations right after accepting the offer console.log("Offer accepted"); } }); }); manager.on('receivedOfferChanged', function(offer, oldState) { console.log("Offer #" + offer.id + " changed: " + TradeOfferManager.getStateName(oldState) + " -> " + TradeOfferManager.getStateName(offer.state)); if (offer.state == TradeOfferManager.ETradeOfferState.Accepted) { offer.getReceivedItems(function(err, items) { if (err) { console.log("Couldn't get received items: " + err); } else { var names = items.map(function(item) { return item.name; }); console.log("Received: " + names.join(', ')); } }); } }); client.on("loggedOn", function(details) { client.setPersona(Steam.EPersonaState.Online) client.gamesPlayed(440) console.log("Successfully logged onto Steam, APIKey: " + config.apikey) }); client.on("steamGuard", function(domain, callback, lastCodeWrong) { if(lastCodeWrong) { console.log("Last code wrong, retrying"); } var shared_secret = config.sharedsecret; callback(SteamTotp.generateAuthCode(shared_secret)); }); community.on("newConfirmation", function(conf) { conf.respond(Math.floor(Date.now() / 1000), SteamTotp.getConfirmationKey(config.identitysecret,Math.floor(Date.now() / 1000), "allow"), true, function(err){ if(err) { console.log("Confirmation failed: " + err); return; } console.log("Sucessfully confirmed!"); }); }); community.on("confKeyNeeded", function(tag, callback){ var time = Math.floor(Date.now() / 1000); callback(null, time, SteamTotp.getConfirmationKey(config.identitysecret, time, tag)); });
  2. How can i get the new websession cookies after they expire? e.x. so i can confirm trades. The only way i know it to basically restart the bot daliy.
  3. Hey Guys, i run into a very simple problem but cant find a solution for it. during my creation process for the trade offer, i run a kind of loop and insert each item single into the trade offer object. the problem behind is, after ive added a item (e.g. a cs:go case) and in a other round of inserting i add the same case again the object "fails" to insert it, since its allready in it. the solution should be to increase the amount of it. and theres where i cant find a solution for, since its not only to increase it to 2.. it could also be 3-xxxx . is there any way to recieve the amount of the item allready in the "offer object" so i can increase this directly or remove the item and insert it with a higher amount then ? p.s. sry for a non nativ english tried my best
  4. Hello, I got a node.js bot from someone on my friendlist. What it does / should do: Instantly accept donations (offers, that don't take anything from my inventory) Ignore every offer that is not a donation (just don't decline it) Decline offers from people who have escrow Send a notification to my smartphone It worked without problems for days on my RaspberryPI. Suddenly, I saw some declined trades and checked my bot. The error log: Bot connected to Steam! Got API key for bot: 792A6EBE693DE91876804BXXXXX Received new offer from 76561198293XXXXXX Accepting offer from 76561198293XXXXXX Sending notification! Received new offer from 765611982934XXXXX Accepting offer from 765611982934XXXXX Sending notification! Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 765611982931XXXXX [Error: Not Logged In] Declined cause escrow - 765611982931XXXXX - undefined - undefined Received new offer from 76561198292XXXXXX [Error: Not Logged In] Declined cause escrow - 76561198292XXXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined Received new offer from 765611982934XXXXX [Error: Not Logged In] Declined cause escrow - 765611982934XXXXX - undefined - undefined I greyed out the IDs for privacy reasons. He accepted two offers, then he declined ALL offers from four different accounts. Three tradebots (which belong together with the first two he accepted) and my roommates account, who 100% sure is not on escrow. I am kind of new to JS and SteamBots in general, but I got the feeling, that there is an error in my SteamBot causing it not to be able to read the "daysTheirEscrow" and "daysMyEscrow" variable (they appear to be "undefined" in the error). Here is my Node.JS script: var Pushover = require('node-pushover'); var fs = require('fs'); var util = require('util'); var SteamUser = require('steam-user'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var community = new SteamCommunity(); var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "localhost", "language": "en", }); var ConfirmationChecker = false; var shared_secret = 'x='; var identity_secret = 'x'; var timekey = Math.round(Date.now() / 1000); var code = SteamTotp.generateAuthCode(shared_secret); var logOnOptions = { accountName: 'x', password: 'x', twoFactorCode: code }; var push = new Pushover({ token: "x", user: "x" }); client.logOn(logOnOptions); client.on('loggedOn', function(details) { console.log("Bot connected to Steam!"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if(err) { console.log(err); process.exit(1); return; } console.log("Got API key for bot: " + manager.apiKey); community.setCookies(cookies); var identity_hashed = identity_secret.toString('base64'); var poll_interval = setInterval( function() { manager.doPoll(); }, 1000); }); }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData)); }); manager.on('newOffer', function(offer) { var steamID = offer.partner.getSteamID64(); console.log("Received new offer from " + steamID); offer.getEscrowDuration(function(_err, daysTheirEscrow, daysMyEscrow) { if (daysTheirEscrow != 0 || daysMyEscrow != 0 || _err) { offer.decline( function() { console.log('Declined cause escrow - ' + steamID + ' - ' + daysTheirEscrow + ' - ' + daysMyEscrow); }); console.log(_err); } else { if (!offer.itemsToGive.length || steamID == "76561198046273125") { console.log("Accepting offer from " + steamID); console.log("Sending notification!"); var newItemsReceive = []; offer.itemsToReceive.forEach(item => newItemsReceive.push(item.market_hash_name)); push.send("Bot accepted!", offer.message + "\nItem: " + newItemsReceive[0] + " [" + newItemsReceive.length + "]"); offer.accept(); } else { var newItems = []; offer.itemsToReceive.forEach(item => newItems.push(item.market_hash_name)); var newItemsReceive = []; offer.itemsToReceive.forEach(item => newItemsReceive.push(item.market_hash_name)); var newItemsGive = []; offer.itemsToGive.forEach(item => newItemsGive.push(item.market_hash_name)); push.send("New offer!", "Give: " + newItemsGive + "! " + "Receive: " + newItemsReceive + "!"); console.log("Ignoring an offer from " + steamID); } } }); }); community.on('confKeyNeeded', function(tag, callback) { var time = Math.floor(Date.now() / 1000); console.log('Conf Key Needed'); callback(null, time, SteamTotp.generateAuthCode(shared_secret, time, tag)); }); Any help is appreciated! Thank you in advance!
  5. Hey there, I made a quick code to send a trade offer but the error i got is HTTP error 401 and i don't know how to fix it. The bot is not a limited account. ... var offers = new TradeOfferManager({ steam: client, language: "en", pollInterval: 10000, domain: 'localhost', cancelTime: 300000 }); var code = SteamTotp.generateAuthCode(config.shared_secret); var login_details = { "accountName": config.username, "password": config.password, "twoFactorCode": code }; community.login(login_details, function(err, sessionID, cookies, steamguard) { if (err) { console.log("Steam login fail: " + err.message); process.exit(1); } console.log("Logged into Steam"); offers.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + offers.apiKey); }); community.startConfirmationChecker(10000, config.identity_secret); }); client.on('webSession', function (sessionID, cookies) { offers.setCookies(cookies, function (err){ if (err) { console.log('Unable to set trade offer cookies: '+err); process.exit(1); } console.log("Trade offer cookies set. Got API Key: "+offers.apiKey); }); }); var offer = offers.createOffer("xxx"); offer.addTheirItem({"appid": 753, "contextid": 6, "assetid": "1768042517"}); offer.send("", "xxx", function(err, status) { if (err) { console.log(err); } else { console.log("Offer #" + offer.id + " " + status); } });
  6. Hello. Is any option to get the list steamid of friends. Thanks.
  7. Hi there, Here is my situation: I created multiple steam accounts(50+) months ago and enabled 2FA on all of them through the steam mobile app on my iPhone. When I enabled mobile authenticater on them the app provided me with Recovery codes and I saved all the codes... Now the problem/question Do I need to disable 2FA on each account (using the recovery code) and then follow the steps as per https://dev.doctormckay.com/topic/289-trading-and-escrow-mobile-trade-confirmations/?do=findComment&comment=734 To get the the shared_secret Or is there another way? Any help is much appreciated!
  8. Hi all, I'm trying to setup node-steamcommunity to accept trade offers from my VPS. I just copied simple script from node-steam-tradeoffer-manager: steam.login(logOnOptions, function(err, sessionID, cookies, steamguard) { if (err) { console.log("Steam login fail: " + err.message); process.exit(1); } fs.writeFile('steamguard.txt', steamguard); console.log("Logged into Steam"); manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); }); steam.startConfirmationChecker(5000, config.sharedSecret); // Checks and accepts confirmations every 30 seconds }); It works on my local machine (windows 10) - bot is able to accept confirmations. I tried to run this on my VPS (debian) but I'm still getting error: I checked every issue on github, every post on forum but still don't know what is going on. On my VPS and local computer I have the same time. I tried to modify time on my vpsy with: " date -s "5 seconds ago"" and " date -s "5 seconds" but it doesn't work. VPS is located in France, my local computer is located in Poland. I also tried with dedicated server from online.de, problem still exists. I added: console.log(SteamTotp.time()); to my script and I see the same timestamp on both machines. Guys - could you help me?
  9. I am really bad at coding in nodejs because to me its confusing because i know to many languages but do you think i can get an example to work off of for checking this?
  10. Hey, I'd love to post with what I've found so far, but... Couldn't find anything useful - I need to do this: (Send a game invite) Protobuf, any tips?
  11. Sometimes when I add too many items in one trade offer. When it is complete. pollFailure shows an err:Error: Data temporarily unavailable And normally it doesn't happen in those trade offers with few items. So is there a suggested number?
  12. Hi, I tried to mess around with the module but didn't manage to get the bot to only accept empty tradeoffers. I want the bot to automatically accept items but never give any. I'd also like the bot to auto-accept these empty trades where it can receive these items but let the regular 1:1, 2:1 etc tradeoffers pending. So that I can accept or decline them manually. Thank you very much for the help !
  13. 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
  14. 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?
  15. 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.
  16. I'm tried to log on into my account through my browser, but code generated by steam-totp module incorrect (across nodeJS its correct)
  17. 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?
  18. Good afternoon I wanted to make a gambling site to csgo Ja researched by google but not found anything to help me , it speaks to compile the code , and it does not know much I needed the help of someone who knew this subject , and who is willing to help me . I hope someone help me Have a nice day Marcio Moura Sorry for my bad English , but I 'm Portuguese btw, This is the site
  19. Node.js is a new thing for me, as I have only started learning it about yesterday. I've been attempting to build a trade bot the accepts trade offers as long as the items that are being received are valued more than the items of the bot. To find the value of items, I use steam-market-pricing. My question is, how do I identify what items the person is offering, and what the person wants to receive from the trade offer? Furthermore, how do I only accept these offers? Sorry if the questions are vague, I'll clear up if you don't understand. I'm working off of this code from a guide just to make my life a bit easier.
  20. The 1st server is getting logged out if logging in with the same acc from another IP/serv. Possible fix? And another thing How to pass rememberPassword:true for login(details, callback)?
  21. Hi, I apologize if this question is not relevant as I am fairly new to Openshift and development of steam bots. I have used steamcommunity to develop a trading bot which handles incoming trade offers. I want to host it on Openshift and am following the firepowered tutorial (http://firepowered.org/developer/hosting-a-steam-bot-on-openshift-online/). SteamCommunity saves a steamguard.txt file on login in the directory where the code is present. Is it possible to use it on Openshift as it needs data to be on the data directory referred by env variable OPENSHIFT_DATA_DIR? Thank you. Regards, Bheem
  22. Hello, I want to change server's control panel to cPanel from sentora. I need to format vps ( server ip will not change ). Can i trade after i reinstalled my server? Note: I am using Digital Ocean. Thank you.
  23. Hello, Thanks for updates, you are really good! Today i updated libraries to latest, but after update libraries , my program had memory leak problem. I know it's about libraries, because i used my script for 2 week and it's used only 200 mb ram max in week. Currently program ram usage going bigger and bigger. ( i saw 1.4 gb ram usage and restarted ) If you know one way for which function causes memory leak etc. can you tell me? Thank you so much. I'm using this libraries: var mysql = require("mysql"), steamCommunity = require("steamcommunity"), steamUser = require("steam-user"), tradeOffers = require("steam-tradeoffer-manager"), totp = require("steam-totp"), bigNumber = require("bignumber.js"), mkdirp = require("mkdirp"), fs = require("fs"), request = require("request"), pusher = require("pusher"), jsonParser = require("json3"), q = require("q"), onceler = require('onceler').TOTP; SOLUTION: I solved this problem with changing node start parameters. This problem about of node's lazy garbage collector. I used this parameters for start bot script: --optimize_for_size --max_old_space_size=920 --gc_interval=100 Thanks for help
  24. Hi, im going to backup my server and also the bot i've made, so i just need to know where it is located, thanks My OS: CentOS 7 node-steam-tradeoffer-manager
  25. Good morning, after creating an account to be used as a bot, I associate a mobile number to this account, I use the script to activate the "2FA." To this part, I understood. I know you need to add $ 5 on this account. What more needs to be done? How long I have to wait until it be functional? What about steamguard, I need to do something? Please I need help :'(
×
×
  • Create New...