Jump to content
McKay Development

Search the Community

Showing results for tags 'node-steam-tradeoffer-manager'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • Releases & Updates
  • Help & Support
    • General
    • Guides
    • node-steam-user
    • node-steamcommunity
    • node-steam-tradeoffer-manager
    • node-steam-session

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Location


Interests

  1. Hello guys i want to make a overpay bot using node js and i need to auto create listing to backpacktf using its create listing post api and i also get the prices from it. My question iso how can i get the CEconItem's rarerity like Unique Genuine etc thanks
  2. When i send chat command to activate this I get error which i dont know to fix. If i leave just my item it is same. D:\Radna površina\bot>pause Press any key to continue . . . code: if(numberOfKeys > 10) { client.chatMessage(steamID, "You cannot buy that much"); } else { var offer = manager.createOffer(steamID); manager.loadInventory(753, 6, true, function(err, myItems) { itemx = { appid: 304930, contextid: 2, amount: 1, assetid: '646664519304758668' } offer.addMyItem(itemx); offer.loadPartnerInventory(753, 6,true, function(err, theirItems) { if(err) { console.log(err); return; } itemy = { appid: 753, contextid: 6, amount: 1, assetid: '1922357299630920400' } offer.addTheirItem(itemy); offer.send(""); }); }); client.chatMessage(steamID, "Processing"); }
  3. Logged into Steam { Error: connect ETIMEDOUT 173.252.102.241:443 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14) code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: '173.252.102.241', port: 443 } i use the offloader.js ,who can help me...
  4. I've been working on TF2 trade bot over the past days and as I got close to a solution for a buy/sell command, I ran into an issue. How can I calculate the amount of metal to add to a trade offer? I had a function that found the refined, reclaimed and scrap metal in a users inventory. The same way I find the keys in the bot's inventory. I had the bot calculate the key price in metal and split it up so it new what to add. However, the bot would only add specific items to do a successful trade. Meaning that if the key price was 32.22, it would add 32 ref and 2 scrap to the trade offer. But if the user dosen't have the exact amount of refined/scrap. Example, lets say they have 31 refined, 3 reclaimed and 2 scrap, (32.22 ref in total) it would cancel (return true). This function is not in the code below since I scrapped it. So I'm looking for a way that the bot can find the users metal from their inventory with getUserInventoryContents and then add the right amount of metal to the trade offer, regardless of a specific item count. As long as the users total metal count meets the key buy price in metal. If anyone can help me or come with suggetions on what I could do, I would be thankful! Below is my buy command with the matching function: //Command for buying keys client.on('friendMessage', function(steamID, message) { //If the message meets the requirements. var buyKeysCmd; if(buyKeysCmd = message.match(/^!buy (\d+)/i)) { var keysToBuy = buyKeysCmd[1]; if(keysToBuy > 0) { buyKeys(steamID, keysToBuy); client.chatMessage(steamID, 'Processing your request.'); } else { client.chatMessage(steamID, 'You can\'t buy 0 keys.'); } } }); //Function used to buy keys with metal function buyKeys(steamID, keysToBuy) { //No specific amount of keys to buy, cancel if(!keysToBuy) { return true; } //How many keys we've in our TF2 inventory var ourKeys = []; //How much the amount of keys will cost in metal. var priceInMetal = config.trading.buyKey * keysToBuy; //Display the request. console.log('User: ' + steamID + ' has requested to buy ' + keysToBuy + ' key(s) for ' + priceInMetal + ' metal.'); //Load our TF2 inventory manager.getInventoryContents(config.bot.gameID, 2, true, function(err, inventory) { if(err) { console.log('Error getting our inventory: ' + err); client.chatMessage(steamID, 'I encountered an error getting my inventory, please try again later.'); } else { //Go trough our inventory and search for accepted keys for(var n = 0; n < inventory.length; n++) { if(ourKeys.length < keysToBuy && config.acceptedKeys.indexOf(inventory[n].market_hash_name) >= 0) { ourKeys.push(inventory[n]); } } //We don't have any keys if(ourKeys.length === 0) { client.chatMessage(steamID, 'I don\'t have any keys. Please ask an admin to re-stock or wait for me to sell some keys.'); return true; //The user has requested to buy more keys than our current stock. } else if(keysToBuy > ourKeys.length) { console.log('I don\'t have ' + keysToBuy + ' key(s).'); client.chatMessage(steamID, 'I don\'t have ' + keysToBuy + ' key(s).'); return true; } //If we've the requested amount of keys console.log('Adding ' + ourKeys.length + ' key(s) to the trade offer.'); //Load their inventory manager.getUserInventoryContents(steamID, config.bot.gameID, 2, true, function(err, inventory) { if(err) { console.log('Error getting their inventory: ' + err); client.chatMessage(steamID, "An error occurred while loading your inventory. Please again try later."); } else { //This is where the users inventory is loaded //The bot should look trough the users tf2 inventory //Find the users refined metal, reclaimed metal and scrap metal //Add it all together and log it //If the user has enough metal to purchase the requested amount of keys, continue //The bot can now add the metal to the trade offer below. var offer = manager.createOffer(steamID); //Setup the trade details. offer.addMyItems(ourKeys); //offer.addTheirItems(their metal for buying x amount of keys); offer.setMessage('You\'re buying ' + ourKeys.length + ' key(s) for ' + priceInMetal); offer.send(function(err, status) { if(err) { console.log('Error sending the trade offer: ' + err); client.chatMessage(steamID, 'Something went wrong. There was an error sending you the trade offer, please contact support if this continues.'); } else if(status == 'pending') { console.log(`Trade offer #${offer.id} is validated, but awaiting confirmation.`); client.chatMessage(steamID, 'The trade offer is validated, but awaiting confirmation.'); community.acceptConfirmationForObject(config.account.identitySecret, offer.id, function(err) { if(err) { console.log('Error confirming trade offer: ' + offer.id); client.chatMessage(steamID, 'Error confirming trade offer, declining.'); offer.decline(); } else { console.log(`Trade offer #${offer.id} confirmed.`); client.chatMessage(steamID, 'The trade offer was sent successfully. You can accept it here: http://steamcommunity.com/tradeoffer/' + offer.id); } }); } }); } }); } }); }
  5. hello, I have simple script to move all trading cards, backrounds, and whole Steam inv (753, 6) to other accounts, but since Mysterious Trading Card will expire in 21 June I can't send trade offer with 15 days trade hold, because of [26] error. I store all items in inventory array, how can I exlude all Mysterious trading cards from sending them in trade offer?
  6. manager.loadUserInventory(steamID,753,2,true,(err,inventory,currencies) => {}) I get "Malformed response" error everytime i try to get the steam inventory and im %100 sure im logged in. I tried same code and getting tf2 and csgo inventories there is no error and i can get inventory successfully but when i try to get steam inventory i always get "Malformed response" error Any Idea how can i fix this ?
  7. I've making my bot and I need to check item market hash name within trade offer, but in offer.itemsToGive and offer.itemsToReceive contains only following information: EconItem { appid: 730, contextid: '2', assetid: '13984115215', classid: '310777179', instanceid: '302028390', amount: 1, missing: false, est_usd: '1', id: '13984115215', fraudwarnings: [], descriptions: [], owner_descriptions: [], actions: [], owner_actions: [], market_actions: [], tags: [], tradable: false, marketable: false, commodity: false, market_tradable_restriction: 0, market_marketable_restriction: 0 } So my question is: How to get market_hash_name?
  8. Are there any typescript definitions for this, or is anybody working on it?
  9. let offer = manager.createOffer(steamID); offer.addTheirItems(itemArray); offer.setMessage("Beni kullandığınız için teşekkürler / Thanks for using me") offer.send((err,status) => { }) How can i get a message when the offer successfully accepted?
  10. I've cookies array like this: [ 'sessionid=7030e64a53d6f7860bc69038', 'steamLogin=76561198447561491%7c%7c3B5AF02B12EC2F367974917BC090EB7F0E6B3B91', 'steamLoginSecure=76561198447561491%7c%7c1CC92BDD67243C7E761681E40E3B8419416AA858' ]I get an error "not logged in" when I try to log in trade offer manager through cookies using setCookies method. I take cookies a minute before using setCookies method Can someone explain why i get an error?
  11. Hello sir im using php to communicate with my express my problem is the first offer is doing fine but it loops and get an erro on the second one. here is my code. app.post('/test',function(req,res){ r = req.body; items = JSON.parse(r.items); const tradeurl = r.tradeurl; let client = new SteamUser(); let manager = new TradeOfferManager({ "steam": client, // Polling every 30 seconds is fine since we get notifications from Steam "domain": "example.com", // Our domain is example.com "language": "en", "cancelTime":180000 }); let community = new SteamCommunity(); // Steam logon options let logOnOptions = { "accountName": config.username, "password": config.password, "twoFactorCode": SteamTotp.getAuthCode(config.sharedSecret) }; if (FS.existsSync('polldata.json')) { manager.pollData = JSON.parse(FS.readFileSync('polldata.json').toString('utf8')); } client.logOn(logOnOptions); client.on('loggedOn', function() { console.log("Logged into Steam"); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) { console.log(err); process.exit(1); // Fatal error since we couldn't get our API key return; } console.log("Got API key: " + manager.apiKey); // Get our inventory manager.getInventoryContents(570, 2, true, function(err, inventory) { if (err) { console.log(err); return; } // console.log(inventory); // throw "stop execution"; if (inventory.length == 0) { // Inventory empty console.log("Dota 2 inventory is empty"); return; } console.log("Found " + inventory.length + " Dota 2 items"); // Create and send the offer let offer = manager.createOffer(tradeurl); item = [ { appid: 570, contextid: '2', classid: '645249158', assetid: '13126112943', instanceid: '260036609', amount: 1 } ]; offer.addTheirItems(items); offer.setMessage("Offer: #"+ offer.id); offer.send(function(err, status) { if (err) { console.log(err); return; } if (status == 'pending') { // We need to confirm it console.log(`Offer #${offer.id} sent, but requires confirmation`); community.acceptConfirmationForObject(config.identitySecret, offer.id, function(err) { if (err) { console.log(err); } else { console.log("Offer confirmed"); } }); } else { console.log(`Offer #${offer.id} sent successfully`); } }); }); }); community.setCookies(cookies); }); manager.on('sentOfferChanged', function(offer, oldState) { console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); if (TradeOfferManager.ETradeOfferState[offer.state] == 'Accepted'){ manager.shutdown(); client.logOff(); //process.exit(1); // testing lang return; } }); manager.on('pollData', function(pollData) { FS.writeFileSync('polldata.json', JSON.stringify(pollData)); }); manager.on('sentOfferCanceled',function(reason){ console.log('offer cancelled franz'); manager.shutdown(); client.logOff(); FS.unlink('polldata.json',function(err){ console.log('poll data deleted'); res.send(); }); }); }); the attach file is the result. thank you. hope you guys can help me.
  12. Hello, What is `version` in `json_tradeoffer` from form of tradeoffer? `node-steam-tradeoffer-manager` have set on 4 (https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/master/lib/classes/TradeOffer.js#L297). I checked it while sending offers on steam. If I sent item for friend, `version` is equeal 2, but If I sent offer "item for item" and "nothing for their item", `version` is equeal 3. Any ideas?
  13. Hi, I'm trying to add Full Card Sets in a trade offer. Say, the command to request card sets is !set 10, the bot will send 10 Full Card Sets. I'm not sure how to tell the bot how many Cards make a Full Set. Would I need to use an API or some sort of a database with all the existing sets? I would appreciate any help, thank you!
  14. I working on some open sourced steam card bot, I want to add option to check gems in trade offer, how can I check if trade offer have exactly 4000 gems? array of accepted items: acceptedItems: [ "Chroma 2 Case Key", "Mann Co. Supply Crate Key" ], if (!acceptedItems.includes(offer.itemsToReceive[0].market_hash_name)) { client.chatMessage(offer.partner, 'its not 4000 gems'); return offer.decline(); } can someone help me please?
  15. Hey, I've created a bot and when I write to him !sell [item], he displays me how much i need to pay and creates a offer - with the item and his payment. The problem is it sometimes sends me the payment and I shouldn't give him anything. I've checked it with itemsToGive ItemsToRecieve and it didn't work. Then I saw the isGlitched() method but everytime the bot sends a trade, it shows that it's glitched although sometimes it isn't..
  16. Hi. I'm using tradeoffer-manager for buying/selling items on OPSkins and few other marketplaces, but lately Valve started to ban my accounts. Usually I have 40-70 trades per day per account. What I need to change to stop receiving bans? Maybe you have some advices what i shouldn't do? Because Valve don't want to tell me what exactly am I doing agains their rules
  17. The action link on EconItems only opens steam and not CS:GO for item inspection?
  18. Does anybody have any "list_of_subs=" parm from a coupon is based on? Or anybody got any idea on how to know which games a coupon comes from without searching the market?
  19. I need help with receivedOfferChanged. It don't receive offer.id and status. Below is my code and output from console. var botsManager = new BotManager(); botsManager.on('receivedOfferChanged', function(offer, oldState) { console.log('--> STATUS ' + offer.id + ':' + offer.tradeID + ': (OLD:' + oldState + ') TO (NEW:' + offer.state + ')'); }); Output: --> STATUS undefined:undefined: (OLD:[object Object]) TO (NEW:undefined)
  20. I have read this polling.js however I didn't understand how does it function from the core (trying to port it to another languge) my issue, is node-steam-tradeoffer-manager constantly sending requests HTTP to steam API in order to retrieve trade status (which sounds reaaaallllly inefficient) ? or there is a way to actually ask steam to send us data once a trade has been updated ( like a socket or something) ? if it's HTTP based, I know how to implement it but if it's socket based please can you provide links to resources which I can read to properly understand how to use it/explain it
  21. Installed packages. +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] bot: new SteamUser(), community: new SteamCommunity(), offers: new TradeOfferManager(), function trade(botid, senderid, trd) { bots[botid].offers.getInventoryContents(753, 6, true, function(err, inventory) { if (err) { logger.error(err); return; } if (inventory.length == 0) { logger.warn("Steam inventory is empty"); return; } logger.info("Found " + inventory.length + " Steam items"); var trode = bots[botid].offers.createOffer(new TradeOfferManager.SteamID('' + senderid + ''), '' + trd + ''); trode.addMyItems(inventory); trode.setMessage("items"); trode.send(function(err, status) { if (err) { logger.error(err); return; } if (status == 'pending') { logger.info('Offer sent, but requires confirmation'); bots[botid].community.acceptConfirmationForObject(bots[botid].identity_secret, trode.id, function(err) { if (err) { logger.error(err); } else { logger.info('Offer confirmed'); } }); } }); }); } When I do not specify a token, I get an error. Sorry for my bad english and ty for helping.
×
×
  • Create New...