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. I use trade link to send offer to a user not in my friend list. I add their items to the offer using the item id, it successfully adds and sends the offer. But when I see the trade offer it contains only 1 item even if I have sent more than 1. Have a look at the code below (here itemsArray contains the id of items), it was working fine when I used steamid to create tradeOffer instead of tradeUrl, but that was limited to my friend list only: const offer = manager.createOffer(tradeUrl); manager.loadInventory(appid, contextid, true, (err, myInv) => { if (err) { console.log(err); } else { manager.loadUserInventory(partnerid, appid, contextid, true, (err, theirInv) => { if (err) { console.log(err); } else { for(i=0; i<itemsArray.length; i++){ const item = theirInv.find((item) => item.assetid ==''+itemsArray[i]); console.log("got item number" + i); offer.addTheirItem(item); } offer.setMessage(`somerandom message`); offer.send((err, status) => { if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); } }); } }); } });
  2. hello everyone! I am new in node-trade-offer-manager and i wanna ask you how to add a description or message for trade. i've watched github wiki and it's said that you have to use offer.send() and the first argument is description. Boot soon i've seen that function isn't support this argument. So, how do i add a message or description of trade?
  3. Getting different keys in tags sometimes on tradeOffer.itemsToReceive. I'm trying to parse items after a trade to store the attributes in my database but I've noticed that I get different keys in "tags" sometimes. The functions I use are "tradeOfferManager.getOffer()" and "tradeOfferManager.on('sentOfferChanged', function (offer, oldState)". The problem is that when for example try to get type Heres the EconItem I usally get: I do tags[0].name, but in the second example the type "Key" can be found on key " localized_tag_name". Is there more too it with other keys in the "tags" array, Im not sure how to debug it since I get this rarely. EconItem { appid: 730, contextid: '2', assetid: '11196760158', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', icon_drag_url: '', name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', market_name: 'Spectrum Case Key', name_color: 'D2D2D2', background_color: '', type: 'Base Grade Key', tradable: true, marketable: true, commodity: true, market_tradable_restriction: 7, fraudwarnings: [], descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases', app_data: '' }, { type: 'html', value: ' ', app_data: '' }, { type: 'html', value: '', color: '00a000', app_data: { limited: '1' } } ], owner_descriptions: [], tags: [ { internal_name: 'CSGO_Tool_WeaponCase_KeyTag', name: 'Key', category: 'Type', category_name: 'Type' }, { internal_name: 'normal', name: 'Normal', category: 'Quality', category_name: 'Category' }, { internal_name: 'Rarity_Common', name: 'Base Grade', category: 'Rarity', color: 'b0c3d9', category_name: 'Quality' } ], id: '11196760158', actions: [], owner_actions: [], market_marketable_restriction: 0 } and heres the one I get at random times with different key(localized_tag_name): EconItem { appid: 730, contextid: '2', assetid: '11195150025', classid: '2209624701', instanceid: '143865972', amount: 1, missing: true, currency: false, background_color: '', icon_url: '-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXX7gNTPcUxuxpJSXPbQv2S1MDeXkh6LBBOievzZVMy1aKeJG4R6YzgzNPclaCmN72ClDNQvJMmjLyVoY-mjQTi_EM9amztZNjCYKtxNio', icon_url_large: '', descriptions: [ { type: 'html', value: 'This key only opens Spectrum cases' }, { type: 'html', value: ' ' }, { type: 'html', value: '', color: '00a000' } ], tradable: false, name: 'Spectrum Case Key', name_color: 'D2D2D2', type: 'Base Grade Key', market_name: 'Spectrum Case Key', market_hash_name: 'Spectrum Case Key', commodity: false, market_tradable_restriction: 7, marketable: false, tags: [ { category: 'Type', internal_name: 'CSGO_Tool_WeaponCase_KeyTag', localized_category_name: 'Type', localized_tag_name: 'Key' }, { category: 'Quality', internal_name: 'normal', localized_category_name: 'Category', localized_tag_name: 'Normal' }, { category: 'Rarity', internal_name: 'Rarity_Common', localized_category_name: 'Quality', localized_tag_name: 'Base Grade', color: 'b0c3d9' } ], id: '11195181042', fraudwarnings: [], owner_descriptions: [], actions: [], owner_actions: [], market_marketable_restriction: 0} Thanks
  4. Hello, how did I counter an incoming trade offer? I know that I need to use "offer.counter()", but I don't know how to use it. I got this following code to counter an offer, but it will show an error "Cannot add item to an already-sent offer". manager.on('newOffer', function(offer) { if (offer.partner.getSteamID64() == admin){ //Counter an offer by adding new item offer.counter(); offer.addMyItem({"appid": 753, "contextid": 6, "assetid": "5222324266"}); //error here offer.send(function(err, status){ if (err){ console.log("Error: "+err); } console.log("Status: "+status) }); } } Can anyone show the correct code please? I would really appreciate it. Thanks
  5. Anybody can tell me how to use them? Every time I try to use it the offer just stay....
  6. I am creating node-steam-user and steamcommunity instances and passing them into the trade offer manager constructor. I then log in using the steam user instance (as provided in the example here), and set the cookies on the trade manager and steam community. Now what's happening is when a new trade offer comes in and I attempt to accept, it fires the callback with an error "Not Logged In", and it automatically fires the "sessionExpired" steamcommunity event, which I then use to log in again the same way I did the first time -- with steam-user. However, the response is always "Already logged on". 1. Is this happening because the community session is expired but not the steam-user? Is that even possible? 2. The only thing I can think of is to change up my logic to use login() on steamcommunity, and then set the returned cookies on steam-user and trade manager. And when the web session expires, call the same login() again. Is that correct? 3. If the web session expires and I re-log in successfully, should I always set the new cookies on steam-user and trade manager? Any help here would be appreciated.
  7. offer.getReceivedItems(function (err, items) { if (err) { console.log("Couldn't get received items: " + err); // Error : soket hang up } else { } }) Sometime bot received Error: socket hang up. How fix this ? Thanks !
  8. Hello, I need to know how to detect if a sent offer was accepted. Thanks
  9. Hey, short performance / logic question. First off: - Node is updated to the newest version - All used modules are freshly loaded from npm - Pollinterval is -1 (disabled) I am using this setup here to accept trades from a specific tradepartner: manager.on('newOffer', function(offer) { console.log("New offer!") offer.getUserDetails(function(error, me, them) { if (error) { console.log("Error loading user details: " + error) } else { if(adminId.indexOf(offer.partner + '') != -1){ console.log("Accepting..."); offer.accept(function(err) { if (err) { console.log("Error: " + err); } else { console.log("Successfully accepted!"); community.acceptConfirmationForObject(config.identitysecret, offer.id, function(err){ if(err){ logError("Confirmation failed: " + err); } else { logSuccess("Confirmed!"); } }); } }); } } }); });Yes, it basically works, but: - Accepting incoming trades works super fast, but the confirmation sometimes takes really long (10-15 seconds). Now I am wondering, does my "acceptConfirmationForObject" really work well or does it use the confirmationChecker which is set to 10 seconds? - Does it make sense to call acceptConfirmationForObject() directly after accepting the trade or should I put it inside a really short timeout so the trade is "ready" to be confirmed? Does it make sense to call it more than once with a short delay in between? - If I am confirming all offers through this method, could I just disable the confirmationChecker? If both, pollinterval and confirmationChecker are disabled, shouldn't I be able to run multiple bots from one IP adress without being rate limited? Thanks a lot in advance! Looking to make this thing a little faster and smoother to use.
  10. Dota2 project I was using classid_instanceid to quote, I would like to ask, do not change the equipment in the case, these two ID is permanent? Because I found that the two ID may be changed, I do not know the problem is the website or the two ID out of the problem
  11. const offer = manager.createOffer(''+user.link+''); offer.addMyItem({ "id": item.assetid, "assetid": item.assetid, "appid": 730, "contextid": 2, "amount": 1 }); offer.setMessage('Delivery "'+item.item+'" from sitename for '+user.name+' ['+helpers.getDateTime()+']'); offer.send(function(err, status) { if(err){ util.log(`[BOT] Sent error: ${err}`); }else{ util.log(`[BOT] Sending: ${item.item} for ${user.name}. TradeID# ${offer.id}`); community.acceptConfirmationForObject(identity, offer.id, function(err) { if(err){ util.log(`[BOT] Error: ${err}`); }else{ util.log(`[BOT] Tradeoffer #${offer.id} sent!`); } }); } }); After offer send, i've got error → TypeError: community.acceptConfirmationForObject is not a function What is the problem? startConfirmationChecker work successfully
  12. Hello, how can I get the appID of a offer? And for example if a sent offer has a item of appid: 730, and other from appid: 888 return null? Thank you!
  13. Hello, I have running MySQL database where I store partner SteamID, bot SteamID, partner Trade link and Items. Is that everything I need to create new offer with bot? I would like to get some example, please. Thanks.
  14. are there any limits to calling the manager.getOffer method, I mean is there any limit to the amount of api calls for that in a minute?
  15. Hello, i have created a steam trading bot which accepts offers and save the offers in a database. My Problem is when i send 2 offers at the same Time, the second offer dont accepted. Anybody have an idea how i can fix this? Sry for my bad english.
  16. i'm getting a lot of errors 26, and i have maked the bot to handle gived and received items, and if any error comes up, completely reload inventory, but still there are errors 26 all the time, so this event will for sure be fired ?? Constructor i'm using.↓↓ new TradeOfferManager({ "steam": client, "language": "en", "community":community, "pollInterval": "10000", "cancelTime": "7200000" });
  17. I'm using pm2. When steam go down pm2 automaticly restarting bot, and then i've got error: RareLimit Exceeded How to fix this?
  18. Hello, doctor I have a problem. When a third party website login in, How do you use the webapi (openid, passport) to login in with node-steam-tradeoffer - manager to operate orders and inventory?
  19. Hello, when I load a user inventory it doesn't return me the market_hash_name. It only gives me the id, assetid, appid, contextid and amount. Thank you!
  20. So sometimes my bot is disconnected from steam, it reconnects and is shown as online and everything and then when a trade offer is sent to it, it outputs an error something along the lines "Error: Not Logged In". Unfortunately, I didn't save the error output. Hopefully, someone will know what I'm talking about, but I'll update this post when it happens again. My guess is that it has something to do with either steamcommunity or tradeoffermanager, probably the former. How can I prevent it?
  21. Hello, how can I add all user items for example for appID 730 with addTheirItems(theiritems) or addTheirItem(theirItem) ? Thank you!
  22. Is there a way i can get my partners steamid from a offer object? I've tried the following. manager.on('newOffer', function(offer){ offer.getUserDetails(function(err,me,them){ console.log(me); console.log(them); }); }); This prints out like the games they have and stuff but I need a way to get their steamid to check if the user is banned on bp.tf or other trading websites. also if you print the offer object you get something like this. partner: SteamID { universe: 1, type: 1, instance: 1, accountid: someidhere }, what is accountid and does it do anything?
  23. Hello I've been following the tutorial listed here. Its a great tutorial and everything works so far. However I am able to send a trade request, I am not however able to confirm mobile auth to actually send it. below is my code. please for the love of gaben help me. var SteamUser = require('steam-user');var client = new SteamUser();var SteamTotp = require('steam-totp'); var SteamCommunity = require('steamcommunity');var TradeOfferManager = require('steam-tradeoffer-manager');var community = new SteamCommunity();var manager = new TradeOfferManager({ steam: client, community: community, language: 'en'}); var logOnOptions = { accountName: 'sadface', password: 'sadface', twoFactorCode: SteamTotp.generateAuthCode('superTopSecretLoL')}; client.logOn(logOnOptions);client.on('loggedOn',function(){ console.log('Logged into Steam'); // online status client.setPersona(SteamUser.Steam.EPersonaState.Online); // set to appear to be playing tf2 client.gamesPlayed(440); }); client.on('webSession', function(sessionid, cookies){ console.log('websession being executed'); manager.setCookies(cookies); community.setCookies(cookies); community.startConfirmationChecker(10000, 'SuperTopSecretLoL'); sendOffer(); }); function sendOffer(){ var partner = '76561198049686559'; var appid = 440; var contextid = 2; var offer = manager.createOffer(partner); //load my inventory manager.loadInventory(appid, contextid, true, function(err, myInv){ if (err) { console.log(err); } else { var myItem = myInv[Math.floor(Math.random() * myInv.length - 1)]; offer.addMyItem(myItem); // loads partners inventory manager.loadUserInventory(partner, appid, contextid, true, function(err, theirInv){ //console.log(countCurrency(theirInv)); if (err) { console.log(err); } else { var theirItem = theirInv[Math.floor(Math.random() * theirInv.length - 1)]; // console.log(theirInv); offer.addTheirItem(theirItem); offer.setMessage(`Will you trade your ${theirItem.name} for my ${myItem.name}?`); offer.send(function(err, status){ if (err) { console.log(err); } else { console.log(`Sent offer. Status: ${status}.`); community.checkConfirmations(); } }); } }); } });} community.on('confKeyNeeded', function(tag, callback) { console.log('confKeyNeeded Called'); var time = Math.floor(Date.now() / 1000); callback(null, time, SteamTotp.getConfirmationKey('superTopSecretLoL', time, tag));});
  24. Hi everyone! I'm new to node, js and steam related scripting, so thanks Dr McKay for the place. I'm trying to make some logic for a card trade bot, but I can't find a way to get the appid of the game to which belong the trading card. I've already debbuged all the properties of the items in a trade offer, but no one match what I'm looking for. The closest I got was by using the numbers which precede in market_hash_name, but this is not a constant in all trading cards, so I need some advice to continue my project. Thanks in advance for any help and sorry for my bad english!
  25. So after I confirm a trade to send over items, I just can't get my inventory to refresh. The way I want the bot to work is after it confirms a trade, it gets its inventory, goes through each item, checks if there's a corresponding entry for each item in the database, and if not - creates a new database. So after I confirm a trade, I delete the entry of the item I'm sending away, and then run tradeOffer's manager.getInventoryContents and it still shows me that the item is there(and of course adds it back to the database). And I actually run getInventoryContents, not just reuse the inventory object from before. What is the problem and how could I solve it? Thanks EDIT: Alright, did some further testing. When the bot *receives* an item, the function works as expected and the item is added to the database. However, when it sends away the item, the inventory object still shows as if the item is there. So essentially, the inventory object is updated when receiving an item, but when it sends away the object stays there. How could that be?
×
×
  • Create New...