Jump to content
McKay Development

AshIgorash

Member
  • Posts

    24
  • Joined

  • Last visited

Posts posted by AshIgorash

  1. Yes, but my callback has only error.
     

    /**
         * Get the contents of a user's inventory context.
         * @param userID - The user's SteamID as a SteamID object or a string which can parse into one
         * @param appID - The Steam application ID of the game for which you want an inventory
         * @param contextID - The ID of the "context" within the game you want to retrieve
         * @param tradableOnly - true to get only tradable items and currencies
         * @param [language] - The language of item descriptions to return. Omit for default (which may either be English or your account's chosen language)
         * @param callback
         */
        getUserInventoryContents(
            userID: userid,
            appID: appid,
            contextID: contextid,
            tradableOnly: boolean,
            language: string,
            callback: Callback,
        ): any;
    /**
         * @param err `null` on success, an `Error` object on failure.
         */
        type Callback = (err: CallbackError) => any;
  2. I want to get items that are temporary trade locked. If using manager to get inventory I don't get those items, tried to use community.getUserInventoryContents() but getting undefined inventory and null error. Btw what is difference between manager.getUserInventoryContents and community.getUserInventoryContents?

    public getInventory(steamID: string):Promise<CEconItem[]>{
            return new Promise((resolve, reject)=> {
                const inventory = this.bot.community.getUserInventoryContents(steamID,730,2,false,'english',(err)=>{console.log(err)})
                console.log(inventory)
                this.bot.tradeManager.getUserInventoryContents(steamID,730,2,false, (err, inventory)=> {
                    if(err){
                        if(err.message === "This profile is private."){
                            return reject(new CustomError("This profile is private.",ERR.PrivateProfile))
                        }
                        else if(err.message.includes("RateLimitExceeded")){
                            return reject(new CustomError(err.message, ERR.RateLimitExceeded))
                        }
                        else{
                            return reject(new CustomError(err.message, ERR.GeneralError))
                        }
                    }
                    resolve(inventory)
                 
                })
            })
        }
  3. I have a problem with saving correct data using method offer.data()
    If saving serverAck under await line then I got in pollData.json file the serverAck.finalState as false but in memory it is true because when logging it I got finalState = true. If I am calling this block over await line then everything is saved ok.

    this.trades.bot.tradeManager.on("sentOfferChanged",async (offer,oldState)=>{
                logger.info(`Sent offer #${offer.id} state changed: ${oldState} -> ${offer.state}`)
                if(offer.id!==undefined){
                    const state = getStatus(offer.state)
                   
                    // this.socket.emit('offerChangedState',{state,offerId:offer.id}, (response)=>{
                    const response = await this.socket.emitWithAck('offerChangedState',{state,offerId:offer.id})
                    if(response.status === 'ok'){
                    let serverAck = offer.data("mainServerAcknowledged") as mainServerAck
                    if(serverAck){
                        serverAck.finalState = true
                        offer.data('mainServerAcknowledged',serverAck)
                        console.log(offer.data("mainServerAcknowledged"))
                    }
                     }
  4. On steamGuard event I am using an async method to get authCode and it just looping again and again here to get a new one with lastCodeWrong = true. If using sync method to get code then everything is works well.
     

    this.steamClient.on('steamGuard', async (domain, callback, lastCodeWrong) => {
                logger.info("Need code");
                console.log(lastCodeWrong);
                if(lastCodeWrong){
                    throw new Error("To many consecutive wrong GUARD CODE")
                }
                try {
                    const code = await this.generateAuthCode();
                    callback(code);
                } catch (e) {
                    console.log(e);
                }
            });
     private async generateAuthCode(): Promise<string> {
            let offset: number | undefined;
     
            try {
                offset = await this.getTimeOffset;
                console.log('Offset:' + offset)
            } catch (err) {
                // ignore error
            }
     
            return SteamTotp.generateAuthCode(this.auth, offset);
        }
  5. I am developing a backend for my own small project. I am facing a problem, when choosing a bot for making a trade I need to return one with less than 30 active trades total and less than 5 active trades with a specific user. Its ok that for each trade to ask info from steam about current trades of bot or should I keep this data stored in memory? . Its also an option to look in db but I think it will overload it. 

  6. How do I get time when items from my inventory will be tradable?
    If I am fetching this link: "https://steamcommunity.com/inventory/id64/2?l=english&count=75", if this is my inventory I can see this field 
    "owner_descriptions":[{"type":"html","value":" "},{"type":"html","value":"Tradable After Oct 19, 2023 (7:00:00) GMT","color":"ff4040"}] with 'tradable after' value but getInventoryContents() method from node-steam-tradeoffer-manager does not return this property. Is there a way to get the time?

  7. I know that is my question isn't about this this forum but maybe I can get some help, so, today I was scammed. Someome joined my account and sold a lot of items for 1€ and after that bought a 0.03 € item for 100€. I have steam guard installed only on my phone, but I have an api key that I used on many sites. I have installed in my browser extensions like market.csgo p2p, csgo trader and sih. Mb my password was leaked because it was not strong enaugh and I used it in many sites but how did someone loggin in my account without steam guard. At time my money was stolen my computer was turned off. I have no idea how this is possible. I have to mention that he extracted some items from my storage containers and sold it.

  8. Yes, I launch it, parameters are valid, also I tried to put whole insept link at owner but I dont get anything.
     

    const SteamUser = require('steam-user');
    const GlobalOffensive = require('globaloffensive');
    const SteamTotp = require('steam-totp');

     

    const userMarar = require('./config.json');
    const { time } = require('console');

     

    let user = new SteamUser();
    let csgo = new GlobalOffensive(user);

     

    let logOnOptions = {
        "accountName": "name",
        "password": "pass",
        "twoFactorCode": SteamTotp.generateAuthCode(userMarar["shared_secret"])
    };
    user.logOn(logOnOptions);

     

    user.on('loggedOn', function() {
        console.log("Logged into Steam");
        user.setPersona(SteamUser.EPersonaState.Online);

     

        user.gamesPlayed([730]);
       
            });
       

     

    csgo.on('connectedToGC', () => {
        console.log('Connected to CS:GO Game Coordinator');
        csgo.inspectItem("76561202255233023","30999439917","2612242276566628011",function(item) {
            if (err) {
                console.log(err);
                return;
            }
        console.log(item)
       
       
       
       
        });
    });
  9. Is there any method by which I can find the paint_wear of all the items in someone's inventory. I tried this code using globaloffensive but it doesn't print anything: 

    csgo.on('connectedToGC', () => {
        console.log('Connected to CS:GO Game Coordinator');
       
        csgo.inspectItem("76561202255233023","30848107082","12134527536543334116",function(item) {
            if (err) {
                console.log(err);
                return;
            }
        console.log(item)
×
×
  • Create New...