-
Posts
3573 -
Joined
-
Last visited
Everything posted by Dr. McKay
-
All item attributes are visible in the data received from the GC. They're in the attributes array.
-
My assumption would be that the Preview flag is set on items that are temporary store previews (the "try it out" button in the Mann Co. store) and that NotEcon would be set on items that shouldn't be tradable or craftable. It seems that your experience doesn't match my assumption, which means that either your data is wrong, my assumption is wrong, or the actual values of the named flags in node-tf2 are wrong. Any of those could be possible; I don't think I got those flag names from any authoritative source.
-
I've never personally confirmed it, though I all but guarantee that after the game client receives info from the GC about an item that's crafted or gifted by a user that's not in the local cache, it separately requests the user's persona name using the SteamWorks RequestUserInformation function. This request goes directly to Steam and bypasses the GC. This function uses the same CM message as steam-user's getPersonas method. I promise you that all of the information necessary to tell if an item is tradable or craftable is present in the backpack property. The problem is just that Valve is good at spaghetti code and so there are a handful of different things you need to check to tell if an item is untradable or uncraftable. For tradability, there's origin (for achievement items and untradable free contract rewards), a few different item attributes (cannot trade, purchased, tradable after date, non economy, but also there's the always tradable attribute which surely overrides something but lord knows what), and a flag in the flags bitfield, and probably something else I missed too. Non-craftability is a bit easier, and you probably just need to check the purchased, never craftable, and non economy attributes in addition to the flag in the flags bitfield. But there's also the Preview and NotEcon flags to contend with. Logic dictates that both of those flags should also indicate that an item is untradable and uncraftable, but maybe that's not the case. It's just a complete mess.
-
That sort of error is caused by Steam unreliability. Just retry and hopefully it should work.
-
That means Steam didn't send back a valid response.
-
This is how you would encapsulate it: const offerObject = await new Promise((resolve, reject) => tradeHandler.manager.getOffer(depositResponse.offerId, (err, offer) => { if (err) { return reject(err); } resolve(offer); });
-
Accepting a specific offer by ID without retrieving its data first isn't a supported use-case for TradeOfferManager, since it's designed to make the process as simple as possible and performs various checks and such. You'd need to either fetch the offer first using getOffer or manually craft the HTTP request that TradeOfferManager makes.
-
Added in 3.44.0.
-
let friendsList = [array of steamids]; let chunks = []; for (let i = 0; i < friendsList.length; i += 100) { chunks.push(friendsList.slice(i, i + 100)); } let chunkResults = await Promise.all(chunks.map(ck => new Promise((resolve, reject) => { try { let result = await axios.get(`https://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=&steamids=${ck.join(',')}`); if (result && result.data && result.data.players) { return resolve(result.data.players); } reject(new Error('Malformed API response')); } catch (ex) { reject(ex); } }))); let vacFriends = []; chunkResults.forEach((chunkPlayers) => { chunkPlayers.filter(player => player.VACBanned).forEach((bannedPlayer) => { vacFriends.push(bannedPlayer); }); }); Untested and might have bugs
-
Issue with sent offer changed
Dr. McKay replied to sludgefudge's topic in node-steam-tradeoffer-manager
That seems fine. -
Issue with sent offer changed
Dr. McKay replied to sludgefudge's topic in node-steam-tradeoffer-manager
I should mention, if you want to be absolutely sure that a trade completed (and hasn't been rolled back), you should take the tradeID property from the trade offer and plug it into GetTradeStatus. The values for the status property are documented here in ETradeStatus. Or just use getExchangeDetails. -
This is not the best way to make sure you have the correct item IDs when crafting items. Just use node-tf2's backpack property, which contains an always-up-to-date copy of your backpack. To find metal, just check the defindexes. If memory serves, 5000 is scrap metal, 5001 is reclaimed, and 5002 is refined.
-
Issue with sent offer changed
Dr. McKay replied to sludgefudge's topic in node-steam-tradeoffer-manager
I've never seen a trade offer go from Accepted to some other state and actually mean that the trade didn't go through. Once it goes to Accepted you're pretty safe to say that it's completed. It used to be possible for trades to go to InvalidItems after Accepted, but the trade had still gone through. I don't think that's possible anymore though. -
Issue with sent offer changed
Dr. McKay replied to sludgefudge's topic in node-steam-tradeoffer-manager
Steam is Steam and Steam sucks. It happens sometimes and you should probably either delay a little while before marking a trade as definitively closed, or otherwise allow for reopening trades in whatever system or database you're using if the offer should become Accepted. -
Because you're mixing up async and sync. forEach returns before your requests complete. Also, rather than looping through the friend list, you should split it into chunks of 100 and make one request per chunk, to avoid getting rate limited by the API.
-
Sorry, I don't know. I wouldn't be surprised if Valve just hardcoded a list of items that can't be put into storage units in the game client.
-
That schema entry is pointing to a musickit_prefab prefab. Check the prefabs section for an item by that name, and use that as a base for the item's data. I don't plan to decode every individual attribute onto the item object since there are tons of them. If you need to check the value of an attribute that isn't already decoded, you'll just need to decode it yourself.
-
A little bit of both. Mostly I used Charles Proxy to snoop on the traffic, but these days that requires a rooted phone if you're using Android since apps won't trust user-installed root certificates by default.
-
Make multiple requests. steamcommunity.com has stricter limits.
-
It could be that you're running into rate limits. Checking multiple users for VAC bans is better done with the WebAPI.
-
Ah yeah, there is a problem, but your fix doesn't properly fix it. Here's the proper fix: client.on('friendsList', function() { let friends = Object.keys(client.myFriends).filter(steamId => client.myFriends[steamId] == SteamUser.EFriendRelationship.Friend)); console.log('All Friends: ' + friends.length); });
-
Sounds like you aren't providing valid SteamIDs.
-
No support for block/unblock multiple people from a single request?
Dr. McKay replied to Akaz's topic in node-steam-user
steam-user is specifically intended to implement the Steam client protocol. Anything that must be done via web should go in node-steamcommunity. -
is there anyway to get steamcommunity market histroy?
Dr. McKay replied to venfiw's topic in node-steamcommunity
Not at the moment.