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. To make interactions with bots and alts easier, I wanted to get an autoaccept-script going, that simply accepts everything where the itemstogive.length ==0. This is my code: manager.on('newOffer', function (offer) { accept(offer); }); function accept(offer) { if (offer.itemsToGive.length == 0) { offer.accept(true, function (err) { console.log("offer.State: " + offer.state); if (err) { console.log("error: " + err); console.log("offer.State: " + offer.state); if (!(offer.state == 3 || offer.state == 6 || offer.state == 8)) { setTimeout(accept(offer), 3000); return; } } }); Sometimes just nothing happens, and the offer gets ignored completely. My guess is, that the trade-offer is buggy at the beginning (no items show on both sides), and that offer.itemstogive.length is undefined then, and my if is never true? Its quite hard to debug it for me, since this "error-case" isn't really reproduceable since it happens just very rarely.
  2. First off this is somewhat of my 10th attempt to post something here cause I wanted to add some error logs and got insta blocked. But now again to my Issue. I just got some node modules I needed for the example of the Send Trade in the steamoffer-manager module. I got my main account hooked up got his shared secret tryed it out and it worked on the first try already sending the tradeoffer without issues. 1 Day Later (now) I have created 2 new Accounts I want to use as a bot. I got them both hooked up, confirmed the emails , added a phone number which i verified then I added 5€ and then I used the 2 Functions enableTwoFactor and finalizeTwoFactor on which I used the shared secret key from the function before. Then I set everything up and the login seems to work, aswell as getting the Api but after that , I guess on the loadInventory function it gives me the error message "Malformed Response". I Got 2FA set up, and used the basic example and it all worked on my main. I cant figure out the Issue. I would love to get some help.
  3. manager.getOffer(offers.id, function (err, offer) { if (!err) { steamBotLogger('Ðачинаем прием трейда: #' + offer.id); offer.accept(function (err, status) { if (!err) { redisClient.multi([ ["lrem", redisChannels.tradeoffersList, 0, offer.id], ["lrem", redisChannels.usersQueue, 1, offer.partner.getSteamID64()], ["rpush", redisChannels.betsList, offerJson], ["lrem", redisChannels.checkedList, 0, offerJson] ]).exec(function (err, replies) { redisClient.lrange(redisChannels.usersQueue, 0, -1, function (err, queues) { io.emit('queue', queues); steamBotLogger("Трейд #" + offer.id + " принÑÑ‚"); checkedProcceed = false; }); }) return; } else { console.log(err); if (err.eresult != 11 || err.eresult != 28) { steamBotLogger(err); } if (err.eresult == 11) { setTimeout(function () { checkedOffersProcceed(offerJson); }, 1000); } else { setTimeout(function () { AcceptOffer(offer, offerJson); }, 1000); } } }); } else { steamBotLogger('Ошибка Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð¸Ñ Ñ‚Ñ€ÐµÐ¹Ð´Ð° #' + offer.id); } }); Does not accept all accounts from 2 accounts with 1 account accepts. Donate $ 5 each year or 1 time? Donate $ 5 each year or 1 time?
  4. please help me. i no receive error. picture for console: http://imgur.com/G7oxOqI http://imgur.com/qafysM1 please help me
  5. example : i want to send item to bot used website. item 1, price: $10 item 2, price: $5 how the Bot know item 1 ->$10, and item 2 -->$5. because if i send item and the Bot accept, assetid will change. thank you.
  6. Probably this is not an issue of node-steam-tradeoffer-manager, but just a "wonderful steam" glitch. Nevertheless, it is a very strange one and extremely bad one. When our bot's receive the items (when the bot's sentoffer is accepted) the items assetids in the receipt (and also in our database of course) doesn't always match the actual asset id's in steam bot inventory. This hasn't ever happened before, but it began like about 1 week ago. Before, our system was running for about half year without troubles. I have manually rechecked the trade offers, which used to return wrong assetid's for items, and those assetid's do actually exist in receipt, but in steam inventory, it show's up with completely different assetid. Have anyone ever encountered this issue before? What are the possible ways to solve it? EDIT 1: Have to clarify a little bit - This has happened now about like 5 times. It is a very rare case, but a case nevertheless. Usually, when this happens, not all of the item's Asset ID's a different, but just a few, usually 1 or 2 out of whole offer. For example, there are 10 items in the receipt. 8 Items from the receipt are with correct Asset ID's and 2 items assetid's wouldn't match the real one's in inventory. To get the items "getReceivedItemsAsync" function is used. Async, because using bluebird promises library.
  7. How can I check the offer that has already been sent? For example, there are 2 identical items. How can I exclude an item from inventory if this item has already been sent but not yet received in full
  8. Hello, is there a simple trade offer accept bot on this website available to be downloaded, which accepts offers that don't contain items from your inventory (you don't lose items)?
  9. I want to decline some trade offers not to exhaust the limits (30 sending,incoming etc). How I can decline offer by id? For example: I sent the offer -> If the offer was not accepted within 4 hours -> decline it. Thanks for your answers. Sorry for my english.
  10. manager.on('newOffer', function (offer) { if (item.type.match('Profile Background')) { receiveBackgroundAmount = offer.itemsToReceive.length giveBackgroundAmount = offer.itemsToGive.length console.log('background true') if (receiveBackgroundAmount == giveBackgroundAmount) { offer.accept(); console.log('right items true') } else { offer.decline(); console.log('right items false') } } }); This is what i have now. It should accept a 1:1 background trade. The output i get is: background true right items true But the offer gets declined.
  11. Hi, I currently am working a trading bot. I think it may pertinent that I am running multiple bots. However, I seem to receive the following error when the following code is called and the correct steam64id is the partner to the trade. manager.on('newOffer', function(offer) { console.log("New offer #" + offer.id + " from " + offer.partner.getSteam3RenderedID() + " To bot: " + index); if (offer.partner.getSteamID64() === 'ID IS HERE') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer. Status: ${status}.`); } }); }else{ offer.decline(); } }); I have tried re-sending the trade, but more often than not the error persists. Here is the specific stack trace: { Error: There was an error accepting this trade offer. Please try again later. (42) at Object.exports.makeAnError (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\steam-tradeoffer-manager\lib\helpers.js:12:12) at SteamCommunity.manager._community.httpRequestPost (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:649:13) at Request._callback (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\steamcommunity\components\http.js:69:15) at Request.self.callback (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\request\request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\request\request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at IncomingMessage.<anonymous> (D:\Save Locations\Documents\HTML and Web\CStrike.bet\Website\Steambot\node_modules\request\request.js:1091:12) eresult: 42 } Thanks for the help.
  12. My function: function sendOrder ( logOnOptions, offerLink ) { var client = new SteamUser(); var 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" // We want English item descriptions }); var community = new SteamCommunity(); if (fs.existsSync('polldata.json')) { manager.pollData = JSON.parse(fs.readFileSync('polldata.json')); } 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.loadInventory(730, 2, true, function(err, inventory) { if (err) { console.log(err); return; } if (inventory.length == 0) { // Inventory empty console.log("CS:GO inventory is empty"); return; } console.log("Found " + inventory.length + " CS:GO items"); // Create and send the offer var offer = manager.createOffer(offerLink); offer.addMyItems(inventory); offer.setMessage("Here, have some items!"); 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(logOnOptions.identySecrect, 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]}`); }); manager.on('pollData', function(pollData) { fs.writeFile('polldata.json', JSON.stringify(pollData), function() {}); }); } After calling it, I get an error: Logged into Steam Error: Access Denied at SteamCommunity.<anonymous> (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/webapi.js:15:20) at Request._callback (/Users/code/Documents/node/steam/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/code/Documents/node/steam/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/Users/code/Documents/node/steam/node_modules/request/request.js:1091:12) at Gunzip.g (events.js:291:16) Please help me
  13. when someone send item to my bot, item_id = 12345, when item received by my bot, item_id change. how to bot know this new assetid? sorry for bad english.
  14. hi there , im make steam trade offer but i cant send and receive item this is my code manager.loadInventory(appid, contextid, true, function(err, inventory) { if (err) { console.log("ERR : "+err); process.exit(); } console.log("Found " + inventory.length + " items"); /*var iteminventory = { "assetid": offerid, "appid": appid, "contextid": contextid, "amount" : 1 };*/ // Create and send the offer var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner="+accountid+"&token="+token); offer.addMyItems(iteminventories); offer.addTheirItems(itemtheirinventories); offer.setMessage("SENT !"); offer.send(function(err, status) { if (err) { console.log("ERR : " + err); process.exit(); } if (status == 'pending') { // We need to confirm it console.log('Offer #${'+offer.id+'} sent, but requires confirmation'); community.acceptConfirmationForObject("confirm code", offer.id, function(err) { if (err) { console.log("ERR : "+err); //process.exit(); } else { console.log("Offer confirmed"); } }); } else { console.log('Offer #${'+offer.id+'} sent successfully'); } }); }); i getting error code 26 https://steamerrors.com/26 i know this error for item not exist but item id is exist in inventory . best solution for my code tnx
  15. Please help with my problem. I do not know why the 'appid' is not defined Stack trace: Logged into Steam /Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:419 if (typeof details.appid === 'undefined' || typeof details.contextid === 'undefined' || (typeof details.assetid === 'undefined' && typeof details.id === 'undefined')) { ^ TypeError: Cannot read property 'appid' of undefined at addItem (/Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:419:20) at TradeOffer.addTheirItem (/Users/user/Documents/node/steam/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:374:9) at manager.loadUserInventory (/Users/user/Documents/node/steam/project4.js:80:12) at SteamCommunity.<anonymous> (/Users/user/Documents/node/steam/node_modules/steamcommunity/components/users.js:331:5) at Request._callback (/Users/user/Documents/node/steam/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/Users/user/Documents/node/steam/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/Users/user/Documents/node/steam/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) Code: function sendRandomItem() { const partner = 'partner_code'; const appid = 730; const contextid = 2; const offer = manager.createOffer(partner); manager.loadInventory(appid, contextid, true, (err, myInv) => { if (err) { console.log(err); } else { const myItem = myInv[Math.floor(Math.random() * myInv.length - 1)]; offer.addMyItem(myItem); manager.loadUserInventory(partner, appid, contextid, true, (err, theirInv) => { if (err) { console.log(err); } else { const theirItem = theirInv[Math.floor(Math.random() * theirInv.length - 1)]; offer.addTheirItem(theirItem); offer.setMessage(`Will you trade your ${theirItem.name} for my ${myItem.name}?`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } }); }
  16. console.log('[OFFER] Checking trade hold'); offer.getUserDetails(function(them) { //check for escrow if (them.escrowDays > 0) { offer.decline(); console.log('[OFFER] Declined - Trade hold'); tradelog.info('Trade offer #' + offer.id + ' from ' + offer.partner.getSteamID64() + ' declined: trade hold'); } else { //script to check trade contents } }); I have this part in the manager.on('newOffer', function (offer) { part, so them and offer are defined. The error I'm getting is: Cannot property 'escrowDays' of null.
  17. How do i get the item type in an offer? I want to check if the item is a trading card.
  18. Hi, i currently have a really short script for trading but it keeps on giving me that error. My current script: manager.on('newOffer', function (steamID, respond) { console.log('New offer from' + offer.partner.getSteam3RenderedID); if (offer.partner.getSteamID64() === 76561198259000054 || offer.itemsToGive.length === 0) { offer.accept(); } }); And on the start: var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager({ steam: client, community: community, language: 'en' });
  19. Hello, I have a problem with my bot. I have currently this script: //loading everything up var SteamUser = require('steam-user'); var SteamTotp = require('steam-totp'); var config = require('./config.js'); var SteamCommunity = require('steamcommunity'); var TradeOfferManager = require('steam-tradeoffer-manager'); var steamID = require('steamid'); var Winston = require('winston') var fs = require('fs') var client = new SteamUser(); var community = new SteamCommunity(); var manager = new TradeOfferManager({ steam: client, community: community, language: 'en' }); //logging in var logOnOptions = { accountName: 'username', password: 'password', twoFactorCode: SteamTotp.generateAuthCode('shared_secret') }; client.logOn(logOnOptions); client.on('loggedOn', () => { console.log('Logged into Steam'); client.setPersona(SteamUser.Steam.EPersonaState.Online); }); //new items client.on('newItems', function (count) { console.log(count + " new items in inventory"); }); //trading manager.on('newOffer', handleOffer); function handleOffer(tradeoffer) { console.log('New offer #'+ offer.id +' from '+ offer.partner.getSteam3RenderedID()); console.log('Checking: Gift offer/owner offer'); if (offer.partner.getSteamID64() === 76561198259000054 || offer.itemsToGive.length === 0) { logger.info('User '+ offer.partner.getSteam3RenderedID() +' offered gift/owner offer'); offer.accept(function (err) { console.log('Offer accepted'); }); } else { console.log('Offer is not a gift/owner offer'); } console.log('Checking: Trade hold'); offer.getUserDetails(function(err, me, them) { if (them.escrowDays > 0) { offer.decline(); console.log('Offer declined - Trade hold') } else { console.log('No trade hold') } }); }; // }); //}); //declining trade requests client.on('tradeRequest', function(steamID, respond) { console.log("Incoming trade request from " + steamID.getSteam3RenderedID() + ", declining, sending message"); respond(false); client.chatMessage(steamID, 'Sorry, I dont respond to trade requests, use trade offers instead.') }); instead of manager.on('newOffer', handleOffer); function handleOffer(tradeoffer) { i have also tried manager.on('newOffer', function (steamID, respond) { It doesn't show an error on startup, but when i send a trade offer nothing seems too happen.
  20. Hello. There was such problem: when the bot sends two DIFFERENT trades at the same time, for example where there are two or three of the same case. One trade is accepted, the other gets the status "Items unavailable for trade" Items are sent by Market name (the classid and instanceid is always the same. they do not have sense). assetid in the offer and the inventory are different. The task such: to send items that are not currently in other trades of the account.
  21. Hey, guys can u help me? when i add this offer.addMyItem(inventory[0]); that not work /; // Create and send the offer var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?xxxxxxxxxxxxxx"); offer.addMyItems(inventory); offer.addMyItem(inventory[0]); offer.setMessage("Here, have some items!"); offer.send(function(err, status) { if (err) { console.log(err); return; }
  22. Hello,I'd like to know how to correctly check item type for trading card. I tried: offer.itemsToReceive.forEach(function(item) { if (item.type.includes("Trading Card"){ My code } But this doesn't seem to work. Could anybody tell me how to do this correctly?
  23. How can you get item.tags for items in trades (if that's even possible) I tried if (item.tags == "Trading Card") but this obviously didn't work, can anyone help me form this correctly? (if it's possible)
  24. Hello. Please help. My 4 bot`s dont want work with proxy. Always error 429 Bot logged in, and after 1-2s Please give me example how to correct use proxy? I can set this more than 4 days(
×
×
  • Create New...