TomYoki Posted March 2, 2017 Report Posted March 2, 2017 Hello,I'd like to know how to correctly check item type for trading card. I tried: offer.itemsToReceive.forEach(function(item) { if (item.type.includes("Trading Card"){ My code } But this doesn't seem to work. Could anybody tell me how to do this correctly? Quote
Dr. McKay Posted March 2, 2017 Report Posted March 2, 2017 First, you should make sure the appid is 753. Secondly, did you provide a language to the constructor? Quote
TomYoki Posted March 2, 2017 Author Report Posted March 2, 2017 How do you check if appid is 753? Before I tried just item.name == "Cards name" and it worked fine, does this means I made sure that appid is 753? Also I'm making trading card bot, so under this line it makes sure that all other items are metals. And no - I don't think I provided language. Quote
Dr. McKay Posted March 2, 2017 Report Posted March 2, 2017 item.appid == 753 You need to provide a language to get most details. Quote
TomYoki Posted March 2, 2017 Author Report Posted March 2, 2017 Wont it conflict with tf2 items? Quote
TomYoki Posted March 6, 2017 Author Report Posted March 6, 2017 Yes, thanks McKay. My Trading Card bot is up and running. I used item.appid == 753 and .match function to identify item type ☺ 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.