Jump to content
McKay Development

darkwar123

Member
  • Posts

    26
  • Joined

  • Last visited

Posts posted by darkwar123

  1. Тебе Ñтим блокирует доÑтуп к получению API KEY Ð´Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¾Ð±Ð»ÐµÐ¼Ð° уже обÑуждалаÑÑŒ и Ñ Ð¿Ð¸Ñал решение ищи по форуму ApiKey error 429 (sorry for Russian language)

  2. Yes. It has the IP rate-limit I mentioned above.

    Hm, I have the site 200 users online and I call loadUserInventory more than 2 inventories per minute (I think it is about 10 per second sometimes). But steam doesn't show error 429, I don't use proxies, using only multibots

  3. Apikey :) Sound weard, but that's it.

     

    If you know your apiKey you can insert it manually, it works:

    self.manager.setCookies(cookies, function(err) {
                    if(err) {
                        if(err.message.indexOf('429') != -1){
                            self.manager.apiKey = "***";
                            self.manager.doPoll();
                        }else{
                            self.relogin(err, callback);
                            return;
                        }
                    }
                    self.apiKey = self.manager.apiKey;
                    self.steam.chatLogon();
                    self.online = true;
                    if (typeof(callback) === 'function') {
                        callback();
                    }
                });
    
  4. You should do POST request to "https://steamcommunity.com/sharedfiles/votedown" || "https://steamcommunity.com/sharedfiles/voteup" (example for this link "https://steamcommunity.com/sharedfiles/filedetails/?id=388660226")

    let options = {
       url: "https://steamcommunity.com/sharedfiles/votedown" || "https://steamcommunity.com/sharedfiles/voteup",
       form: {
          id: 388660226, //screenshoot_id
          sessionid: 778dd9d24e7d325f2ca06af0//steam session id in cookies or you can take it when auth with node-steamcommunity  
       â€‹}
    };

    If you arre using node-steamcommunity do this steam.httpRequestPost(options) or you can use request but you should set up headers with cookies!

  5. If somebody would be useful options need to look like this:

    var options = {
            url: 'https://steamcommunity.com/market/sellitem/',
            headers: {
                'Origin': 'http://steamcommunity.com',
                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36',
                'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
                'Referer': 'http://steamcommunity.com/my/inventory/',
                'Accept-Encoding': 'gzip, deflate',
                'Accept-Language': 'ru,en-US;q=0.8,en;q=0.6,en-AU;q=0.4'
            },
            form: {
                sessionid: this.sessionid,
                appid: item.appid,
                contextid: item.contextid,
                assetid: item.assetid,
                amount: 1,
                price: item.price
            }
        };
  6. When accept TradeOffer, error occurs "Unknown state 2"

    Log from my bot:

    darkwar1234: Logged On
    darkwar1234: new trade offer from 76561198052220848
    darkwar1234: Unknown state 2
    darkwar1234: cookies are updated!
    darkwar1234: trade offer â„–1150955479, status: 3
    darkwar1234: trade offer are accepted!

    Code:

     offer.accept(function(err){
                    if(err){ // here console.log(err.message) "darkwar1234: Unknown state 2"
                        self.relogin(err, function(){
                            self.checkOffer(offer, function(offer){
                                if(offer.state == 3){
                                    self.acceptOffer(trade, callback);
                                }else if(offer.state == 2){
                                    self.handleOffer(trade, callback);
                                }
                            });
                        });
                        return;
                    }
                    self.acceptOffer(offer, callback);
                });

    And when I use method TradeOffer.update() it receive undefined if I make offer now or if TradeOffer has status 3 it show error Offer no longer valid. I want to use this method instead getOffer in this part of code:

    SteamBotManager.prototype.checkOffer = function (offer, callback) {
        var self = this;
        self.manager.getOffer(offer.id, function(err, offer){
            if(err){
                self.relogin(err, function(){
                    self.checkOffer(offer, callback);
                });
                return;
            }
            if(offer.state == 2 || offer.state == 3){
                self.log("trade offer â„–"+ offer.id +", status: "+ offer.state);
                if (typeof(callback) === 'function') {
                    callback(offer);
                }
            }else{
                self.log("trade offer â„–"+ offer.id +" is no longer valid, status: "+ offer.state +"!");
            }
        });
    };

     

  7. I am already logged in this function only starts when bot is logged in.

    Sorry if I waste your time, but this error exist only with one of my bots, another works perfect.

     

    Part of my code when sending offer:

     

    Bot.prototype.CreateOffer = function(partner, items, token, callback){
        var self = this;
        var items = items;
        self.LoadInventory(function(err, inventory){
            if(err){
                self.SteamLoginRepeat(err);
                callback(true, null);
                return;
            }
            var inventory = inventory;
            var itemsToSend = [];
            self.steam.httpRequest("http://steamcommunity.com/my/tradeoffers/sent/",{}, function(err, response, body){
                if(err){
                    self.log("error", "Error httpRequest: " + err.message); // err.message here == Not logged in
                    self.SteamLoginRepeat(err); // this function relogin bot with steamcommunity.oauth or if error on oauth with steamcommunity.login
                    callback(true, null);
                    return;
                }
                if(response.statusCode != 200) return;
                body = new HtmlDom(body);
                body.$('.inactive').remove();
                body = body.html();
                for(var index in items) {
                    for(var i in inventory) {
                        var thisItem = inventory[i];
                        if(thisItem.classid == items[index].classid && body.indexOf(thisItem.assetid) == -1){
                            var push = {
                                "assetid": thisItem.assetid,
                                "appid": thisItem.appid,
                                "contextid": thisItem.contextid,
                                "amount": 1
                            };
                            itemsToSend.push(push);
                            delete inventory[i];
                            break;
                        }
                    }
                }
                if(itemsToSend.length <= 0){
                    self.log("error", "Nothing to send!");
                    callback(true, null);
                    return;
                }
                var newOffer = self.manager.createOffer(partner);
                newOffer.addMyItems(itemsToSend);
                newOffer.send("" , token, function(err){
                    if(err){
                        self.SteamLoginRepeat(err.message);// if no errors above, here appear error: HTTP Error 403
                        callback(true, null);
                        return;
                    }
                    callback(false, newOffer);
                });
            });
        });
    };
    
×
×
  • Create New...