Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3402
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. You can accept it, but that's unnecessary. All you need to do is accept the confirmation.
  2. You don't need to accept real-time-trade offers. Offers that are created from real-time trades are accepted automatically, you just need to confirm them. The wiki page on GitHub has more information.
  3. Trade failures which result in ID changes are infrequent enough that you can fix them manually. Or you could detect when a trade goes InvalidItems and automatically figure out which items in your inventory have unrecorded asset IDs and match the description of the missing items.
  4. classid and instanceid can change whenever they want. And no, they don't include wear for uniqueness.
  5. https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/Real-Time-Trades
  6. offer.getReceivedItems will give you post-trade IDs and descriptions.
  7. In order for that to work, make sure you listen for both unknownOfferSent (for offers that get confirmed by the user before the manager sees them), and sentOfferChanged (for offers that get confirmed by the user after the manager sees them).
  8. Based on some testing I just did, it looks like the "sender" of the offer is actually the party who sent the Steam trade request. If you're receiving trade requests to your bot and accepting them, then the offers are always being "sent" by the human. Since the bot isn't giving anything away and consequently doesn't have to confirm anything, the offers are immediately going "Accepted" once they're visible to you. That's why you aren't getting any events at all. I think I'll add a couple new events to handle real-time-trade offers (realTimeTradeConfirmationRequired and realTimeTradeCompleted sounds good to me).
  9. It's secure as long as you properly secure your code and servers. Valve won't ban you for using this.
  10. It's possible, but due to potential for abuse I don't plan to implement this.
  11. That example is old and won't work with v2 (v1 is now unsupported). Code for sending an offer to a friend (without a trade token) with v2 looks like this: var offer = manager.createOffer("[U:1:46143802]"); offer.addMyItem({"appid": 440, "contextid": "assetid": 1234567890}); offer.send(function(err, status) { if (err) { console.log(err); } else { console.log("Offer #" + offer.id + " " + status); } });
  12. I haven't experimented too much with real-time trades, but as far as I can tell it looks like the first party to confirm the real-time trade is the offer "sender". So if your bot is the first party to "click" the green button then your bot is the sender of the trade and consequently the offer won't come in newOffer (I think unknownOfferSent should be emitted?). Depending on the speed of the other user, you may get sentOfferChanged or not. Basically the flow would be one of the two following scenarios: User is fast Bot confirms real-time trade User confirms real-time trade Bot accepts mobile confirmation User accepts mobile confirmation and items are exchanged TradeOfferManager polls, sees the accepted offer, and unknownOfferSent is emitted with state == 3.User isn't as fast Bot confirms real-time trade User confirms real-time trade Bot accepts mobile confirmation TradeOfferManager polls, sees the offer, and unknownOfferSent is emitted with state == 9 (probably) User accepts mobile confirmation and items are exchanged TradeOfferManager polls, sees the accepted offer, and sentOfferChanged is emitted with state == 3If your bot isn't confirming the trade first, then the other user has to confirm it first. Once they do, you get the confirmation on your end, which you need to confirm. TradeOfferManager won't emit newOffer for non-active offers, so if you confirm it before TradeOfferManager sees it, then you won't get any events at all. This doesn't seem like it's super-desirable behavior, so I might add a unknownOfferReceived event for this situation. If you don't confirm it before TradeOfferManager sees it, then you'll get newOffer, and receivedOfferChanged after it's confirmed (and therefore accepted). This is all assuming that I'm correct in that the first party to confirm a real-time trade is the sender of the offer.
  13. You never called setCookies on your offer manager. Listen for the webSession event on the SteamUser for your cookies.
  14. If you have mobile auth enabled on a physical phone, steam-user will just prompt you for a code when it needs one and you can provide it from your phone. If you have a secret, you can use steam-totp to generate a code.
  15. There shouldn't be any need to cancel it. You already have the offer ID, unlike error 16. When you get 504 just wait a bit, check if it's been confirmed, and if not then confirm it again.
  16. steamcommunity has a sessionExpired event. You can also just automatically relog every hour or so, that's what I do.
  17. "My library" doesn't have limitations, Steam servers impose limitations. They're not exactly published. If you're getting 429, then you're hitting it.
  18. You might want to try logging into the account in a browser and pulling up https://steamcommunity.com/mobileconf/conf, see if that 504s as well. As for telling Valve what you're using, just say you're using SDA I guess. I don't imagine Valve could be hostile toward that, as it isn't exclusively for bot use.
×
×
  • Create New...