Jump to content
McKay Development

cookie

Member
  • Posts

    62
  • Joined

  • Last visited

Posts posted by cookie

  1. Nobody really knows for sure what causes Steam to kill sessions, but I've noticed that logging in from another place will log out previous sessions.

     

    There isn't any way to remember a password. The idea is that you use the oAuthToken you receive in the callback to login in order to resume the session in the future, but I'm not sure how well that works.

     

    I use a logonID option and I don't get my session killed.

  2. As of v1.20.0, you can pass your own SteamCommunity to the constructor of TradeOfferManager. You can pass your own request to the SteamCommunity constructor and you can specify a proxy to request via request.defaults.

     

    Sorry for grave digging but is this the best approach?

    var request = require("request");
    var TradeOfferManager = require('steam-tradeoffer-manager');
    var steamcommunity = require("steamcommunity");
    
    var proxyUrl = "http://" + user + ":" + password + "@" + host + ":" + port;
    var proxifiedRequest = request.defaults({'proxy': proxyUrl});
    
    var community = new steamcommunity({request: proxifiedRequest});
    var manager = new TradeOfferManager({community: community});
    
  3. I don't believe you could do that without editing the module's code directly.

     

    If you run the bot and send an offer manually, it'll trigger unknownOfferSent.

    if(!callback) {
    			return;
    		}
    		callback(new Error("Intentionally returned an error"));
    		if(body && this.state == ETradeOfferState.PendingConfirmation) {
    			callback(null, 'pending');
    		} else if(body && body.tradeofferid) {
    			callback(null, 'sent');
    		} else {
    			callback(new Error("Unknown response"));
    		}
    

    that will work I guess :)

  4. If you're sending like 20 offers per second then there might be an issue, but I highly doubt you have that kind of volume.

     

    It's not difficult to just manually download

    https://steamcommunity.com/profiles/[steamid]/inventory/json/[appid]/[contextid]

    in whatever language and parse it.

     

    does that url have limits?

  5. The best way to make sure that you don't miss (many) confirmations is to use the same device ID for every confirmation request (on the account).

     

    If you use my libraries for confirmations, then you'll always use the same device ID. If you use a node app alongside a real phone, then there can be problems.

     

    Device ID as machine ID in steam-user ?

  6. Clusters are designed for applications which have to process lots of things at once (like many user requests). Running bots is really not a good use for clusters.

     

    I'm personally running 30 bots within the same node process on low-end VPSes and the only problems I'm having are Steam IP limits.

     

    Is there a considerable performance boost when running all bots in a single node process?

    1. unknownOfferSent gets canceled automatically.
    2. Have a whitelist of Offer IDs to confirm via steam-community OR cancel confirmations for unknownOfferSent Offers.
    3. Have a light mode of the bot that will be memory efficient ?

     

    More to be added soon, just out of my mind!

  7. Many of my time is spent trying to optimizing the bot to work with this awful service steam provides, Error codes like 16 and Error: ETIMEDOUT are some examples, however it is unknown if the offer is sent or not. Any experience anybody would like to share? Possible solutions?

     

    Also, when there's an error and the trade offer is sent means trade.id is true if it's false then surely the offer isn't sent? please check the code below:

    trade = offers.createOffer(p);
    trade.send('', t, function(err, status){
        if(err){
           console.log(err);
           if(trade.id){
               console.log('Offer sent whilst having an error');
               //Do something
           } else {
               console.log('Offer isn\'t sent');
           }
        } else {
            //Do something
        }
    }
    
  8. Yes, a TradeOffer object has a confirmationMethod property as you describe.

     

    The value of that property is different for each party in the trade. If you're the sender, then it's populated on send. A nonzero value in state CreatedNeedsConfirmation means that it's waiting on you to confirm it. A nonzero value in any other state means that you were required to initially confirm it using that method, but no further action is required on your part.

     

    On the recipient's side, a zero value in state Active means you haven't tried to accept it yet. A nonzero value in state Active means you need to confirm it using that method before the offer can be accepted. A nonzero value in any other state means you previously had to confirm it using that method.

     

    Alright! thanks for the explanation.

  9.  

    1. Player 1 creates a trade offer and sends it to Player 2. Player 1 needs to confirm it: offer state is CreatedNeedsConfirmation and it's invisible to Player 2.
    2. Player 1 confirms the trade. It goes into state Active and both players can view it.
    3. Player 2 accepts the trade. It requires confirmation, but stays in state Active. Once accepted, the API for Player 2 says that confirmation_method is either 1 or 2 (previously 0) depending on email or mobile confirmations.
    4. Player 2 confirms the trade. It changes into state Accepted.

     

     

     

    I understand from what you're saying that once you confirm it the confirmation_method will be != 0 prior player 2 accepting the offer. Great, I believe a TradeOffer property will contain confirmationMethod as the value of confirmation_method correct?

×
×
  • Create New...