Jump to content
McKay Development

mouzes1

Member
  • Posts

    15
  • Joined

  • Last visited

Posts posted by mouzes1

  1. When I try to use newest version of steam-user I got this error:

    /node_modules/steam-client/node_modules/mckay-steam-resources/steam_language_parser/index.js:8
    process.chdir(languagePath);
            ^

    Error: ENOENT: no such file or directory, uv_chdir
        at Error (native)
        at Object.<anonymous> (/node_modules/steam-client/node_modules/mckay-steam-resources/steam_language_parser/index.js:8:9)
        at Module._compile (module.js:410:26)
        at Object.Module._extensions..js (module.js:417:10)
        at Module.load (module.js:344:32)
        at Function.Module._load (module.js:301:12)
        at Module.require (module.js:354:17)
        at require (internal/module.js:12:17)
        at Object.<anonymous> /nodejs/node_modules/steam-client/node_modules/mckay-steam-resources/index.js:83:1)
        at Module._compile (module.js:410:26)
     

  2. Here is the case

    1. First trade offer I am sending from bot to user item 'CS:GO Case Key' but he does not accepting it yet

    2. Second trade was requested and bot sending to user2 item 'CS:GO Case Key' but it is in trade offer 1 two.

     

    3. And when some of the users accept trade offer one of offers is in "InvalidItems" state.

    How can I prevent this? Is there a property in CEconItem which tell us that item is in trade already?

    Something like this (dummy code):
     

    
    offers[roundBot].loadInventory(730, 2, true, function (err, myItems) {
    
            for (var i = 0; i < myItems.lenght; i++) {
                if (myItems[i].isAvailable == 1) {
                    itemsToSendArray.push(myItems[i]);
                }
            }
    }
    
  3. When bot have new offer request I want to know some details for partner.

    I got offer object but there I can only get offer.partner which is SteamID object

    I want to check if he is in my friend list and to check if his steam guard is activate (getSteamGuardDetails). And if not to reject offer.

    How can I do that?

    Thanks

  4. sentOfferChanged listener don't trigger on mobile confirmation state.

    Scenario:
     - Send trade offer from bot (offer is with status Active)
     - Log in to steam as User and Accept offer -> receive message "You have to confirm in mobile app" -> offer state should be OfferNeedMobileConfirmation but sentOfferChanged don't do anything.

    With receivedOfferChanged everything works just fine the problem is only with sentOfferChanged.

  5. I am wondering how to get offer in later stage. Is there some call that I can make to retrieve offer based on offerId or something else? For example I want to Cancel specific offer at some point in time.
    What i do now is to add all offers in array and get offer from array based on key(offerId) but when i restart my node.js i loose all offers in that array. 
    Also is there something like Resend offer?

    Thanks. 

  6. From time to time (I think when more time has elapsed) webLogOn won't work properly, i have to wait for about 3-4 minutes (with message HTTP error 401) to send trade offer.

    Example debug output:

    ..................................................

    info: Offer type receive----Error: HTTP error 401
    info: Resend because of error ----Error: HTTP error 401
    info: Offer type receive----Error: HTTP error 401
    info: Resend because of error ----Error: HTTP error 401
    info: Offer type receive----Error: HTTP error 401
    info: Resend because of error ----Error: HTTP error 401
    info: Offer type receive----Error: HTTP error 401
    info: Resend because of error ----Error: HTTP error 401
    info: Logged into Steam as xxxxx
    debug: Got web session
    debug: Trade offer cookies set.  Got API Key: xxxxxx
     
    My send offer function:
     
    function sendOffer(offer, tradeToken, offerType, socketClient, bot, gameId) {
     
        offer.send('', tradeToken, function (err) {
            if (err) {
     
                bot.webLogOn(function (sessionID, newCookie) {
                    getSteamAPIKey({
                        sessionID: sessionID,
                        webCookie: newCookie
                    }, function (err, APIKey) {
                        offers.setup({
                            sessionID: sessionID,
                            webCookie: newCookie,
                            APIKey: APIKey
                        });
                    });
                });
                logger.info('Offer type ' + offerType + '----' + err);
     
                if (err == 'Error: HTTP error 401' || err == 'Error: HTTP error 503') {
                    logger.info('Resend because of error ----' + err);
     
                    sendOffer(offer, tradeToken, offerType, socketClient, bot, gameId);
                } else {
                    if (offerType == 'receive') {
                        console.log('receive' + err);
                        socketClient.emit('send-offer-error', err);
                    }
                }
     
            } else {
                .......
        });
    }
  7. I am wondering what is the bast way to manage multiple bots. Currently I am creating multiple instances for example: 

     

    var client1= new SteamUser();
    // Sign into Steam
    client1.logOn({
        accountName: config.client1.username,
        password: config.client1.password,
        twoFactorCode: SteamTotp.generateAuthCode(config.client1.secret)
    });
     
    var client2= new SteamUser();
    // Sign into Steam
    client2.logOn({
        accountName: config.client2.username,
        password: config.client2.password,
        twoFactorCode: SteamTotp.generateAuthCode(config.client1.secret)
    });
     
    Is this the best way to do that? 
     
    Also do i need apy key for each bot? To retrieve the api key from steam i have to make purchase for 5$, but if I have 100 bots, have to pay 500$. 
    Steam -> "You will be granted access to Steam Web API keys when you have games in your Steam account."
     
     
    If i try to login and add cookies i have this error: 'error: Unable to set trade offer cookies: Error: Access Denied'
     
     

     

×
×
  • Create New...