timgfx Posted April 30, 2016 Report Posted April 30, 2016 (edited) The question is how do I 'filter' trade offers. So only accept the offer if the trade contains ... itemsToReceive and ... itemsToGive. I want to achieve this using another file containing those option. I don't know how I should store them (like as an array, array of objects etc). I think an array of objects could work. So I made this as sample file: module.exports = { trades: [{ "itemsToReceive": "Breakout Key", "itemsToGive": "Mac-10 | Neon Rider (Factory New)" }, { "itemsToReceive": "Falchion Key", "itemsToGive": "P250 | Sand Dune (Battle Scarred)" }] } //all values represent their market_hash_name's Edited May 1, 2016 by timgfx Quote
Dr. McKay Posted May 1, 2016 Report Posted May 1, 2016 What's wrong with the multitude of other threads you have asking this question? Quote
timgfx Posted May 1, 2016 Author Report Posted May 1, 2016 What's wrong with the multitude of other threads you have asking this question?I searched for it but haven't found anything. Continuing the search now I guess. Sorry for wasting your time:P Quote
timgfx Posted May 1, 2016 Author Report Posted May 1, 2016 What's wrong with the multitude of other threads you have asking this question?I still can't find anything Quote
cookie Posted May 2, 2016 Report Posted May 2, 2016 This is a bad idea just make the bot send the offer instead of receiving it you'll be selecting one of those whitelisted items instead of checking each item in the offer and stops spamming the forum it's for documentation not on how to build a steam bot 1o1 Quote
timgfx Posted May 2, 2016 Author Report Posted May 2, 2016 (edited) This is a bad idea just make the bot send the offer instead of receiving it you'll be selecting one of those whitelisted items instead of checking each item in the offer and stops spamming the forum it's for documentation not on how to build a steam bot 1o1Well I think it would be a lot easier if the bot receives offers, I am going to use it as trade bot to buy quicksells (csgo items via csgolounge), and to make it easy people can send their offers and instantly get accepted. Edited May 2, 2016 by timgfx Quote
cookie Posted May 2, 2016 Report Posted May 2, 2016 Well I think it would be a lot easier if the bot receives offers, I am going to use it as trade bot to buy quicksells (csgo items via csgolounge), and to make it easy people can send their offers and instantly get accepted. then loop through itemsToReceive and validate each market_hash_name Quote
timgfx Posted May 2, 2016 Author Report Posted May 2, 2016 (edited) then loop through itemsToReceive and validate each market_hash_nameYep I figured it out already. It's too much to explain tho and was a lotta copy pasting. And I didn't use JSON since I like using Javascript objects more. Dunno why, more familiar with it I guess. This is my trades.js file now: module.exports = { trade1: { "itemsToReceive": "", "itemsToGive": "" }, trade2: { "itemsToReceive": "", "itemsToGive": "" }, trade3: { "itemsToReceive": "", "itemsToGive": "" }, trade4: { "itemsToReceive": "", "itemsToGive": "" }, trade5: { "itemsToReceive": "", "itemsToGive": "" }, trade6: { "itemsToReceive": "", "itemsToGive": "" }, trade7: { "itemsToReceive": "", "itemsToGive": "" }, trade8: { "itemsToReceive": "", "itemsToGive": "" }, trade9: { "itemsToReceive": "", "itemsToGive": "" }, trade10: { "itemsToReceive": "", "itemsToGive": "" } } //all values represent the market_hash_names of the item Edited May 2, 2016 by timgfx 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.