Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3402
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. There's nothing in there that would spam requests. Note that it's an IP limit. It can be anything on your IP that is spamming requests.
  2. Trade offer ID? Yes, it's possible. You'd just need to request your confirmation list then get details for each individual one until you found the matching offer ID.
  3. 1. If you want to get all active offers and that's it, you'd use this: { "get_sent_offers": 1, "active_only": 1, "time_historical_cutoff": 2147483647 } 2. You'd check the trade_offer_state. If they accepted it then they received the item you sent them. 3. If you want all offers from a time period you'll need to just leave out both active_only and historical_only and filter the result.
  4. Because you're adding a new listener every single time you request item info. Just use the callback and you won't need to worry about it.
  5. setCookies makes exactly one request (two if you supply a Family View PIN). It isn't setCookies' fault. You're making requests elsewhere too quickly.
  6. 429 means that you've sent too many requests to Steam in a short time and you need to slow down.
  7. There's a reason why you can't supply your own API key. The key it uses must be associated with the Steam account you're using. You can't use another account's key. If your account is limited, you'll just have to pay $5.
  8. node-globaloffensive is using an option where instead of underscores, you should provide protobuf fields in camelCase. Basically, just remove the underscores and capitalize the next letter. However, I've added that functionality in v1.1.0.
  9. WebStorm sometimes has trouble resolving Node dependencies. Do you have the Node.js plugin installed in WebStorm?
  10. WebStorm is giving you an error because csgo doesn't exist when you're trying to listen for an event on it. Create your GlobalOffensive object at the same time as when you create your SteamUser object.
  11. You can just create a SteamGameCoordinator handler and pass the steam-client to it.
  12. Ever wondered what's behind that big long number that we call a "SteamID"? It isn't just random; there are actually four numbers packed into it. A SteamID has four parts: Universe - The "instance of Steam" in which this ID is used. There is only one public Steam instance. Its name is "public", and its number is 1. The other universes are used internally at Valve for testing. Type - A SteamID can actually stand for several different types of accounts. The most common is individual, which is an individual user account. There are also types for clans (Steam groups), gameservers, anonymous gameservers, anonymous users, and more. Instance - This number is a bit finnicky. For the most part it's just a static number. For example, for individual SteamIDs the instance is pretty much always 1 (for desktop). Account ID - This is the actual ID of the account. Account IDs increment over time. If you know what universe, type, and instance an ID is for, then this is all you need to uniquely identify the account. As I mentioned previously, a 64-bit SteamID is actually broken down into four parts: 8 bits for the universe 4 bits for the type 20 bits for the instance 32 bits for the account ID This means that in order to get an account ID out of a 64-bit SteamID, all you need to do is steamID & 0xFFFFFFFF. Warning: The Steam WebAPI and Steam Community website actually don't care about the instance as long as you've set the type and universe correctly. This means that if you're taking user input for SteamIDs, you could end up with duplicate accounts. For example, the SteamIDs 76561198006409530 and 76561202301376826 are considered identical because the universe, type, and accountids are the same. Try it for yourself: https://steamcommunity.com/profiles/76561198006409530 https://steamcommunity.com/profiles/76561202301376826 Failure to take this into account can result in such exploits as this: (Yes, those are actually the same Steam account) Common SteamID Confusion SteamID aspects are a common source of confusion. For starters, what do you call various SteamID formats? This is the 64-bit SteamID (or just SteamID) format: 76561198006409530 This is the Steam3 format: [U:1:46143802] This is the Steam2 format: STEAM_0:0:23071901 (or the newer Steam2 format: STEAM_1:0:23071901) The "partner ID" in trade offer URLs is actually the account's account ID. Reading Rendered IDs Here's how to interpret the rendered ID formats. Steam3 Format [T:U:A] or [T:U:A:I] T - This is a single letter (case-sensitive) which tells you what type of account this is. The characters are documented on the Valve developer wiki. U - This is the universe to which this SteamID belongs. Unless you work for Valve, this will always be 1. A - This is the account ID for this SteamID. I - This is the SteamID's instance number. May be omitted if the instance is the default for that ID type or can be determined in other ways. Steam2 Format The Steam2 rendered format can only be used for individual SteamIDs. STEAM_X:Y:Z X - This is the universe to which this SteamID belongs. Older games use 0 to stand for public, newer ones use 1. Y - This is the SteamID's accountid modulo 2. Z - This is the SteamID's accountid halved and rounded down. Working with SteamIDs in code If you're using Node.js, you can use node-steamid to parse, create, and deal with SteamIDs. If you're using PHP, you can use php-steamid. If you're using C#, SteamKit has a SteamID class.
  13. That's for you to figure out, as I don't know what your code is doing.
  14. As of 3.6.0, the full URL is available as avatar_url_icon, avatar_url_medium, and avatar_url_full. As for your question, it's binary. You turn it into a hex string to get a URL. Code for that here (you don't need to implement it yourself as it's already a native feature): https://github.com/DoctorMcKay/node-steam-user/blob/df07be75c70aa0ef891b55962aa8a6ce37e5f9ea/components/friends.js#L452-L458
×
×
  • Create New...