Jump to content
McKay Development

Infrox

Member
  • Posts

    6
  • Joined

  • Last visited

Infrox's Achievements

  1. Hello, how do I set bot's persona or gamesPlayed using steamcommunity? I was using steam-user all the time and it was working, but I need to switch to steamcommunity since I need to confirm trade offers. This is my bot login script: var BotID = 1; var Steam = require("steam"); var SteamTotp = require('steam-totp'); var SteamCommunity = require("steamcommunity"); var sclient = new SteamCommunity(); // var ACC_NAME = "username"; var ACC_PSW = "password"; var ACC_SHARED = "shared_secret"; var ACC_IDENTITY = "identity_secret"; var loggingIn = 0; login(); function login() { loggingIn = true; logger.info("Logging into steam..."); sclient.login({ "accountName":ACC_NAME, "password":ACC_PSW, "twoFactorCode": SteamTotp.getAuthCode(ACC_SHARED) }, function(err, sessionID, cookies, steamguard){ loggingIn = false; if(err) return login() //re-login console.log("Bot has logged in."); //====SET PERSONA STATE HERE // }); } sclient.on('sessionExpired',function(err){ if(loggingIn) return; logger.log("Session expired! Trying to re-log"); return login(); }); And I'm not sure how to set state to "Online".
  2. So what would be the best way to get inventory without request limits?
  3. Maybe you could add a feature to check if an item is already in trade? I mean I have the assetID of an item, and I need to check if bot has sent an offer with this item to someone.
  4. Hello, As you might know, steam has a limit on their API (100,000 calls per day is possible). I tried getting player's inventory just by using a simple xml request to this url: steamcommunity.com/profiles/[iD]/inventory/json/[APP]/2 I set an interval for the requests, and my script crashed after 30 requests (I think) so there must be a maximum requests per minute. However, if players in my website try to access inventory, and I have a lot of players = not good. So my question is, is there a limit of requests using loadInventory (loading bot's inventory) and loadPartnerInventory (loading player's inventory)? Thanks
  5. Hello, I have a system that sends a tradeoffer to a person and then you have to confirm it via website. When confirming, the bot executes following code: offers.getOffer(m.tradeid,function(err,offer){ if(err) return logger.info("Confirmation error: "+err); switch(offer.state) { case 2: notify(m.client,'Your offer is still pending.'); break; case 1: removeOffer(m.client,m.tradeid,"Invalid trade offer, declining..."); break; case 3: break;//accepted case 4:{ offer.decline(function(err){ //this is wrong, the offer ID is no longer valid if(err) logger.info("There was an error declining bad trade offer: "+err); removeOffer(m.client,m.tradeid,"Do not modify the trades sent by our bots. Trade offer cancelled."); }); break; } case 6: removeOffer(m.client,m.tradeid,"Trade offer cancelled by the bot."); break; case 7: removeOffer(m.client,m.tradeid,"Trade offer cancelled."); break; case 8: removeOffer(m.client,m.tradeid,"Items no longer available."); } });If the offer.state equals 4 (Countered), I should decline the counter-offer, but the ID is no longer valid. How can I get the new ID of a counter-offer?
  6. I'm concerned about the same thing. I've seen many sites using an ajax query to the .php file which then sends data to node.js bot (I believe). But how can you connect to websocket in php? Don't you need to use javascript? Also, you can view website's javascript with a javascript debugger, wont people be able to manipulate the queries?
×
×
  • Create New...