Preport Posted September 30, 2018 Report Posted September 30, 2018 Hi I'm having some problems to get it to work I currently have 3 quackenbirds(947) one of them which is not tradable and not marketable but when I run this code return is 3. for (var i = 0;i <tf2.backpack.length; i++){ if (tf2.backpack.defIndex == 947 && !tf2.backpack.flag_cannot_trade && !tf2.backpack.flag_cannot_craft){ quack++; }} Quote
Dr. McKay Posted October 1, 2018 Report Posted October 1, 2018 Determining from node-tf2 if an item is tradable is a task. There are like 4 different ways something can be untradable. There could be a flag, there could be one of several attributes, there could be a specific origin (achievement item). You're probably better off just getting your inventory from Community. Quote
Jyn Posted July 1, 2019 Report Posted July 1, 2019 Determining from node-tf2 if an item is tradable is a task. There are like 4 different ways something can be untradable. There could be a flag, there could be one of several attributes, there could be a specific origin (achievement item). You're probably better off just getting your inventory from Community. 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 Quote
Dr. McKay Posted July 1, 2019 Report Posted July 1, 2019 It'll be a lot easier to retrieve your community inventory and just find the item with the matching ID. Quote
Jyn Posted July 1, 2019 Report Posted July 1, 2019 It'll be a lot easier to retrieve your community inventory and just find the item with the matching ID.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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.