Jump to content
McKay Development

Dr. McKay

Administrator
  • Content Count

    2611
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Dr. McKay reacted to Naleksuh in changes to api?   
    Update: it's been 9 months since my last post (11 months total), and it has happened a third time.
     
    I can confirm that restarting my own steam client does fix it. So, it seems like restarting the bot just pushes a refresh, and really only Valve can fix this.
     
    However, it might be something in the bot that is triggering it initially
  2. Like
    Dr. McKay got a reaction from zeroCat in how to join cs server with bot acc   
    That code retrieves a list of CS:GO servers and sets itself to in-game, but it doesn't join a server which is why you wouldn't see the bot in the server. It is not possible to actually join a CS:GO server from a bot, as you would have to implement VAC and nobody's been insane enough to try that.
  3. Thanks
    Dr. McKay got a reaction from root89 in How to interact with started proccess?   
    There are a bunch of options. You could use readline to read input commands from the terminal and take actions based on those, you could start up an http server and respond to requests, there are a bunch of other things you could do too.
  4. Like
    Dr. McKay got a reaction from What Comes Around in Identifying Steam Items   
    Sometimes it can be a little confusing to identify a specific item in the Steam economy. There are several different types of IDs present in one particular item, and a lot of vague terminology. This guide aims to clear all that up for you.

    For starters, the "official" term for a Steam item is an asset. When I say a "Steam item", I mean a particular copy of an item. I'm not referring to the item's definition, name, image, or anything. I'm referring to a specific, unique copy of the item.

    In a general sense, every item on Steam must be owned by an app. An "app" is a game, software, or whatever on Steam. Every app has its own unique AppID. You can find a particular game's AppID by going to its store page or community hub and looking at the URL. For example, TF2's AppID is 440 so TF2's store page can be found at http://store.steampowered.com/app/440. CS:GO's is 730, Dota 2's is 570, and so on. Note that Steam Community items, Steam gifts, and other "Steam" items are owned by the "Steam" app, which has AppID 753. To identify an item, you'll need the AppID of the game which owns it.

    Of course, the AppID alone isn't enough. You also need two other IDs. Have you ever noticed how some games have multiple inventories, which appear in a drop-down list? An example is the Steam inventory, which has sub-inventories for "Community", "Gifts", "Coupons", etc. These "sub-inventories" are called contexts, and each context has its own context ID. If a game doesn't have a drop-down menu to select a context, that doesn't mean that it's without contexts. That only means that it has one single visible context. That single context still has an ID. For all current Valve games, the context ID for the publicly-visible context is 2.

    Context IDs can be a bit tricky. It's entirely up to the game's developer to determine how they work. For example, Valve games take the "single shared inventory" model in which there's one context ID which is shared by everyone. Under this model, an item belongs to one particular context and never leaves that context. Consequently, the item's context ID never changes. It is, however, possible for game developers to create contexts in any way they choose. For example, Spiral Knights uses the "per-character inventory" model in which everyone who plays the game has their own context IDs for their characters. Creating a new character creates a new context ID. This means that when an item is traded between users, its context ID will change as it moved out of a particular character's inventory.

    Those are the two different types of "containers" in the Steam economy. Apps own contexts, and contexts own assets. Every asset on Steam has, in addition to its AppID and context ID, an asset ID which is guaranteed to be unique inside of a given AppID+ContextID combination. Notice that this means that asset IDs are not unique across all of Steam. They aren't even unique across a particular app. They are only unique inside of a given context. For example, there could be two items with asset ID 1 in the same game, as long as they have different context IDs. An item's asset ID may be referred to as "assetid" or just plain "id".

    Context IDs and asset IDs are assigned by the game developer and can follow any pattern. They can change when traded or not. They may both be up to 64 bits in size. Consequently, Steam returns them (like all other 64-bit values) in JSON as strings.

    Still following? All of what we've learned so far leads us to this conclusion: in order to uniquely identify an item, you need its AppID, its context ID, and its asset ID. Once you have these three things, only then can you uniquely identify it. In fact, this is how you link to a particular item in a user's inventory: steamcommunity.com/profiles/steamid/inventory#appid_contextid_assetid. Here's an example: https://steamcommunity.com/id/DoctorMcKay/inventory#440_2_134161610

    What are these "classid" and "instanceid" values though?
    The observant reader may have noticed that there are two more IDs attached to a particular item which I haven't mentioned. These are the "classid" and "instanceid". These IDs are used to map an asset to its description.

    What's a description? A description is what you need in order to actually display an item. An item's description contains its name, image, color, market_name, whether it's tradable or not, whether it's marketable or not, and more. There are many endpoints on Steam which return JSON objects representing assets that only contain the asset's AppID, context ID, asset ID, classid, instanceid, and amount. An item's amount is how big of a stack it is. Unstackable items always have an amount of 1. Stackable items (such as Steam gems) may have a larger amount. Stacked items always have the same asset ID.

    What's the difference between a classid and an instanceid? In a nutshell, a classid "owns" an instanceid. The classid is all you need to get a general overview of an item. For example, items with the same classid will pretty much always have the same name and image. The instanceid allows you to get finer details such as how many kills are on a strange/StatTrak weapon, or custom names/descriptions.

    You can turn a classid/instanceid pair into a description using the GetAssetClassInfo WebAPI method. Notice that the instanceid is actually optional: if you only have a classid that's fine, you just won't get finer details for the item.

    Name? Market Name? Market Hash Name?
    Every asset on Steam has a name. Without a name, there's nothing to show in your inventory. The item's name is the name property of its description. The item's name may be localized if the game's developer has set it up to be.

    Every marketable item also has a "market name". This name may be the same as—or different from—the item's regular name. The item's market name is the market_name property of its description. This is the name that's displayed in the Steam Community Market when the item is up for sale. Why the distinction? There are some items which have value-affecting data that isn't in their name; for example, CS:GO skins have 5 different tiers of "wear", which isn't in their names. The wear tier is appended to each skin's market name however, so that the different tiers of wear are separated in the market. The market name may be localized or not, and may not exist at all if the item isn't marketable. It's up to the game's developer.

    Finally, every marketable item also has a "market hash name", available under the market_hash_name property. This name is supposed to be the English version of the item's market name, but in practice it may vary. For example, Steam Community items prepend the AppID of the originating app to each item's market hash name, but not to the market name. The market hash name is never localized, and may not exist if the item isn't marketable. Again, it's up to the game's developer. You can view the Community Market listings for any marketable item using this URL formula: steamcommunity.com/market/listings/appid/market_hash_name. Here's an example: https://steamcommunity.com/market/listings/440/Mann%20Co.%20Supply%20Crate%20Key

    Note that the Community Market has no concept of contexts. Consequently, market [hash] names are unique for a particular "class" of items per-app (and by extension per-context). This means that for marketable items, two items with identical market hash names will be worth roughly the same (with some exceptions, like unusual TF2 items).

    Questions?
    Ask below. I'm happy to help!
  5. Like
    Dr. McKay got a reaction from zeroCat in 'friendRelationship' Bot is spamming. How can I fix?   
    You need to check the actual relationship. You're likely causing a loop by calling addFriend, which causes friendRelationship to get emitted with relationship == Friend, which calls addFriend, which emits friendRelationship which calls addFriend which...
  6. Like
    Dr. McKay reacted to Ceddini in friendsList event is not getting called   
    Thank you very much! It's working beautifully now!
  7. Thanks
    Dr. McKay got a reaction from Ceddini in friendsList event is not getting called   
    You need to set your persona state to something besides Offline in order for friends stuff to work.
    client.setPersona(SteamUser.EPersonaState.Online)
  8. Thanks
    Dr. McKay got a reaction from WhoIsUnknow in What happened with npm downloads in March 2020?   
    No idea.
  9. Thanks
    Dr. McKay got a reaction from Adwait in Cookies Send to accept trade offer   
    It looks like you're sending the parameters in the URL rather than in the post body as you should be.
  10. Like
    Dr. McKay reacted to Adwait in Cookies Send to accept trade offer   
    Thanks for the reply. Yes it works now. Your comment on Ben's questions also helped. So I just had to send the values as x-www-form-urlencoded. I was stuck on this for about a month. I was looking in the wrong direction, I kept thinking there was a problem with how I was sending the cookies or I was missing some cookie, especially the webTradeEligibility cookie as when I cleared my browsers cookies I could not trade, that cookie is not even needed when we request directly, that was strange.
    Thanks again. Have a wonderful day.
  11. Like
    Dr. McKay reacted to wolfov in New asset id after steam market   
    I checked market history (https://steamcommunity.com/market/myhistory?count=100&start=0(max 500)) and found row "rollback_new_id" he is responsible for new asset id. This way you can track all the skins on your account, but you will not be able to recognize the new asset id of the skin you bought.
  12. Like
    Dr. McKay reacted to SnaBe in Do i use this event wrong   
    You probably want to listen for the 'newOffer' event using your steam-tradeoffer-manager instance.
  13. Thanks
    Dr. McKay got a reaction from What Comes Around in How do I sellitem via httpRequestPost?   
    Unless you're doing something shady, I wouldn't expect Valve to pay any mind to you.
  14. Like
    Dr. McKay got a reaction from What Comes Around in How do I sellitem via httpRequestPost?   
    Only set Origin and Referer. Do not set Host or Cookie.
  15. Like
    Dr. McKay got a reaction from What Comes Around in How do I sellitem via httpRequestPost?   
    Get rid of the curly braces around requestoptions. And also quit using the confirmation checker as it's been deprecated for years.
  16. Like
    Dr. McKay got a reaction from What Comes Around in How do I sellitem via httpRequestPost?   
    You need to specify Origin and Referer manually, but all the other headers you're specifying should be left out as they're HTTP protocol-level headers that request will set on its own.
  17. Like
    Dr. McKay got a reaction from apibot in regarding local address   
    You would need to also bind the local address on node-steamcommunity and additionally pass that community instance to the steam-tradeoffer-manager instance in the constructor.
  18. Thanks
    Dr. McKay got a reaction from jhonathan in connection problem - steamGuardmobile   
    Well, you're logging in twice and only once with an auth code. Of course the login attempt without a code is going to fail.
  19. Thanks
    Dr. McKay got a reaction from wsk in Get details of 'view game info'   
    It's game_server_ip and game_server_port in the user event.
  20. Thanks
    Dr. McKay got a reaction from Anura in getSteamUser - privacyState   
    The profile data is cached for some time, you should try requesting again after a little while.
  21. Like
    Dr. McKay reacted to neverhood in How can i handle an InvalidPassword Error?   
    client.on('error', function(e) {         console.log(e);     });  
  22. Like
    Dr. McKay got a reaction from Shubham Shah in Is there a way to make a trade link with an item in it?   
    No, sadly that's not possible.
    There are some browser extensions out there that will make this work with a single item only, by appending &for_item=appid_contextid_assetid (like for_item=730_2_123456789) but that's only if the user has one of those extensions installed, and isn't using the Steam client.
  23. Thanks
    Dr. McKay got a reaction from finoki1274 in Old SourceMod Plugin Stuff   
    Here is where that plugin came from: https://forums.alliedmods.net/showthread.php?p=1850358
    There are only a select few commands that the server can force the client to execute, and quit is not one of them. In fact, that plugin doesn't actually support running client-side commands, it only supports "fake" client commands. Meaning, it makes the server think that the client ran a command. So it's only going to work on commands that run server-side, like "kill".
  24. Like
    Dr. McKay got a reaction from null in loginKey never wants to be emitted   
    Your fix is correct; you must log into steam-user with your password to get a login key.
  25. Thanks
    Dr. McKay got a reaction from SimpleThings in Check user's details before sending an offer.   
    err.type is not a property that exists. You should check the text of the error message to see what caused the error.
×
×
  • Create New...