N4d!r Posted July 17, 2016 Report Posted July 17, 2016 hello,im trying to make a steam trade bot (and im not so good with coding).i found this code to send trade offer but i don"t know how to add items var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=0000000&token=xxxxxxx"); manager.loadInventory(730, 2, true, function(err, myItems) { if(err) { console.error(err); return; } offer.loadPartnerInventory(730, 2, function(err, theirItems) { if(err) { console.error(err); return; } offer.addMyItem(myItems[0]); offer.addTheirItem(theirItems[0]); offer.send(""); }); }); }); let's say i want to :send 2 items with id 6908727870 and id 6901768067andrecieve 2 items with id 847548541 and id 325415748please just help me filling these ids in the code above to serve like an example for me.thank you so much Quote
Dr. McKay Posted July 18, 2016 Report Posted July 18, 2016 Assuming all items are CS:GO items... var offer = manager.createOffer("https://steamcommunity.com/tradeoffer/new/?partner=123456&token=xxxxxx"); offer.addMyItems([ { "appid": 730, "contextid": 2, "assetid": "6908727870" }, { "appid": 730, "contextid": 2, "assetid": "6901768067" } ]); offer.addTheirItems([ { "appid": 730, "contextid": 2, "assetid": "847548541" }, { "appid": 730, "contextid": 2, "assetid": "325415748" } ]); offer.send(function(err, status) { if (err) { throw err; } console.log("Offer #" + offer.id + " is now " + status); }); Quote
N4d!r Posted July 19, 2016 Author Report Posted July 19, 2016 (edited) Thank you for the help ^^ i have two more simple questions : 1 - how to make my bot decline any recieved offer ? (because i want the bot to send the offers only). 2 - how to check the status of an offer that i already sent ? if it was accepted or declined or changed. Edited July 19, 2016 by N4d!r Quote
Dr. McKay Posted July 19, 2016 Report Posted July 19, 2016 Read the documentation please. There are events for everything you just described. Quote
N4d!r Posted July 19, 2016 Author Report Posted July 19, 2016 Read the documentation please. There are events for everything you just described. will do +can you help me with this one ? Quote
N4d!r Posted July 19, 2016 Author Report Posted July 19, 2016 You need to check err. solved thank you in this code : offer.addMyItems([ { "appid": 730, "contextid": 2, "assetid": "6908727870" }, { "appid": 730, "contextid": 2, "assetid": "6901768067" } ]); can i replace it with "addMyItem" like this : offer.addMyItem({"appid": 730,"contextid": 2,"assetid": "6908727870"}); offer.addMyItem({"appid": 730,"contextid": 2,"assetid": "6908765841"}); offer.addMyItem({"appid": 730,"contextid": 2,"assetid": "6908706992"}); ??? 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.