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. steamUser.on('tradeOffers', function(c){ manager.getOffers(TradeOfferManager.EOfferFilter.ActiveOnly, function(err, sent, received){ if(err){ console.log(err); return; } received.forEach(function(offer){ console.log(offer.isGlitched()); var money_give = 0; if(!offer.itemsToGive){ offer.decline(); return; } console.log(offer.itemsToGive); offer.itemsToGive.forEach(function(item){ console.log(item.market_hash_name); market.getItemPrice(730, item.market_hash_name, function(err, data){ if(err){ console.log(err); return; } money_give += data.lowest_price; console.log(money_give); },9); }); }); }); }); What is wrong with this snippet? The item object's market_hash_name is returning undefinded. Any reason for why that might be? - https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#market_hash_name
  2. When my bot attempts to accept a trade confirmation I get this weird error confirmations.js:327 var existing = this._confirmationKeys[tag]; ^ TypeError: Cannot read property 'conf' of undefined This is what I believe triggers it community.on('confKeyNeeded', function (tag, callback) { var time = Math.floor(Date.now() / 1000); callback(null, time, SteamTotp.getConfirmationKey(config.identity_secret, time, tag)); });
  3. Can I push item from bot inventory to Steam trade platform?
  4. Hello, I have been working on a trade bot. I set it up so that it will accept any trade from me(admin) or a donation(not giving items). So far it accepts all donations but is having issues accepting trades from me. I have made sure my SteamID in my config is SteamID64. According to the console output, it says the trade should have been accepted although it hasn't. Here's the console output and heres my code. Feel free to add me on steam if you think you can help. http://steamcommunity.com/id/swagattack835/ // Accept any trade offer from the bot administrator, or where we're getting free stuff. if (offer.partner.getSteamID64() === Config.admin || offer.itemsToGive.length === 0) { logger.info("User "+ offer.partner.getSteam3RenderedID() +" offered a valid trade. Trying to accept offer."); offer.accept(function (err) { if (err) { logger.error("Unable to accept offer "+ offer.id +": " + err.message); } else { logger.info("Offer accepted"); } }); Thanks, African
  5. Hello! Today I'm getting this error while accepting offers (incoming ones or the ones I create): Offer #XXXXXXXXX is not active, so it may not be accepted. Then, the only way I have to confirm the trade is using the mobile App and then stop the bot few hours to avoid this problem... but it persists. Waht does it mean is "not active"? How can I avoid it? Thanks for reading me!
  6. Hey, I'm having trouble adding a certain amount of gems or gem sacks to a trade atm. I've managed to get the correct market_hash_name and inventory and can add gems/gem sacks to a trade, but it will add the entire stack of gems or sacks that is present in the inventory. manager.getUserInventoryContents(SENDER.getSteamID64(), 753, 6, true, (ERR, INV, CURR) => { } Any way to pass a parameter so that it will only add in 'x' number of gems/gem sacks. (gems/gem sacks are stackable items, not separate)
  7. Can someone please send me a coding to a fully functional trade bot?
  8. Hello. Can you help me please? I have a problem with checking tradeoffer state This is what i use var tid = req.query['tid']; offers.getOffer({ tradeofferid: tid }, function(err, trade) { if(err) { logger.error('Error checking trade'); logger.debug(err); res.json({ success: false, error: err.toString() }); } else { if(trade.response.offer.trade_offer_state == 3) { res.json({ success: true, action: 'accept', result: 'Success' }); } else if(trade.response.offer.trade_offer_state == 7) { res.json({ success: true, result: 'Declined', action: 'cross' }); } else { res.json({ success: false, error: 'Not Accepted Yet' }); } } }); And it always gives me error: TypeError: Cannot read property 'trade_offer_state' of undefined but it is defined in your documentation. Thanks.
  9. Hi guys! How to send offer my friends, if i dont know partner trade url? var offer = manager.createOffer('[U:1:46143802]'); SteamID3 not working.
  10. I'm currently having competition in a little niche, and its all about beeing faster. For that reason I want to accept a tradeoffer asap after getting it. Here is my question: Is there anything that I can do to make manager.on('newOffer', function (offer) { //Just a function that has some logic, does pretty much just accept the offer as long as itemstogive.length ==0 accept(offer); }); faster? Or is this the fastest already. And how much delay is there between getting the offer, and this block of code realizing that a new offer came in? I can also post my full code if needed.
  11. Hello, once again, I am in the need of help. I have been trying for the last day or so to find a way to set a expire time for a single tradeoffer, as my bot will handle different offers, and some need to expire sooner than others. What would be the correct way of doing so? I have tried to modify the expire date without success.
  12. Hi, After I use getInventoryContents I get an array of inventory objects. I want to be able to define a variable to determine how much items i send. For example: var amount = 5; offer.addMyItems(inventory[0 - 4]); var amount = 3; offer.addMyItems(inventory[0 - 2]);
  13. When call getInventoryContents(730, 2, true, function (err, myInv, currencies){ }); I received Error: Failure . Thanks !
  14. I tried to init TradeOfferManager with option {language: "cn"} and "ch", but getInventoryContents function still remain english name and describe. How can i get chinease content?
  15. Hello, When I send offer i get error: "callback is not a function" in steam-tradeoffer-manager/lib/helpers.js in 45 line. That is my code: function sendOffer(customer, bot, customerItems, botItems) { var botInventory = manager.getUserInventoryContents(customer, 753, 6, true, function(err, inventory, currencies) { return inventory; }); var customerInventory = manager.getUserInventoryContents(bot, 753, 6, true, function(err, inventory, currencies) { return inventory; }); var Exchange = manager.createOffer(customer); var message = "Thank You for trading with me. Here's your cards. This offer expires in 10 minutes."; var ExchangeBot = GetExchangeItems(botInventory, botItems); var ExchangeUser = GetExchangeItems(customerInventory, customerItems); Exchange.addTheirItems(ExchangeUser); Exchange.addMyItems(ExchangeBot); Exchange.send(message, 'Dh58A2w', function(err, status) { console.log('Exchange ID:' + Exchange.id + ' send: ', status); }); } And I have second question. How to send offers to friends without token?
  16. Hello! I'm still on my challenge to avoid SteamApp (My Android device is quite bad, I know). Well. I'm trying to make a system for accept or decline manually incoming offers. I made the following code: manager.getOffers(1,function(err, sent, recived){ if (err) { console.log(err); } else { for (var i = 0; i < recived.length; i++) { if(recived[i].id == trade_I_want_to_decline){ recived[i].cancel(function(err) { if (err) { console.log(err.message); } else { console.log("Horray! trade declined!") } }); } } } }); //... Other unrelated code //... More unrelated code manager.getOffers(1,function(err, sent, recived){ if (err) { console.log(err); } else { for (var i = 0; i < recived.length; i++) { if(recived[i].id == trade_I_want_to_accept){ recived[i].accept(function(err) { if (err) { console.log(err.message); } else { console.log("Horray! Trade accepted!") } }); } } } }); Well. These are separated functions. As you can see, they are basically the same except the main function: Accept and Decline. Decline works like a charm. But accept... doesnt work well. In fact, it returns the "Horray! Trade accepted!" message, but it doesn't really accept the trade. Whay I'm missing? Did I need something more to make it work? Thanks for reading me and have a nice day!
  17. Hey, I see that there are already topics discussing this particular error, but most of them aren't including code examples. Tried to fix it myself, but it doesn't seem to work. So when accepting an offer, I sometimes get this error: Error: Not Logged In at SteamCommunity._checkCommunityError (/home/pi/Desktop/bot_final/node_modules/steamcommunity/components/http.js:128:9) at Request._callback (/home/pi/Desktop/bot_final/node_modules/steamcommunity/components/http.js:51:88) at Request.self.callback (/home/pi/Desktop/bot_final/node_modules/steamcommunity/node_modules/request/request.js:186:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request.<anonymous> (/home/pi/Desktop/bot_final/node_modules/steamcommunity/node_modules/request/request.js:1081:10) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Gunzip.<anonymous> (/home/pi/Desktop/bot_final/node_modules/steamcommunity/node_modules/request/request.js:1001:12) at Gunzip.g (events.js:291:16)So to log in, I am using this: var config = require('./config.js'); var SteamCommunity = require('steamcommunity'); var SteamTotp = require('steam-totp'); var SteamUser = require('steam-user'); var TradeOfferManager = require('steam-tradeoffer-manager'); var community = new SteamCommunity(); var client = new SteamUser(); var manager = new TradeOfferManager({ steam: client, domain: 'example.com', language: 'en' }); client.logOn({ accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.sharedsecret) }); client.on('loggedOn', function(details) { console.log("Bot logged in"); client.setPersona(SteamUser.Steam.EPersonaState.Online,config.botname); }); client.on('webSession', function(sessionID, cookies) { manager.setCookies(cookies, function(err) { if (err) return console.log(err); console.log(" > Got API key!"); }); community.setCookies(cookies); community.startConfirmationChecker(10000, config.identitysecret); })And to keep the bot from coming up with the "Not logged in error", I added this (which obviously doesnt work). var lastLoginAttempt = Date.now(); client.on("sessionExpired", function(err) { if(Date.now() - lastLoginAttempt > 30000) { lastLoginAttempt = Date.now(); console.log(" > Session Expired, relogging."); client.webLogOn(); } else { console.log(" Session Expired, waiting a while before attempting to relogin."); } });I was told to add a "timer" so it doesn't spam the login when the websession expires. Any idea why it doesn't work? Is client.webLogOn() the right way to log in again? Any help is appreciated!
  18. Is there any simple way to detect, that user that I want to trade with has tradeban or just cant get trades by any other reasin?
  19. Can I set an item name instead of an assetID? If yes, how?
  20. Hello! I'm still on my challenge to avoid the SteamApp. I can send offers and check the incoming ones (retrieve all data, also, check the user profile). Now I have the interface done. But... is there a way to accept an offer by his own trade id? I looked into the wiki, but I didnt find a way to accept it by ID... only when I already have an "offer" object. Thnanks for reading me and happoy gaming!
  21. Function: manager.getUserInventoryContents(Trade.partner, 720, 2, true, (x, y, z) => {}); Error: k_EResultNoMatch Weird error, did exactly the same as I usually do and it does not seem to work.
  22. So I've been making my bot and I came up with that I need to check item description for item within trade offer, I found this https://github.com/DoctorMcKay/node-steamcommunity/wiki/CEconItem#descriptions but item.descriptions & item.description doesn't seem to work. This is my part of the code: offer.itemsToReceive.forEach(function(item) { (this is the 388th line) if (item.appid == "my app ID" && item.type.match("My match")) { if(item.descriptions.match("my description match")){ return } This is the output: .js:388 if(item.descriptions.match("my description match we were talking about")){ ^ TypeError: item.descriptions.match is not a function
  23. Hello, I'd like to know if it is possible to somehow get every item's assetID(and maybe market hash name) by calling getInventoryContents. And if so, how? Thanks in advance!
  24. Hello everybody! I'm tormented by the question .. How do I restart the session? (Outputs "Error: Not Logged In")
  25. Hello again! On my challenge to avoid SteamApp now I'm trying to implement my own way to send and receive offers. Send offers now works fine now, but now I'm developing the incoming ones. I see the event "newOffer", which returns an object, "offer". Offers contains some interesting data, like trade's id, it's state, if scrow is enable.... but I have some questions 1- I see an "account id" field. I guess it's a steam3id. Is there a way to return a classic id for check the user profile? 2- I see a state field. Is an integer. Which are the possible status? 3- What is the difference between "id" and "tradeID"? I see id has the trade ID, but I don't know why tradeID is null... 4- How can I accept an offer by it's ID? 5- How can I check all incoming offers? Thanks for reading me and have a nice gaming! :D
×
×
  • Create New...