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. How would you go about coding a method in which a steamid is within a config file, and upon a trigger it gets the server that the client is on, if at all, and then henceforth gets the map that the server is on. Planned to implement with twitch as a !map command.
  2. Hi, i've been trying to send trade offers in loop every time it blows. Here is what im doing in theory: im reading some valuables from local text file such as my items assetid, tradelinks and market hash name of item that i want to add trade. then im creating offers in loop and sending them. i tried to sleep in loop and so many things every time it gives error. in code : var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, "domain": "google.com","language": "en" }); var community = new SteamCommunity(); // Steam logon options var logOnOptions = { "accountName": "***", "password": "****", "twoFactorCode": SteamTotp.getAuthCode("sharedSecret")}; var lineReader = require('readline').createInterface({ input: require('fs').createReadStream('trd.txt')}); var lines=[]; var i,text,q; var itmName,myitmid; i = 0; q=0; // so far so good lineReader.on('line', function (line) {lines[i]=line;console.log(i+". trd :"+lines[i]);i++;}); lineReader2 = require('readline').createInterface({ input: require('fs').createReadStream('nm.txt')}); lineReader2.on('line',function (line2){ itmName =line2; console.log("itmName :"+itmName);}); lineReader3 = require('readline').createInterface({ input: require('fs').createReadStream('myitm.txt')}); lineReader3.on('line',function (line3){ myitmid =line3;console.log("myitmid :"+myitmid);}); //end reading if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json'));} client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam");}); client.on('webSession', function(sessionID, cookies) //right here it begins { for(q = 0; q<lines.length-1;q++)//creating loop { manager.setCookies(cookies, function(err) { console.log("//////////"); console.log("q : "+q); console.log(lines[q]); console.log("\\\\\\\\\\"); //used this because it reads all links but tries to send just lastone if (err){console.log(err);process.exit(1);return;} var linqs = getstID(lines[q]);//getting the userid from tradelink cItmId = getInv(linqs);//getting asset id of item if(cItmId !== false && cItmId !== "undefined")//checking the value before send offer { sndTrade(myitmid,cItmId,lines[q]); } else { console.log("false"); } }); community.setCookies(cookies); } }); manager.on('sentOfferChanged', function(offer, oldState){console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`);}); manager.on('pollData', function(pollData){fs.writeFile('polldata.json', JSON.stringify(pollData));}); function getstID(st)//that function gets the userid from tradelink { var ll = st.substring(st.indexOf("=")+1,st.indexOf("&")); ll = "[U:1:"+ll+"]"; return ll; } function getInv(sTeamID)//that func returns the assetid { manager.loadUserInventory(sTeamID,730,2,false,function(err,inventory) { console.log("envanter yükleniyor"); if(err) { console.log("[WARNING]: Couldn't load inventory of " + sTeamID + "!"); } else { console.log(sTeamID+"envanteri yüklendi"); for (var p = 0;p<inventory.length;p++) { if(inventory[p].market_hash_name == itmName) { console.log("item bulundu"); return inventory[p].assetid; } else { console.log(sTeamID+"Item bulunamadı"); return false; } } } }) } function sndTrade(mnItm,cItm,trdLink)//that creates the offer. { var offer = manager.createOffer(trdLink); offer.addMyItem({"assetid":mnItm,"appid":730,"contextid":2}); offer.addTheirItem({"assetid":cItm,"appid":730,"contextid":2}); offer.send(function(err,status) { if (err) {console.log(err);return;} if (status == "pending"){console.log("offer #${offer.id} sent, but reqires confirmation.");} }); } i've tried without/with functions, tried to log every value to check up.
  3. Hi. I've got some ideas about setting up some quota to some items, so that i won't overstock. Is there something I need to do with backpack or only the offer manager?
  4. Hello McKay, First of all, thanks for your hard work. I'm trying to implement tradeoffer-manager to my bot project but sometimes my bot process just halted, it threw error like this: 2016-10-26 17:19:13 - error: [x] [tradeoffer-manager] { Error: HTTP error 429 at SteamCommunity._checkHttpError (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:108:9) at Request._callback (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:50:61) at Request.self.callback (/xbot/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/xbot/node_modules/request/request.js:1048:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/xbot/node_modules/request/request.js:969:12) at emitNone (events.js:91:20) at Gunzip.emit (events.js:185:7) code: 429 } My main index.js got this to handle these kind of excetion like this: process.on('uncaughtException', function(err) { // handle the error safely console.log(err) }); Please help. Thanks.
  5. manager.loadUserInventory(user, 730, 2, true, function (inventory, err) { if (err) { console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!")); } else { console.log(inventory); } }); Why does it return err? I've done everything correctly and i've checked so the variable $user is equal to a valid steamid.
  6. Hey so I wanted my bot to check a users inventory. This is how my code looks like. var TradeOfferManager = require("steam-tradeoffer-manager"); var manager = new TradeOfferManager({ "steam": client, "language": "en" }); manager.loadUserInventory(user, "730", "1", "true", ???); console.log(???.inventory); https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#loaduserinventorysteamid-appid-contextid-tradableonly-callback So as you see here at the code and the link i provided I haven't defined the callback thing yet indicated with "???". I don't really know what callback means and how I can use it. Please help me understand this variable. Thanks in advance!
  7. Is there a way to use one trade offer manager for two accounts?
  8. Hey, I am still not too good with Node or JS, but working on it! I have a working NodeJS bot to accept item donations. Sometimes, offers are glitched. The bots console log tell me, that it accepted them, which of course doesn't work. If I restart the bot, it finds the offer and accepts it (if it's not glitched anymore). I managed to let the bot find out if an offer is glitched. if(offer.isGlitched() == true) { console.log("Offer is glitched!"); } else { console.log("Offer is not glitched!"); }Now ... since I don't fully understand how the bot gets the new offers, I don't know how to manually refresh them. Lets say, I would use the code above right after a new offers is received and "isGlitched()" equals "true", what would I need to have a few seconds delay and then just refresh all offers until the offer is not glitched anymore? if(offer.isGlitched() == true) { console.log("Offer is glitched!"); setTimeout(function(){ //Reload offers! }, 15000); } else { console.log("Offer is not glitched!"); //Some conditions offer.accept();" } What would I need as "Reload offers!"? This might be some easy-to-solve question, but I tried and didn't succeed. Any help is greatly appreciated!
  9. how to receive ticket? such as steamworks SteamUser()->GetAuthSessionTicket()
  10. Hi evereone! I'm stuck on this, please, help me out. manager.on('newOffer', function(offer) { ... acceptOffer(offer, userid, function(err, result) { if(err){ //Steam return error } else { //All fine } }); ... }); If Steam return errors like #11 or #16 etc, that means it's unable to accept the offer at the moment, but it's alright after several seconds. This creates a lot of junk records in my database, since i have to write into it to keep track of the errors and re-accept trades.. Can I delete that offer from polldata to call 'newOffer' again or what else can I use to recall newOffer for not acceptable trades?
  11. i already binded it to steam-users and now i use the cookies from it in steamcommunity. if i try to bind the ip to steamcommunity i get an error that community.Constructor is not a function. community.Constructor({localAddress: ip}); https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#constructoroptions anyone can help me?
  12. Hi. I want to know how to count items in trade offer to make trade offer more useful i've tried this code but it didn't seems working var item_from_me ={ "appid": 440, "contextid": 2, "amount": 1,"assetid": "5148534535", "item.name": "Refined Metal"} var item_from_them ={ "appid": 440, "contextid": 2, "amount": 1,"assetid": "5158673853", "item.name": "Mann Co. Supply Crate Key"}offers.on('newOffer', function (offer) { if (offer > 0) { offers.getOffers({ get_received_offers: 1, active_only: 1, time_historical_cutoff: Math.round(Date.now() / 1000) }, function(error, body) { if(body.response.trade_offers_received) { body.response.trade_offers_received.forEach(function(offer) { if (offer.trade_offer_state == 2) { console.log(offer); console.log('Recieved trade offer: ' + offer.tradeofferid); if (offer.items_to_give === item_from_me * 22 && offer.items_to_recieve === item_from_them) { offers.acceptOffer({tradeOfferId: offer.tradeofferid}); console.log("Offer accepted"); if (offer.steamid_other !== admin) { steam.sendMessage(admin, offer.steamid_other + " just donated!"); } } else { offers.declineOffer({tradeOfferId: offer.tradeofferid}); console.log("Offer declined"); } } }); } }); }
  13. Hello i have a problem with csgo.network v2 bot. after configure, when i start its giving : http://screenshooter.net/102860902/yklnaci http://screenshooter.net/102860902/yodmycw node version 0.12.15 nodejs version 0.12.15 npm version 3.10.7 Can someone help me ?
  14. Hi. How to make it confirm the trade offer like keys or something? Because my bot is currently accepting all offer that only receiving items. New offer #1551249841 from [u:1:342508768]Offer accepted But it didn't confirm the trade. Thanks for helping
  15. i have a VPS with more than 1 ip and i want to asing 1 ip per bot (for mobile conf.) to avoid 429 its that posible?
  16. Okay, so I had this program that was working fine. I reload it and boom! ERRORS CODE: var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); // use require('steam-tradeoffer-manager') in production var client = new SteamUser(); var manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en" // We want English item descriptions }); var community = new SteamCommunity(); // Steam logon options var logOnOptions = { "accountName": "densexsedebjorn", "password": "****", }; client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { 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); }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); // Checks and accepts confirmations every 30 seconds }); manager.on('newOffer', function(offer) { /////// });ERROR: events.js:141 throw er; // Unhandled 'error' event ^ Error: RateLimitExceeded at SteamUser._handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\components\logon.js:320:16) at SteamUser._handleMessage (c:\Node.js\Steam\node_modules\steam-user\components\messages.js:200:29) at emitThree (events.js:97:13) at CMClient.emit (events.js:175:7) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:278:8) at CMClient.handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:386:8) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:260:24) at emitOne (events.js:77:13) at TCPConnection.emit (events.js:169:7) at TCPConnection._readPacket (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\tcp_connection.js:73:7)
  17. When I do itemsToGive.market_name_hashname it only takes the first item in the trade. what if I want for all of them? Please give an example.
  18. Hi, I wrote my own library that interacts with Steam servers. My version of getConfirmations works fine with one bot. It runs periodically every 10 seconds with no issues. Today, I hooked it up with six bots running simultaneously. This is where errors 429 (too many requests) start happening. Seems like steamcommunity.com/mobileconf/conf has a rate limit: 6 requests per minute from the same IP. Am I right?
  19. Hi, I made this code to send offer but the problem that I got that error "Error: HTTP error 401" When I using "manager.setCookies" I got the error access denied because my limited account . So I looked for another module "node-steam-tradeoffers" and it's working with "steam-weblogon" and "steam-web-api-key" and it's send the offers from my limited account, but I need to using your module, so I made this code which can make the api key. var Steam = require('steam'); var SteamWebLogOn = require('steam-weblogon'); var getSteamAPIKey = require('steam-web-api-key'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var fs = require('fs'); //var client = new SteamUser(); var community = new SteamCommunity(); var steamClient = new Steam.SteamClient(); var steamUser = new Steam.SteamUser(steamClient); var steamFriends = new Steam.SteamFriends(steamClient); var steamWebLogOn = new SteamWebLogOn(steamClient, steamUser); var manager = new TradeOfferManager({ "steam": steamClient, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "localhost", // Our domain is example.com "language": "en" // We want English item descriptions }); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } steamClient.connect(); steamClient.on('connected', function() { steamUser.logOn({ account_name: '*********', password: '***********', two_factor_code: SteamTotp.generateAuthCode('**********************') }); }); steamClient.on('logOnResponse', function(logonResp) { if (logonResp.eresult == Steam.EResult.OK) { console.log('Logged in!'); steamWebLogOn.webLogOn(function(sessionID, newCookie) { getSteamAPIKey({ sessionID: sessionID, webCookie: newCookie }, function(err, APIKey) { manager.apiKey = APIKey; var offer = manager.createOffer("************"); offer.addMyItem({"appid": 730, "contextid": 2, "assetid": "655530455"}); offer.send(function(err, status) { if (err) { console.log("send" + err); } else { console.log("Offer #" + offer.id + " " + status); } }); }); community.setCookies(newCookie); community.startConfirmationChecker(10000, '*********************************'); }); } });
  20. Hello, I would like to try to create steambot using your nice manager. I have read examples, there are only confirmation described, but I want to make bot, that will send tradeoffers by him self. Could you say, is there any example or describe implementation of this construction in short? I have found ('../lib/classes/TradeOffer.js') but how can I call function send(), should I require it from my file or just require ('../lib/index.js') etc?
  21. Ive been getting into nodejs a few months ago and found out about this module a week ago. I started playing around a bit and managed to make myself a nice hour idling script. Ive achieved that with a lot of trial&error + the help of some rather experienced friends. But now Im stuck: Im trying to log into an account that has mobile auth enabled. Ive read into this a little, and its a bit too high for me. Now I hope that an experienced coder/someone who has already done this before could quickly break it down for me, or if it really just is too complicated, tell me so. Thanks in advance, I really hope that I can sometime give something back to this community.
  22. Hello, Someone can help me with this error? " Error: HTTP error 429 ". Print: http://imgur.com/a/cYHEM Code: client.on('loggedOn', function(details){ client.on('webSession', function(sessionID, cookies){ manager.setCookies(cookies, function(err) { if(err) { console.log('setCookies error: '+err); process.exit(1); // Fatal error since we couldn't get our API key return; } var steamapi=manager.apiKey; var SteamcommunityMobileConfirmations = require('steamcommunity-mobile-confirmations'); var steamcommunityMobileConfirmations = new SteamcommunityMobileConfirmations( { steamid: botsteamid, identity_secret: identitysecret, device_id: deviceid, webCookie: cookies, }); setInterval(function(){ checkConfirmations(steamcommunityMobileConfirmations) }, pooling_interval); console.log("[SERVER] The Bot has logged in!"); client.addFriend(admin); client.chatMessage(admin, "[SERVER] Successfully logged in!"); client.setPersona(Steam.EPersonaState.LookingToTrade); }); }); }); Regards.
  23. Hello. I want to do two steam account (at the beginning) working on 1 database. Better to do it in two separate processes? What kind of problems to pay attention?
  24. So which node js packages do i need to communate with the site, i wanna make a system like on big sites such as csgopolygon, csgodouble.And how hard is it to code?
  25. I use code from topic "Minimal code to stay logged in forever..." to stay online. It's working perfectly, but bot keep disconnecting from chat after a while. I tried use "chatLogoff()" on sessionExpired - not working. Setting chatLogon interval to 4000 - not working. chatLogOnFailed event not triggering. Any advice to fix this ? Edit: I tested after "chatLogoff()" bot cannot go online in chat with chatLogon(). Am I doing something wrong ?
×
×
  • Create New...