Jump to content
McKay Development

Dr. McKay

Administrator
  • Content Count

    2231
  • Joined

  • Last visited


Reputation Activity

  1. Like
    Dr. McKay got a reaction from vrtgn in Differentiate between unusual (with effect) and unique items!   
    You need to check the descriptions array of the item in question and look for the unusual effect tag (after making sure it's a TF2 item, of course). And you can check the color to see if the item is of Unusual quality.
  2. Like
    Dr. McKay reacted to Barak in [HELP] Error: Must be logged in before trying to do anything with confirmations   
    Fixed it, apparently I've been initializing a new SteamCommunity object in my main file. Thanks anyway, explaining this to someone really cleared my mind up
     
    Cheers!
  3. Like
    Dr. McKay reacted to vrtgn in Creating Specific offer from chat command   
    Working out change is similar to the popular coin change problem, except you don't have infinite amount of each coin. 
     
    Here's how I would do it:
    Convert the price to scrap. Then using the coin change problem work out the least amount of scrap needed. In this case your coins would be 1, 3, 9, and key price in scrap being scrap, rec, ref and key price in scrap respectively. 
     
    Look up the coin change problem and develop a function to work out the change. It's hard but also good to develop your coding skills. I wouldn't recommend to steal someone else's code since you don't know what it's doing and at the end of the day if your bot gets scammed it is your fault for not knowing how your code works. 
  4. Like
    Dr. McKay got a reaction from Derp. in Switching Users?   
    Firstly, look into using acceptConfirmationForObject in place of the confirmation checker.
    Secondly, you have a potential bug in using the disconnected event to log into a new account. The disconnected event can also be emitted if the connection to Steam drops temporarily but will be automatically re-established. You should probably set a flag when you call logOff() so you know if the disconnected event was in response to that.
    Finally, to your main question, you should call manager.shutdown() when you log out of an account before logging into a new one. That should solve your problems.
  5. Like
    Dr. McKay got a reaction from PonyExpress in Some small questions   
    getUserDetails cannot be called unless an offer is active, so you need to use it before you send a counter offer.
    Using the counter() method will return a new, unsent trade offer object which, when sent, will be sent as a counter offer. Each offer can only be countered once, so if you try to send two counter offers (either by calling counter() twice or by calling duplicate() on a counter offer), it won't work.
    In essence, the ID of a trade offer sent to you can be used in place of a trade offer access token (sort of, not literally) in order to send a trade offer, but only once. Once you send one counter offer, the original offer goes into "Countered" state and it can't be countered again.
  6. Like
    Dr. McKay reacted to vrtgn in How can I fetch public Steam info of Steam profiles by their Steam id without the users being logged in?   
    That's almost impossible, unless you have a very unique name. 
    The reason it wouldn't work is because anyone can have the same username as anyone else. 
    Unless you're talking about the login username. I don't think you can, because that's hidden from everyone apart from the owner of the account itself. 
  7. Like
    Dr. McKay reacted to Raminos in logOn catch error event.   
    Tnks a lot doc!, very appreciated for the patience answering,
    Have a great week!
    Rami~
  8. Like
    Dr. McKay reacted to vrtgn in editProfile removing background   
    Maintaining many npm packages is hard. If you want it to be solved, try making your own solution.
  9. Thanks
    Dr. McKay got a reaction from Raminos in logOn catch error event.   
    To handle errors:
    client.on('error', function(err) { // do something with err (which will never be null or undefined in this event) }); You aren't going to be able to do anything with limited inside of the loggedOn event. The data isn't going to be available yet. loggedOn gets emitted when Steam sends us back the logon response saying that your logon was successful, but Steam doesn't send us our account limitations for another second or so, which is why the data is undefined/null inside of the loggedOn event.
  10. Thanks
    Dr. McKay got a reaction from Midmines in Build script auto Redeem SWC   
    Sure, you could use steamstore for this.
  11. Like
    Dr. McKay reacted to Raminos in Problem with WebSession   
    Tnks for the reply!
    I only use the api for the bot, the only other place in where i have put it, is in https://steamapi.xpaw.me/  to get the automatic reference, but i don't think that that can make any other particular load or use it more than to generate the automatic reference.
    Tnks again!, i'll exit SDA, change the ip, and if there is no diference, i'll let it rest 2-3 days, change ip again and check what happens.
    Have a great week!
    Rami.
  12. Thanks
    Dr. McKay got a reaction from Raminos in Problem with WebSession   
    I don't really know how SDA works as I've never used it, but you might try exiting it for a day or two and see if that helps.
    Have you tried using a different IP address? It seems to me like sometimes Steam just flags a particular account or API key on a particular IP. You might try using a different IP, or check where you might be using that API key besides just in the bot.
    The code you posted here looks fine, though.
  13. Like
    Dr. McKay got a reaction from PonyExpress in editProfile removing background   
    This is a known issue. I haven't gotten around to adding proper support for showcases yet.
  14. Like
    Dr. McKay got a reaction from HolidayExplanation in How can I fetch public Steam info of Steam profiles by their Steam id without the users being logged in?   
    I don't think you can request profile data for arbitrary users without you being friends with them (or being in the same group chat) via steam-user.
  15. Like
    Dr. McKay got a reaction from David - your friend in BREAKING CHANGES: steam-user v4 now available on npm   
    I'm pinning this thread again because of numerous recent questions about changes made in v4.
  16. Like
    Dr. McKay got a reaction from David - your friend in BREAKING CHANGES: steam-user v4 now available on npm   
    The older events are deprecated, but they will keep working until at least v5. Though I recommend switching to the new events.
  17. Like
    Dr. McKay got a reaction from David - your friend in BREAKING CHANGES: steam-user v4 now available on npm   
    Do you think you could possibly add: client.on('debug', log); This will help to narrow down what's going on if it happens again.
    You don't need to login through SteamCommunity if your session expires. Just call client.webLogOn() in that case.
  18. Like
    Dr. McKay got a reaction from HolidayExplanation in loginKey throw error invalidPassword   
    The answer to both your questions is "who knows, it's Valve".
  19. Like
    Dr. McKay got a reaction from HolidayExplanation in Receive friend requests/Adding friends   
    The names are the player_name property in each object in the array provided in the callback.
  20. Like
    Dr. McKay got a reaction from HolidayExplanation in Is there any way to get the name of the game, instead of appid?   
    Rocket League is 252950, not 252590.
  21. Like
    Dr. McKay got a reaction from fawcghost in Translate new /user/ links   
    It's now possible to generate a link to allow someone to add you as a friend without you needing to accept a request. These links look like
    http://s.team/p/user-id/token which redirects to https://steamcommunity.com/user/user-id/token You can also access a profile using https://steamcommunity.com/user/user-id which will just redirect you to /id/ or /profiles/, depending on whether the profile has a custom URL set. These user IDs look like aaa-aaaa. I don't know why it might be useful to convert a SteamID to friend-link user-id, but converting the user-id to a SteamID might be useful. The friend-link user-ids are just the account's accountid (the lower 32 bits in the 64-bit SteamID, or the x part in [u:1:xxxx]), encoded in hexadecimal, with some character replacements, and with a dash added. Here are the replacements: Hex = Letter ------------ 0 = b 1 = c 2 = d 3 = f 4 = g 5 = h 6 = j 7 = k 8 = m 9 = n a = p b = q c = r d = t e = v f = w To convert a SteamID to a user-id, encode the accountid in hex and perform string replacements for the above characters. The hyphen isn't necessary for a final URL to work.To convert a user-id to a SteamID, remove the dash and perform string replacements for the above characters. That gives you an accountid which you can turn into a SteamID using a platform-appropriate SteamID library.
  22. Like
    Dr. McKay got a reaction from Kappa in Error: cannot send an empty trade offer.   
    You need to research how asynchronous code works in JavaScript.
  23. Like
    Dr. McKay reacted to fury313 in Steam Chat   
    Yea sure

    I had to use client.chatMessage i was using something else with which it was just sending plain text
  24. Like
    Dr. McKay reacted to SnaBe in Chat command create and send trade offer... Can someone help ?   
    Alright, there's primarily to parts of creating a systen like this. 
     
    1. Handling chat commands / buy & sell requests from Steam chat.
    2. Searching inventories for the required items and creating the trade offer.
     
    Luckily for you, other users have had similar questions regarding this topic. 
     
    Here's an entry regarding chat commands.
     
    Here's an entry regarding looping trough the inventory and looking for item matches. 
     
    I hope this helps!
  25. Like
    Dr. McKay got a reaction from Dijonigamer in Cannot read property '[object Object]' of null   
    Sorry, I could have been a little clearer. Not event callbacks, those are (mostly) unchanged. Callbacks to functions like getPersonas is what I'm talking about.
     
    All the changes in v4 can be found here.
×
×
  • Create New...