Jump to content
McKay Development

Axle

Member
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Axle

  1. function loadinventory(AppID, ContextID) {
        manager.getInventoryContents(AppID, ContextID, true, function(err, inv, curr) { //You were using deprecated method
         if(err) {
                console.log("Error while loading inventory."); //Gotta use proper grammar.
                setTimeout(function(){
                    loadInventory(AppID, ContextID);
                }, 1000*60); //Set timeout (as Führer McKay pointed out);
                return;
         }
         //code
        });
    }
    
    loadinventory(AppID, ContextID);
    

     

    I would recommend giving up after X amount of tries, because at some point it is just the steam API and you need to reset/relog. In the case of escrow days this happens to me fairly regularly.

  2. I'm getting this error:

     

     

    Logged into Steam

    Error: EYldRefreshAppIfNecessary failed with EResult 55

        at /node_modules/steamcommunity/components/users.js:398:12

        at SteamCommunity._checkHttpError (node_modules/steamcommunity/components/http.js:110:3)

        at Request._callback (/node_modules/steamcommunity/components/http.js:50:61)

        at Request.self.callback (/node_modules/request/request.js:186:22)

        at emitTwo (events.js:106:13)

        at Request.emit (events.js:191:7)

        at Request.<anonymous> (/node_modules/request/request.js:1163:10)

        at emitOne (events.js:96:13)

        at Request.emit (events.js:188:7)

        at IncomingMessage.<anonymous> (/node_modules/request/request.js:1085:12)

     

    With the code (after login, etc.):

     

     

    client.on('webSession', function(sessionID, cookies) {

        community.getUserInventoryContents("76561198435553802", 440, 2, true, function(err,inventory){
            console.log(err);
            console.log(inventory);
            //does other stuff after I ommitted
            });
        });

     

    The weird part is that it works if I request any inventory besides the two bots I own. I'm thinking this might be a too many requests error? But it also doesn't work if I login to an alt/my main account and try to request the same inventory from a different account.

     

    Edit: I've also now gotten eresult 20. Looking at the corresponding errors these are "ServiceUnavailable" and "RemoteCallFailed", so it seems to be a steam error. Will see if this continues in a few hours.

     

    Edit 2: I actually can't even see their inventories in steam now, definitely a steam issue.

  3. Memory leak. You probably fucked up an infinite/recursive call stack somewhere that keeps adding, NodeJS itself has a call stack size limit. I can't remember the number off the top of my head but it is kinda low, you can manually raise it somehow if you need to. My own script barely takes ~80MB of RAM and it is mainly because I don't run it as a daemon, its the only thing I have running on a dedicated machine so I choose not to.

  4. I was thinking about bash script, but I can't get a json array length the simple way. I was thinking about making .js file and spawning child processes?

     

    Theres not too much reason for needing the actual array length in the script, you can just set it to for loop the amount of bots you would need to start. Obviously you would have to edit this to account for adding bots, but if you need to restart your scripts constantly I wouldn't recommend daemons in the first place. I was thnking of using it  as a one time spawning script

  5. And how would you run these instances? I need to check length of an array in .json file (bots' credentials) and then launch many bot.js with given id (node bot 0, node bot 1...node bot 90 etc.). I'm using PM2

    I don't like running my bot daemonized so I just use screen but if you're running that many you will probably have to.

     

    There are several ways to do what you want, depending on how reusable/updatable you want it to be. The easiest would probably just to add a command line argument with the bot ID to your script. Then you can just edit one script to update all the bots, but they're not inherently reliant on each other. Of course you have to play with where everything is saving (poll data, etc.). To start all of the bots I would recommend just making a simple bash script, just use a for loop and change the id in the command line argument.

  6. I would go with the first one. It's not quite as simple as making a bot class because you have to make sure that every steamcommunity function acted on each bot in parallel, which would obviously be difficult to do with that amount of bots (you might be able to create separate steamcommunity instances though I'm not very familiar with this).

     

    Also if you're running that many bots you will need to use proxies to avoid rate limits otherwise you will get screwed fast.

  7. Because you want to get their data you should do client.getPersonas([sENDER]), client.steamID is your own steamID. The other thing is that  personas  is an object, not just their names because it getPersonas can handle multiple steamIDs. I don't remember how the object is exactly setup.

     

    This should help in more detail:

    https://dev.doctormckay.com/topic/660-how-to-go-from-steam64-to-steam-username-the-name-currently-used-on-steam/ 

  8. For a project of mine, it is very useful to be able to load the app_data of items in inventories to characterize the items. Because it is not particularly important right now, I have been relying on the deprecated loadInventory method to get the data. One of my ideas was to just send dummy tradeoffers to an alt and read it as a tradeoffer, but this seems excessive. Do you have any suggestions for getting the app_data of inventories?

  9.  

    I have this code : https://gist.github.com/EliteOneTube/6a8d1c27d1b137c9843b3779b1c1dafe and i would like to ask if it is possible to make it so when someone sends me a message like !au1 my bot sends them an offer with the specific item.
     
    My bot can accept offers that matches it's prices but I would want my bot to send the offers.

     

    https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#createofferpartner-token 

     

    manager.createOffer(partner, token) is what you are looking for.

     

    Edit: Also looking at your code there is no reason to add that many listeners. You can just cascade else ifs in a single listner and it will probably be much faster.

  10. Is there any way to get actions for items when receiving a trade? Offer.itemsToReceive and offer.itemsToGive seem to be missing the actions of items by default. For example, after accepting an offer when we do getReceivedItems() it has the getActions option.

     

    Loading inventories and finding the correct ids works, but I was hoping there might be a better way to do this.

  11. I got some info and how to get the shared_secret (https://github.com/DoctorMcKay/node-steam-user#enabletwofactorcallback). But this a node library , I am developing it into php. I also got the php library  to generate 2FA code using https://github.com/DoctorMcKay/php-steam-totp (thanks to your reply). The only thing is , how do i get this shared_secret key in php and is this only for one time, I mean first time generated shared_secret will work for long time?? or this would also expire some day ???

     

    In your desktop application >> manifiest.json file contain a json parameter called " encryption_iv " is this a shared_secret key ???

     

    Sorry for this much questions but i am newbiee to this.  :unsure:

    Shared_secret never changes unless you reset the mobile device for steam as far as I can tell. I've had the same identity_secret and shared_secret since I extracted them from when it was introduced. I don't use the Desktop authenticator, but apparently this is how you extract them: https://github.com/Jessecar96/SteamDesktopAuthenticator/issues/141 

     

    Shared_secret is the seed on your account used for generating login codes. Identity_secret is used for handling confirmations (when you send or a receive a tradeoffer that includes any of your items and you want to accept/send, you normally need to confirm on your mobile).

  12. I can relog to get new cookies and session id but only manually I have to get the code from mobile device and input it into my bot.

     

    That can't happen , i want it automated , I can't place a person who manually login into bot after every 2 days, I have developed a CSGO skins selling and buying website, but now stucked into the expiration of cookies :-|

    If you know the shared_secret you can automatically generate it using mcKay's steam-totp library. I would assume you already have this because you need identity_secret to accept confirmations automatically for trade offers.

×
×
  • Create New...