Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3507
  • Joined

  • Last visited

Community Answers

  1. Dr. McKay's post in Globaloffensive - Can't connect to GameCoordinator was marked as the answer   
    Does your account own CS:GO?
  2. Dr. McKay's post in How can i get chinese item name? was marked as the answer   
    Use zh instead.
  3. Dr. McKay's post in [Help]Error in module file during sending offer was marked as the answer   
    My assumption is that you're using code written for v1 with v2. You can't provide the message and token to send() in v2. There are separate methods for that.
  4. Dr. McKay's post in php mobile confirmation was marked as the answer   
    You need to send a GET request to fetch confirmations.
  5. Dr. McKay's post in Questions about incoming offers was marked as the answer   
    All TradeOffer objects created by TradeOfferManager have a partner field, which is a SteamID object. You can retrieve the account ID (aka partner ID) using id.accountid, or you can convert it to any of the 3 basic formats using id.getSteam2RenderedID(), id.getSteam3RenderedID(), and id.getSteamID64(). getSteamID64 will give you the 76561.... 64-bit ID.
     
    You can access the state enum using TradeOfferManager.ETradeOfferState (assuming TradeOfferManager is the result of require('steam-tradeoffer-manager'). You can see it here.
     
    An offer's ID is its trade offer ID. Trade offers and trades are distinct things. Not all trade offers result in a trade. A trade is the actual physical exchange of items. A trade offer is.. an offer to trade. Trade offers can be declined, canceled, expired, etc which will result in no trade taking place. If an exchange happens, a trade is created and its 64-bit ID is associated with the trade offer.
     
    With TradeOfferManager, you will need to get a TradeOffer object before you can accept it. You can use manager.getOffer to get a TradeOffer.
     
    You can use manager.getOffers to see all available offers on your account, or you can just use the newOffer event.
  6. Dr. McKay's post in Nothing fired after loggedOn event was marked as the answer   
    You're logging in anonymously, because you're using account_name instead of accountName.
  7. Dr. McKay's post in Error: SteamGuardMobile was marked as the answer   
    You can't use the same 2FA code twice. That means that effectively you can't login twice within 30 seconds.
     
    That said, you don't have to. SteamUser will give you login cookies you can use with SteamCommunity.
    client.on('webSession', function(sessionID, cookies) { community.setCookies(cookies); });
  8. Dr. McKay's post in login through oauth2 from third party website was marked as the answer   
    Try specifying followAllRedirects = true. Request won't follow redirects for non-GET methods otherwise.
  9. Dr. McKay's post in Error: "LoggedInElsewhere" was marked as the answer   
    You need to wait some time between setting your persona to online and trying to retrieve persona data. In fact, I believe Steam should send you the persona data automatically through the user event.
  10. Dr. McKay's post in no steamId returned from createAccount? was marked as the answer   
    Yes, it appears that Steam no longer sends back the SteamID when an account is created successfully. I'll update the readme accordingly.
  11. Dr. McKay's post in Debug was marked as the answer   
    A pretty easy way to invalidate your session:
    community.setCookies(["steamLogin=invalid", "steamLoginSecure=invalid"]);
  12. Dr. McKay's post in Send offers problem: Error: Access Denied was marked as the answer   
    https://support.steampowered.com/kb_article.php?ref=3330-IAGK-7663
  13. Dr. McKay's post in Cannot read property 'player_name' of undefined was marked as the answer   
    You're overwriting the value of steamID in your outer loop, which changes the context of the closure. This is confusing, I know. Just do this and it should work:
    bot.on('friendsList', function() { Object.keys(bot.myFriends).forEach(function(steamID) { if(bot.myFriends[steamID] === 2) { bot.getPersonas([steamID], function(getName) { var friendName = getName[steamID].player_name; //Some code }); } }); });
  14. Dr. McKay's post in getting 429 on acceptConfirmationForObject was marked as the answer   
    You shouldn't need to do the accept on a timeout. You said the confirmation checker is going slow, once every two minutes? That should be fine for 15 accounts, probably even if they all hit it at once.
     
    Would it really hurt to try disabling the automatic check for a bit?
  15. Dr. McKay's post in Is it possible to instantly confirm mobile confirmations? was marked as the answer   
    You can use acceptConfirmationForObject.
  16. Dr. McKay's post in Check if user is online before sending message was marked as the answer   
    Is the bot online?
  17. Dr. McKay's post in node-globaloffensive and fetching paintwear and paintindex was marked as the answer   
    It's indeed inside valueBytes. Wear is attribute 8, and I believe paintindex is attribute 7 (it might be 6 so check that one if 7 doesn't give you the expected result). Loop the attributes array till you find the attribute with the expected defindex, then call valueBytes.readFloat() to get the value as a float.
  18. Dr. McKay's post in Can't NPM was marked as the answer   
    All of your everything is super outdated. Update. Specifically to node.js 4.0.0 or newer, and as new of npm as you can get.
     
    You can install the latest stable 64-bit version for Linux using:
    wget -qO- https://www.doctormckay.com/installnode.sh | /bin/bash Make sure you execute that somewhere writable as root as it needs to download a file to disk.
  19. Dr. McKay's post in log.verbose("polldata.json is corrupt"); was marked as the answer   
    Your code's syntax is wrong.
     
    I suggest that you post a question containing your full code at stackoverflow.com
  20. Dr. McKay's post in Generating App Ticket was marked as the answer   
    I used NetHook (a kind of Wireshark-esque application specifically for Steam) to watch the Steam traffic as I launched the game, and saw a RequestEncryptedAppTicket call. I grabbed the data from the ticket and encoded it via protobuf and then via base64 and compared it to the value in the HTTP request (captured via Wireshark) and it matched.
     
    If you update to v3.14.0, you can use requestEncryptedAppTicket (see the readme for specific usage) to get an encrypted appticket. You don't need to be "running" the game to get a ticket. Then you can call ticket.toString('base64') to get the base64 representation expected by the HTTP API. I confirmed on my end that the API will accept the result of that process.
  21. Dr. McKay's post in 'Could not act on confirmation' while trying to respond to any confirmation was marked as the answer   
    It should definitely work without the confirmation checker running.
  22. Dr. McKay's post in How to only accept CSGO keys in 'newOffer' was marked as the answer   
    offer.itemsToReceive contains an array of the items you'd receive if you accepted this offer. For each item in this array, check appid to make sure it's CS:GO and name to make sure it's a key. For example:
    var allItemsAreGood = offer.itemsToReceive.every(function(item) { return item.appid == 730 && item.name == "CS:GO Case Key"; });
  23. Dr. McKay's post in Join a group without being invited? was marked as the answer   
    Use node-steamcommunity for that: https://github.com/DoctorMcKay/node-steamcommunity/wiki/CSteamGroup#joincallback
  24. Dr. McKay's post in Send Offer - callback is not a function was marked as the answer   
    What version are you using?
  25. Dr. McKay's post in How to go from Steam64 to Steam username (the name currently used on steam) was marked as the answer   
    Your problem is that getPersonas expects an array as the first argument, and you aren't passing it an array. What you want to do is client.getPersonas([steamID], function(personas) { /* etc */ });
     
    Also in this case, the callback is essentially mandatory for you. getPersonas doesn't return anything. The data is only available inside the callback. In your case, you want something like this:
    client.getPersonas([steamID], function(personas) { var persona = personas[steamID.getSteamID64()]; var name = persona ? persona.player_name : ("[" + steamID.getSteamID64() + "]"); // the player's name is now available as name });
×
×
  • Create New...