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 McKay, First of all, thanks for your hard work. I'm trying to implement tradeoffer-manager to my bot project but sometimes my bot process just halted, it threw error like this: 2016-10-26 17:19:13 - error: [x] [tradeoffer-manager] { Error: HTTP error 429 at SteamCommunity._checkHttpError (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:108:9) at Request._callback (/xbot/node_modules/steam-tradeoffer-manager/node_modules/steamcommunity/components/http.js:50:61) at Request.self.callback (/xbot/node_modules/request/request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/xbot/node_modules/request/request.js:1048:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/xbot/node_modules/request/request.js:969:12) at emitNone (events.js:91:20) at Gunzip.emit (events.js:185:7) code: 429 } My main index.js got this to handle these kind of excetion like this: process.on('uncaughtException', function(err) { // handle the error safely console.log(err) }); Please help. Thanks.
  2. Hi there, i've been trying to do a bot as hobby. All the think i've been trying to is send a tradeoffer to my other account for spesific item. I've done it with the item id, which i get it by html code from chrome. What i want to do is get that item id and send the offer. Ex : i've a deagle sunset ww and i want to sent offer to myaccount2 this item for usp-s orion mw.
  3. hi, im getting not logged in error and i could not find why here is my code : var SteamUser = require("steam-user"); var client = new SteamUser; var TradeOfferManager = require('steam-tradeoffer-manager'); var manager = new TradeOfferManager({ steam: client, domain: "localhost", language: "en", pollInterval: 10000, cancelTime: 300000 }); client.logOn({ "accountName":"steamid", "password":"steampw", }); client.on('loggedOn', function(details){ console.log("["+client.steamID.getSteam3RenderedID()+"]Logged on"); client.setPersona(SteamUser.EPersonaState.Online); client.gamesPlayed(440); }); client.on('error',function(e){console.log(e)}); client.on('webSession',function(sessionID,cookies){console.log("++WebSession++")}); client.on('newItems',function(count){console.console.log(count+" yeni eÅŸya.");}) client.on('accountLimitations', function(limited, communityBanned, locked, canInviteFriends) { var limitations = []; if(limited) { limitations.push('LIMITED'); } if(communityBanned) { limitations.push('COMMUNITY BANNED'); } if(locked) { limitations.push('LOCKED'); } if(limitations.length === 0) { console.log("Our account has no limitations."); } else { console.log("Our account is " + limitations.join(', ') + "."); } if(canInviteFriends) { console.log("Our account can invite friends."); } }); var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=11111&token=22222") offer.addMyItems([ { "appid": 730, "contextid": 2, "assetid": "7883664867" } ]); offer.addTheirItems([ { "appid": 730, "contextid": 2, "assetid": "7679971620" } ]); offer.send(function(err, status) { if (err) { throw err; } console.log("Offer #" + offer.id + " is now " + status); });
  4. console.log(inventory); var pool = inventory.filter(function (item){ if (item.name == 'Munitions Mann Co.'), }; }); // Filter out the series var re = new RegExp('N°' + series, ''); // ex: #82 pool = pool.filter(function (item) { return item.name.match(re); }); i've done this i'm not rlly sure it works I want to filter Munition crates.
  5. manager.loadUserInventory(user, 730, 2, false, function (err, inventory) { if (err) { console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!")); } else { console.log(inventory); } }); My code looks like this ^. And the result I get in console is: CEconItem { id: '7701501191', classid: '1989271219', instanceid: '0', amount: 1, pos: 2, assetid: '7701501191', contextid: '2', appid: '730', icon_url: 'IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0rO2BBTqjOWGReHiLGV9uH7ZbY2ve9zKtsemWRG3BEuotQg9Ve6pX-m1IPMGNIVJjg5FYpGm3hUloEgIhYslfLQ6-kidANabgWCQJ', icon_url_large: 'IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0rO2BBUv7aSXDKm-OSApqHrZdNGverGai5rnCRT2YFLwsF1oCePNR-jVKPM7dNkQ41dUC5XW2kAJ-ERonYMhTfBuy2ngKbLwgkHJBISpQdIvk', icon_drag_url: '', name: 'Graffiti | Toasted (Desert Amber)', market_hash_name: 'Graffiti | Toasted (Desert Amber)', market_name: 'Graffiti | Toasted (Desert Amber)', name_color: 'D2D2D2', background_color: '', type: 'Base Grade Graffiti', tradable: false, marketable: false, commodity: true, market_tradable_restriction: 7, descriptions: [ { type: 'html', value: 'This graffiti can be applied to the in-game world. You can apply it until you run out of charges.' }, { type: 'html', value: ' ' }, { type: 'html', value: '', color: '00a000', app_data: [Object] }, { type: 'html', value: ' ' }, { type: 'html', value: '' } ], actions: [ { name: 'Inspect in Game...', link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D3362116622103653869' } ], market_actions: [ { name: 'Inspect in Game...', link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M%listingid%A%assetid%D3362116622103653869' } ], tags: [ { internal_name: 'CSGO_Type_Spray', name: 'Graffiti', 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' }, { internal_name: 'Tint5', name: 'Desert Amber', category: 'SprayColorCategory', category_name: 'Graffiti Color' } ], is_currency: false, market_marketable_restriction: 0, fraudwarnings: [] } What if I only want to get one element in return. Like if i would say I only wanna get the name of the skins after "name:". Not a whole array list.
  6. manager.loadUserInventory(user, 730, 2, true, function (inventory, err) { if (err) { console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!")); } else { console.log(inventory); } }); Why does it return err? I've done everything correctly and i've checked so the variable $user is equal to a valid steamid.
  7. Hey so I wanted my bot to check a users inventory. This is how my code looks like. var TradeOfferManager = require("steam-tradeoffer-manager"); var manager = new TradeOfferManager({ "steam": client, "language": "en" }); manager.loadUserInventory(user, "730", "1", "true", ???); console.log(???.inventory); https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#loaduserinventorysteamid-appid-contextid-tradableonly-callback So as you see here at the code and the link i provided I haven't defined the callback thing yet indicated with "???". I don't really know what callback means and how I can use it. Please help me understand this variable. Thanks in advance!
  8. Is there a way to use one trade offer manager for two accounts?
  9. Title, this situation should happen when users are sending a trade offer with only their items in it. Just wondering, because I need to be 100% certain my bot won't fail
  10. Hey, I am still not too good with Node or JS, but working on it! I have a working NodeJS bot to accept item donations. Sometimes, offers are glitched. The bots console log tell me, that it accepted them, which of course doesn't work. If I restart the bot, it finds the offer and accepts it (if it's not glitched anymore). I managed to let the bot find out if an offer is glitched. if(offer.isGlitched() == true) { console.log("Offer is glitched!"); } else { console.log("Offer is not glitched!"); }Now ... since I don't fully understand how the bot gets the new offers, I don't know how to manually refresh them. Lets say, I would use the code above right after a new offers is received and "isGlitched()" equals "true", what would I need to have a few seconds delay and then just refresh all offers until the offer is not glitched anymore? if(offer.isGlitched() == true) { console.log("Offer is glitched!"); setTimeout(function(){ //Reload offers! }, 15000); } else { console.log("Offer is not glitched!"); //Some conditions offer.accept();" } What would I need as "Reload offers!"? This might be some easy-to-solve question, but I tried and didn't succeed. Any help is greatly appreciated!
  11. Hi everyone. My bot works fine now but it seems didn't declined wrong offers. Anyone can help me would be very nice. My code: offers.on('newOffer', function (offer) { manager.on("newOffer", function(offer) { var onlyKeys1 = (offer.itemsToReceive.every(function(item) { return item.name == "Mann Co. Supply Crate Key"; })); var onlyRef1 = (offer.itemsToGive.every(function(item) { return item.name == "Refined Metal"; })); var onlyKeys2 = (offer.itemsToGive.every(function(item) { return item.name == "Mann Co. Supply Crate Key"; })); var onlyRef2 = (offer.itemsToReceive.every(function(item) { return item.name == "Refined Metal"; })); if (onlyKeys1, onlyRef1) { keyAmount = offer.itemsToReceive.length refAmount = offer.itemsToGive.length == keyAmount * buyprice if (keyAmount == refAmount) { console.log("They are selling " + keyAmount + " keys for " + buyprice * keyAmount + " refined metal."); console.log("Accepting the trade offer."); offer.accept(function(err) { if (err) console.log(err); else console.log("Trade offer accepted."); }); } } if (onlyKeys2, onlyRef2) { keyAmount = offer.itemsToGive.length refAmount = offer.itemsToReceive.length == keyAmount * sellprice if (keyAmount == refAmount) { console.log("They are buying " + keyAmount + " keys for " + sellprice * keyAmount + " refined metal."); console.log("Accepting the trade offer."); offer.accept(function(err) { if (err) console.log(err); else console.log("Trade offer accepted."); }); } } else console.log("Trade offer not validated. Declining"); offer.decline(function(err) { if (err) console.log(err); }); } }) });
  12. Hi evereone! I'm stuck on this, please, help me out. manager.on('newOffer', function(offer) { ... acceptOffer(offer, userid, function(err, result) { if(err){ //Steam return error } else { //All fine } }); ... }); If Steam return errors like #11 or #16 etc, that means it's unable to accept the offer at the moment, but it's alright after several seconds. This creates a lot of junk records in my database, since i have to write into it to keep track of the errors and re-accept trades.. Can I delete that offer from polldata to call 'newOffer' again or what else can I use to recall newOffer for not acceptable trades?
  13. Hi McKay, idk why my offer was declined everytime i sent a correct offer Here is my code manager.on("newOffer", function(offer) { var metal = 0 var key = 0 var BuyKey = (offer.itemsToReceive.forEach(function(item) { if (item.name == "Mann Co. Supply Crate Key") return key++ })); var FromRef1 = (offer.itemsToGive.forEach(function(item) { if (item.name == "Refined Metal") return metal += 9 if (item.name == "Reclaimed Metal") return metal += 3 if (item.name == "Scrap Metal") return metal++ })); if (BuyKey && FromRef1) { if (metal == key) { offer.accept(function(err) { if (err) console.log(err); else console.log("They are selling " + key + " keys for " + buykeyprice * key + " refined metal."); console.log(colors.red("Accepting the trade offer.")); console.log(colors.green("Trade offer accepted.")); }); }} else { console.log("Trade offer not validated. Declining"); console.log("They offered " + key + " keys and " + metal + " refined metals. ") offer.decline(function(err) { if (err) console.log(err); }); } });
  14. Hi Is there any ways that we can count multiple different items in the trade offer? Thanks for helping
  15. My bot now only accept donation. Anyone know how to script it to make it accept key trades and count items?
  16. Hi. I want to know how to count items in trade offer to make trade offer more useful i've tried this code but it didn't seems working var item_from_me ={ "appid": 440, "contextid": 2, "amount": 1,"assetid": "5148534535", "item.name": "Refined Metal"} var item_from_them ={ "appid": 440, "contextid": 2, "amount": 1,"assetid": "5158673853", "item.name": "Mann Co. Supply Crate Key"}offers.on('newOffer', function (offer) { if (offer > 0) { offers.getOffers({ get_received_offers: 1, active_only: 1, time_historical_cutoff: Math.round(Date.now() / 1000) }, function(error, body) { if(body.response.trade_offers_received) { body.response.trade_offers_received.forEach(function(offer) { if (offer.trade_offer_state == 2) { console.log(offer); console.log('Recieved trade offer: ' + offer.tradeofferid); if (offer.items_to_give === item_from_me * 22 && offer.items_to_recieve === item_from_them) { offers.acceptOffer({tradeOfferId: offer.tradeofferid}); console.log("Offer accepted"); if (offer.steamid_other !== admin) { steam.sendMessage(admin, offer.steamid_other + " just donated!"); } } else { offers.declineOffer({tradeOfferId: offer.tradeofferid}); console.log("Offer declined"); } } }); } }); }
  17. Hello i have a problem with csgo.network v2 bot. after configure, when i start its giving : http://screenshooter.net/102860902/yklnaci http://screenshooter.net/102860902/yodmycw node version 0.12.15 nodejs version 0.12.15 npm version 3.10.7 Can someone help me ?
  18. Hi. How to make it confirm the trade offer like keys or something? Because my bot is currently accepting all offer that only receiving items. New offer #1551249841 from [u:1:342508768]Offer accepted But it didn't confirm the trade. Thanks for helping
  19. I will sit and code. After having logged in and out a couple of times this would happen! CODE: var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); // use require('steam-tradeoffer-manager') in production var market = require('steam-market-pricing'); 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(); // Steam logon options var logOnOptions = { "accountName": "densexsedebjorn", "password": "*****", }; 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); }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); // Checks and accepts confirmations every 30 seconds }); manager.on('newOffer', function(offer) { /////// console.log("New offer is coming in! " + offer.partner ); if(offer.itemsToGive.length == 0 ) { console.log(offer.itemsToReceive.length); console.log(offer.itemsToReceive[0].market_hash_name); market.getItemPrice(730, 'MP9 | Storm (Minimal Wear)', function(err, data) { if(err) { console.log("Price couldn't load" + err); } else { console.log( data.median_price ) } }); } else { offer.cancel(); console.log("Offer got denied " + "ASKED FOR ITEMS!?");} });ERROR: events.js:141 throw er; // Unhandled 'error' event ^ Error: RateLimitExceeded at SteamUser._handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\components\logon.js:320:16) at SteamUser._handleMessage (c:\Node.js\Steam\node_modules\steam-user\components\messages.js:200:29) at emitThree (events.js:97:13) at CMClient.emit (events.js:175:7) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:278:8) at CMClient.handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:386:8) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:260:24) at emitOne (events.js:77:13) at TCPConnection.emit (events.js:169:7) at TCPConnection._readPacket (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\tcp_connection.js:73:7)
  20. Will I get steamcommunity sessionExpired event in tradeoffer-manager when tradeoffer fails if I pass my steamcommunity instance in constructor of tradeoffer-manager?
  21. i have a VPS with more than 1 ip and i want to asing 1 ip per bot (for mobile conf.) to avoid 429 its that posible?
  22. Okay, so I had this program that was working fine. I reload it and boom! ERRORS CODE: var SteamUser = require('steam-user'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); // use require('steam-tradeoffer-manager') in production 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(); // Steam logon options var logOnOptions = { "accountName": "densexsedebjorn", "password": "****", }; 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); }); community.setCookies(cookies); community.startConfirmationChecker(30000, "identitySecret"); // Checks and accepts confirmations every 30 seconds }); manager.on('newOffer', function(offer) { /////// });ERROR: events.js:141 throw er; // Unhandled 'error' event ^ Error: RateLimitExceeded at SteamUser._handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\components\logon.js:320:16) at SteamUser._handleMessage (c:\Node.js\Steam\node_modules\steam-user\components\messages.js:200:29) at emitThree (events.js:97:13) at CMClient.emit (events.js:175:7) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:278:8) at CMClient.handlers.(anonymous function) (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:386:8) at CMClient._netMsgReceived (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\cm_client.js:260:24) at emitOne (events.js:77:13) at TCPConnection.emit (events.js:169:7) at TCPConnection._readPacket (c:\Node.js\Steam\node_modules\steam-user\node_modules\steam-client\lib\tcp_connection.js:73:7)
  23. When I do itemsToGive.market_name_hashname it only takes the first item in the trade. what if I want for all of them? Please give an example.
  24. As the title says, occasionally, the newOffer event will trigger from a real trade. This is undesirable as I need to carry some functions out when a real trade is completed OR when a trade offer is received. This means that the 'functions' will sometimes occur twice. Is this intended or do I just have to work my way around it? Thanks. info: Received new trade offer from adma [U:1:94759074] info: Attempting to accept trade offer 1539324331 info: Accepted trade offer 1539324331 containing 1 keys info: Real time trade offer 1539324331 accepted
×
×
  • Create New...