dvnt Posted July 13, 2023 Report Posted July 13, 2023 Is there a parameter for this? I'm specifically talking about TF2 keys but should be the same for everything I currently have this: const offer = manager.createOffer(partner_steam_id); const keys = inventory.filter(item => item.market_hash_name === 'Mann Co. Supply Crate Key'); for (let i = 0; i < keyQuantity; i++) { offer.addMyItem(keys[i]); } Problem is, running this twice will add the same exact keys to the second trade, instead of keys not currently being used in a trade. Is there a function/parameter for this? I've found a workaround that is, by printing the key object you get can see that each CEconItem has a different assetid and I can just make a list of all that are currently being used in a trade and comparing them in order to not add but said function/parameter would be ideal and I'd like to know if it exists or if there is a better way to approach this Quote
Dr. McKay Posted July 13, 2023 Report Posted July 13, 2023 steam-tradeoffer-manager doesn't have anything native to avoid putting the same item into two trades. You're responsible for tracking which items you've already offered by assetid, and avoiding those items for future trades. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.