Jump to content
McKay Development

Jyn

Member
  • Posts

    3
  • Joined

  • Last visited

Jyn's Achievements

  1. Okay so I'm doing that now but I have an issue with the steamcommunity.getUserInventoryContents it seems to be getting skipped in the code and ran at the end so at the time of where it is used it just puts out undefined.
  2. Do you know how you would go about using each of these? I plan to make a bot that crafts hats with non tradable metal and rebuilding non tradable headgear, so I would prefer to do it with the tf2 backpack. That is unless you already have a easy section of code that takes the item id and checks it against the steam inventory. Otherwise for my project I would rather check the different ways it can be non tradable
  3. For whatever reason I cant seem to get any values from defIndex. From the first log each item in my backpack is just being returned as having a defIndex of undefined. what is annoying too is that tf2.backpack[i].id works fine to get the specific item id's. Code below: tf2.on('backpackLoaded', function () { log("Loaded our backpack."); lookforrefined() }); function lookforrefined() { var refcount = 0; for (i = 0; i <tf2.backpack.length; i++) { log(tf2.backpack[i].defIndex); // only returning 'undefined' if (tf2.backpack[i].defIndex === 5002) { refcount++; log("foundref"); } } log(refcount) };
×
×
  • Create New...