Jump to content
McKay Development

Insanic12

Member
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Insanic12

  1. manager.loadUserInventory(user, 730, 2, false, function (err, inventory) {
              if (err) {
                console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!"));
              } else {
              console.log(inventory);
            }
            });
    

    My code looks like this ^. And the result I get in console is:

    CEconItem {
      id: '7701501191',
      classid: '1989271219',
      instanceid: '0',
      amount: 1,
      pos: 2,
      assetid: '7701501191',
      contextid: '2',
      appid: '730',
      icon_url: 'IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0rO2BBTqjOWGReHiLGV9uH7ZbY2ve9zKtsemWRG3BEuotQg9Ve6pX-m1IPMGNIVJjg5FYpGm3hUloEgIhYslfLQ6-kidANabgWCQJ',
      icon_url_large: 'IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0rO2BBUv7aSXDKm-OSApqHrZdNGverGai5rnCRT2YFLwsF1oCePNR-jVKPM7dNkQ41dUC5XW2kAJ-ERonYMhTfBuy2ngKbLwgkHJBISpQdIvk',
      icon_drag_url: '',
      name: 'Graffiti | Toasted (Desert Amber)',
      market_hash_name: 'Graffiti | Toasted (Desert Amber)',
      market_name: 'Graffiti | Toasted (Desert Amber)',
      name_color: 'D2D2D2',
      background_color: '',
      type: 'Base Grade Graffiti',
      tradable: false,
      marketable: false,
      commodity: true,
      market_tradable_restriction: 7,
      descriptions:
       [ { type: 'html',
           value: 'This graffiti can be applied to the in-game world. You can apply it until you run out of charges.' },
         { type: 'html', value: ' ' },
         { type: 'html', value: '', color: '00a000', app_data: [Object] },
         { type: 'html', value: ' ' },
         { type: 'html', value: '' } ],
      actions:
       [ { name: 'Inspect in Game...',
           link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D3362116622103653869' } ],
      market_actions:
       [ { name: 'Inspect in Game...',
           link: 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20M%listingid%A%assetid%D3362116622103653869' } ],
      tags:
       [ { internal_name: 'CSGO_Type_Spray',
           name: 'Graffiti',
           category: 'Type',
           category_name: 'Type' },
         { internal_name: 'normal',
           name: 'Normal',
           category: 'Quality',
           category_name: 'Category' },
         { internal_name: 'Rarity_Common',
           name: 'Base Grade',
           category: 'Rarity',
           color: 'b0c3d9',
           category_name: 'Quality' },
         { internal_name: 'Tint5',
           name: 'Desert Amber',
           category: 'SprayColorCategory',
           category_name: 'Graffiti Color' } ],
      is_currency: false,
      market_marketable_restriction: 0,
      fraudwarnings: [] }
    

    What if I only want to get one element in return. Like if i would say I only wanna get the name of the skins after "name:". Not a whole array list.

  2.         manager.loadUserInventory(user, 730, 2, true, function (inventory, err) {
              if (err) {
                console.log(warning("[WARNING]: Couldn't load inventory of " + user + "!"));
              } else {
              console.log(inventory);
            }
            });
    

    Now when i finished the script i get a error. If the script finds a error it will print in console the error message. And it prints error all the time even if i checked the ID of the player i want to check.

  3. Hey so I wanted my bot to check a users inventory. This is how my code looks like.

    var TradeOfferManager = require("steam-tradeoffer-manager");
    
    var manager = new TradeOfferManager({
      "steam": client,
      "language": "en"
    });
    
    manager.loadUserInventory(user, "730", "1", "true", ???);
            console.log(???.inventory);
    

    https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/wiki/TradeOfferManager#loaduserinventorysteamid-appid-contextid-tradableonly-callback

     

    So as you see here at the code and the link i provided I haven't defined the callback thing yet indicated with "???". I don't really know what callback means and how I can use it.

    Please help me understand this variable.

     

    Thanks in advance!

×
×
  • Create New...