Jump to content
McKay Development

Lesu

Member
  • Posts

    11
  • Joined

  • Last visited

  1. Could I perhaps ask how would you do it? How could I relate an item to their sender, if not by relating them to the item's IDs? Or...could I ever? Is comparing each and every single one of the item's properties the only way? That'd sadly be quite unefficient...
  2. Considering then that I cannot eternally bind an assetid from a bot to a person as for different reasons it may as well change before it is traded back to someone else, do you think it would be good practice to instead bind the classid and instanceid, as the combination, as I understood here --> https://dev.doctormckay.com/topic/332-identifying-steam-items/ <-- , seems to be unique for as long as the item's properties go? Are sticker and item wear *percentage* from CS:GO also considered in the uniqueness of these IDs?
  3. When you think you know how to fully scroll down a page, and this happens... thanks! EDIT: Sorry, one last thing, does it work if a trade is cancelled? Apparently assetids can change when items are involved in trades even if they aren't completed, is there a way to get the ID of an item that just changed it because it felt like it during a broken trade?
  4. When accepting a trade, items change assetids. Comparing ItemsToReceive coming from a sentOfferChanged event with the actual items after they change inventories gives different results. Is there any way to find out a post-trade item's ID? Perhaps a way to detect incoming items and their sender / pertaining offer's id? Many thanks in advance.
  5. Callbacks should have an "err" parameter when they may return errors. "TradeOffer.send" does indeed let you catch errors, if that's the function you're talking about, by doing something like: offer.send(function(err) { console.log(err); });
  6. Greetings, Is there any way to fetch contextIDs from Spiral Knight user inventories? I'd give more information, but there's really nothing more to it. If it could be possible, I'd like to load user inventories from Spiral Knights in order to implement trades for it, however this specific game's contextids are quite dynamic and I'd need to know them for to load inventories, or some range to test from, whatever way would make this possible. Many thanks for your attention.
  7. Oh my, I thought that writing the callback parameters with the correct names would give them their corresponding values, seems I done goofed, many thanks. I also needed to fix loadUserInventory by adding the contextid to the parameters and fixing the callback in the same way for the original error to not throw, in case somebody checked this post in the future (probs not tho).
  8. var bot = new SteamCommunity(); var offers = new TradeOfferManager({ steam: bot, domain: config.domain, language: "en", pollInterval: 10000, cancelTime: 300000 }); SteamTotp.getAuthCode(my_shared_secret, function(err, code) { if (err) logger.debug(err.message); logger.debug(code); bot.login({ "accountName": config.username, "password": config.password, "twoFactorCode": code }, function(err, cookies) { if (err) logger.debug(err.message); logger.debug(cookies); logger.debug("Login successful as: " + bot.steamID.getSteam3RenderedID()); offers.setCookies(cookies, function(err) { // This is where it fails, doesn't even run the callback if (err) logger.debug(err.message); logger.debug("Cookies set successfully, proceeding to extracting inventory..."); offers.loadUserInventory(certain_steamid64, 570, true, function(inventory) { logger.debug(inventory);}); }); }); });
  9. Aha, since it seemed like some kind of internal error I didn't think it could've been the root of the problem, many thanks. However, if I try to set cookies with setCookies, this happens: /var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/index.js:214 cookies.forEach(function(cookie) { ^ TypeError: cookies.forEach is not a function at SteamCommunity.setCookies (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/index.js:214:10) at TradeOfferManager.options._steam.on._steam.on.TradeOfferManager.setCookies.checkDone [as setCookies] (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steam-tradeoffer-manager/lib/index.js:78:18) at /var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/app.js:125:10 at SteamCommunity.<anonymous> (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/index.js:162:5) at Request._callback (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/node_modules/request/request.js:187:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (/var/lib/openshift/579916d07628e13b0f000010/app-root/runtime/repo/node_modules/steamcommunity/node_modules/request/request.js:1044:10) at emitOne (events.js:77:13) I can output the cookies passed out of the login's callback, which are represented by an alphanumeric string, but inputting them into setCookies somehow fails with this. I must be doing something very stupid again but I couldn't guess it, any help with that as well? Sorry for the inconvenience. (I switched into steamcommunity again instead of steam-user, however it still logs in so I don't think I could've screwed that part up, methinks)
  10. Helloes people and Dr. McKay, Calling loadUserInventory with an instance of TradeOfferManager throws this error (running on a nodejs vs 4 cartridge at openshift): This error appears when I both instantiate tradeoffer-manager and login with another instance of steam-user, although the same error is shown when I use steamcommunity (although I guess slightly different so that the references to SteamUser are references to SteamCommunity?)...wait what? Here is the related code; var SteamUser = require('steam-user'); var SteamTotp = require('steam-totp'); var TradeOfferManager = require('steam-tradeoffer-manager'); var SU = new SteamUser(); var offers = new TradeOfferManager({ steam: SU, domain: config.domain, language: "en", pollInterval: 10000, cancelTime: 300000 }); SteamTotp.getAuthCode(my_shared_secret, function(err, code) { if (err) logger.debug(err.message); logger.debug(code); SU.logOn({ "accountName": config.username, "password": config.password, "twoFactorCode": code }); }); SU.on('loggedOn', function (details) { logger.debug("Login successful as: " + SU.steamID.getSteam3RenderedID()); offers.loadUserInventory(my_steamID64, 570, true, function(inventory) { logger.debug(inventory);}); }); (again, same happens if I use node-steamcommunity and try to call loadUserInventory from it's own login function's callback.) I have been able to enable two-factor authentication and login with steam-totp ever since, so I've no idea where the problem could lie anymore. Any ideas? Many thanks regardless.
×
×
  • Create New...