Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3545
  • Joined

  • Last visited

Everything posted by Dr. McKay

  1. For the love of God, fix your indentation. loadPartnerInventory doesn't have a tradableOnly param, so don't pass one.
  2. The object ID should be your trade offer ID, not the confirmation ID. You shouldn't use the newConfirmation event at all anymore.
  3. Yes, try/catch + isValid is the way you're supposed to validate a SteamID (also check the universe and type if you care about those).
  4. This is incredibly nooby but hey, we all start somewhere, right? Props for wanting to learn and not wanting everything just handed to you. You'd want to create an object and store it in a variable (e.g. let richPresence = {};), then loop over the array and set properties in that object (using bracket notation). So, this: let richPresence = {}; // create a new, empty object (sClient.users[sID].rich_presence || []).forEach((element) => { // Loop over the rich_presence array. If it happens to be missing, substitute it using || for // an empty array so we don't end up crashing by trying to reference forEach on undefined/null. richPresence[element.key] = element.value; }); console.log(richPresence.status); // Playing CS:GO
  5. client.setOption('promptSteamGuardCode', false);
  6. You can't know until you try to login. If settings are left at their default, the module will prompt for the appropriate code from stdin. You can set promptSteamGuardCode to false and listen for the steamGuard event if you want, and that will also tell you what kind of code it needs.
  7. This is normal. Steam turns on Steam Guard automatically after you login via the client a few times.
  8. I don't believe it's currently possible from this module to disable Steam Guard entirely.
  9. steamLogin, steamLoginSecure, (only if logging in via web) steamMachineAuth, sessionid
  10. Unfortunately not. I might have worked on reverse-engineering the Source protocol to join a game server, but to join any useful server you'd have to implement VAC which is just insane enough that I'm not touching it.
  11. It executes once because you only told it to execute once.
  12. Yeah, it only gets printed once because you never told it to do anything beyond that point.
  13. You're doing something wrong in your code.
  14. Those are for talking to the GC (which you can do). You can't join a game server.
  15. You're most certainly doing something wrong, nothing "blocks code from executing".
  16. You would probably want to do something like this: Initialize a variable to 0 to count the user's owned metal Loop over the user's inventory, and add 9 to that variable for every refined, 3 for every reclaimed, and 1 for every scrap If that variable is If it's >=, then loop over their inventory again, starting with refined and add ref until they don't have any more or the amount you need Keep going with rec and eventually scrap If, at the end, you're short a bit, add the smallest currency unit to go above your required price
  17. You probably need to set logonID in the logOn method to some nonzero value.
  18. It's unlikely that chat in node-steamcommunity will be fixed since everything goes through the CM now, and that's what node-steam-user is designed for.
×
×
  • Create New...