Cracker Posted December 12, 2016 Report Posted December 12, 2016 So i am building a steambot to interact with a website! Is there a specific variable in the item array that i could use to identify the item once the item is given to the bot? I heard that people use assetid but that it can change after making a trade. manager.on('sentOfferChanged', function(offer, oldState) { if(TradeOfferManager.ETradeOfferState[offer.state] == "Declined") { console.log("Declined"); } else if (TradeOfferManager.ETradeOfferState[offer.state] == "Active") { } else if (TradeOfferManager.ETradeOfferState[offer.state] == "Accepted") { offer.itemsToReceive.forEach(function(entry) { console.log(entry.id); }); } else { console.log("Changed?"); console.log(TradeOfferManager.ETradeOfferState[offer.state]); } }); Also, where does the bot get the item data from? I dont see assetid for the items in http://api.steampowered.com/IEconItems_440/GetPlayerItems/v0001/ Quote
Dr. McKay Posted December 12, 2016 Report Posted December 12, 2016 The asset ID for an item is also referred to as just the item's "id". In GetPlayerItems, "id" is the same as "assetid". Asset IDs do change when traded for Valve games (and some others). You can get the new IDs from the getReceivedItems method. Quote
Cracker Posted December 13, 2016 Author Report Posted December 13, 2016 I tried that but it didnt work the id was different but ill try it again q.q Quote
Van Kappa Posted December 21, 2016 Report Posted December 21, 2016 (edited) You can use both intanceid and classid combined. They are unique and don't change after trade. Edited December 21, 2016 by Van Kappa Quote
Dr. McKay Posted December 21, 2016 Report Posted December 21, 2016 They can change, e.g. StatTrak/Strange items that reset their counters on trade. There are also some other instances where they can change unexpectedly. 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.