Jump to content
McKay Development

dvnt

Member
  • Posts

    2
  • Joined

  • Last visited

dvnt's Achievements

  1. 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
  2. const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const secrets = require('./2fasecrets.json'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager({ steam: client, community: community, language: 'en', pollInterval: 10000 }); const logOnOptions = { accountName: secrets.username, password: secrets.password, twoFactorCode: SteamTotp.generateAuthCode(secrets.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); }); client.on('friendMessage', (steamid, message) => { console.log(`Message from ${steamid}: ${message}`); }); manager.on('newOffer', offer => { console.log("New offer #" + offer.id + " from " + offer.partner.getSteamID64()); }); friendMessage is working fine, being able to receive any messages from anyone. But I'm having problems with newOffer, sending offers and never getting their information to be displayed on the terminal. Is this due to steam lags? An error in my code? The fact I haven't spent $5 on the account to unlimit it?
×
×
  • Create New...