Jump to content
McKay Development

roughnecks

Member
  • Posts

    70
  • Joined

  • Last visited

Everything posted by roughnecks

  1. Hello. Can anyone make a code example on how to join a group chat, default "Home" channel?
  2. Hello. I just updated npm modules and got steam-user 4.5 and my bot is still running fine (AFAIK). Is there a place where I can read about important changes made in v4.X which break v3.X code? I saw the announcements page here and releases on github but there's too many, so I was looking for some "shortcut" reading. Thanks
  3. What does being blocked entail? And what's the best approach to get prices for whole Inventory?
  4. Hello My bot is fetching prices for all its Items in Steam Inventory, which is very small at the moment. Is there any recommendation on how many queries (per second) can it do to get all prices?
  5. Bot's up and running, if anyone's interested: http://steamcommunity.com/id/meltdownzed/
  6. Lately all notifications aren't cleared and I also get log messages in console, like: [12:48:34] [LOG] Friend message from roughnecks: [tradeoffer sender=xxxxx id=xxxxxx][/tradeoffer] Did something change? Any way to fix it? Thanks
  7. Got it to work with some "quirks", so thanks for helping me out so far. Onto the next quest!
  8. I already used that tag.internal_name == 'item_class_2' in another place but now it's different because I'm not getting a tags array when loading my inventory, but 3 or 4 nested objects (like I first posted) and I don't know how to access them.
  9. Sorry but every Item has that "item_class" category, so how do I separate Cards from everything else? [16:24:10] [LOG] [ { internal_name: 'droprate_1', name: 'Uncommon', category: 'droprate', category_name: 'Rarity', localized_tag_name: 'Uncommon', color: '', localized_category_name: 'Rarity' }, { internal_name: 'app_285840', name: 'Enemy Mind', category: 'Game', category_name: 'Game', localized_tag_name: 'Enemy Mind', color: '', localized_category_name: 'Game' }, { internal_name: 'item_class_3', name: 'Profile Background', category: 'item_class', category_name: 'Item Type', localized_tag_name: 'Profile Background', color: '', localized_category_name: 'Item Type' } ]
  10. So, I get this for tags array (trading card): [17:07:04] [LOG] [ { internal_name: 'droprate_0', name: 'Common', category: 'droprate', category_name: 'Rarity', localized_tag_name: 'Common', color: '', localized_category_name: 'Rarity' }, { internal_name: 'app_388390', name: '"Glow Ball" - The billiard puzzle game', category: 'Game', category_name: 'Game', localized_tag_name: '"Glow Ball" - The billiard puzzle game', color: '', localized_category_name: 'Game' }, { internal_name: 'cardborder_0', name: 'Normal', category: 'cardborder', category_name: 'Card Border', localized_tag_name: 'Normal', color: '', localized_category_name: 'Card Border' }, { internal_name: 'item_class_2', name: 'Trading Card', category: 'item_class', category_name: 'Item Type', localized_tag_name: 'Trading Card', color: '', localized_category_name: 'Item Type' } ] And the getTag method is: getTag(category)category - A string containing the tag's category (the category property of the tag object) So, which category should I look for? I don't see any meaningful one on the array.
  11. Doesn't seem to work; when I load my bot's profile I see the "&" but it's soon replaced by "%26".
  12. Thanks Doc, didn't know about getTag, will check that out and let you know later.
  13. Say I want to create an offer but need to add just Trading Cards to it, how do I select them? I already know about appid, contextid and "item_class_2" but I need a working example after I loaded my Inventory, which has 4 [Object] inside "tags": CEconItem { appid: 753, contextid: '6', assetid: '10305554518', classid: '1496965455', instanceid: '0', amount: 1, pos: 30, id: '10305554518', background_color: '', icon_url: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', icon_url_large: 'IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEaiHLrVJRsl8vGuCUY7Cjc9ehDNVzDMCeHqtjCQrcex4NM6b8wT1tePGP3j2fSSCJizYG1s1RLtXYTzc9zSjsL-QQj6dE-wkEggGfvQA8GFPPZzbNhM_1YcK_GPhwwp3DhFucMpUdAqp9X0eMLoglXVEd59RmXWjJpDc1F5hYUA8W-2yBLzHbdLzlSYhCxtiGvEYMYOXsXDyuMmmfLGLLIM8gGfI', descriptions: [ [Object] ], tradable: true, owner_actions: [ [Object], [Object] ], name: 'Santa Claus', type: 'Solitaire Christmas. Match 2 Cards Trading Card', market_name: 'Santa Claus', market_hash_name: '428510-Santa Claus', market_fee_app: 428510, commodity: true, market_tradable_restriction: 7, market_marketable_restriction: 7, marketable: true, tags: [ [Object], [Object], [Object], [Object] ], is_currency: false, fraudwarnings: [] }, CEconItem {
  14. OK, so I got this from tags array for Emoticon: [ { internal_name: 'droprate_1', name: 'Uncommon', category: 'droprate', category_name: 'Rarity', localized_tag_name: 'Uncommon', color: '', localized_category_name: 'Rarity' }, { internal_name: 'app_319180', name: 'Platypus II', category: 'Game', category_name: 'Game', localized_tag_name: 'Platypus II', color: '', localized_category_name: 'Game' }, { internal_name: 'item_class_4', name: 'Emoticon', category: 'item_class', category_name: 'Item Type', localized_tag_name: 'Emoticon', color: '', localized_category_name: 'Item Type' } ] Can you make an example on what should I extract from it? EDIT: Can this be acceptable? offer.itemsToReceive[0].tags.forEach(element => { //console.log(element); if (element.internal_name.includes('item_class_2')) { console.log('It\'s a Card!');
  15. Hi again What is the best approach to determine if an Item belonging to Steam Inventory 753 - contextid 6 (steam community) - is a Card, Booster, etc... I was looking at the "offer" object for an incoming offer and found out that Booster Packs and Gems are actually called like that under "type" but for cards, bgs and emotes it's a little different - some examples: 1) type: '"Glow Ball" - The billiard puzzle game Trading Card', 2) type: 'DISTRAINT: Deluxe Edition Uncommon Emoticon', 3) type: 'Unexpected Day Profile Background', So, should I use the type value and match for e.g. "Emoticon" or is there a better way to identify those items' type? Thanks
  16. I'd like to write an "ampersand" & in bot's custom game played but it gets escaped(?). Is there a way to do it? Thanks
  17. Unfortunately it's happening again. [16:37:22] [LOG][16:37:22] [LOG] Bot version: 1.3.2[16:37:22] [LOG] node.js version: v8.11.1[16:37:24] [LOG][16:37:24] [LOG] == Logged in =============[16:37:24] [LOG] == Name: ZED[16:37:24] [LOG] == ID64: 76561198[16:37:24] [LOG] ==========================[16:37:24] [LOG][16:37:29] [LOG] Accepted offer 3442372810 from owner. Status: pending.[16:37:33] [LOG] Offer 3442372810: Confirmed![17:00:00] [LOG] Already logged in: 76561198[17:00:00] [LOG] Called weblogon from cron[17:05:22] [LOG] Session Expired: Error: HTTP error 403[17:05:22] [LOG] called weblogon: 76561198[17:05:22] [LOG] Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (/mnt/d/Portable/ZED/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:483:25) at Request._callback (/mnt/d/Portable/ZED/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/mnt/d/Portable/ZED/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/mnt/d/Portable/ZED/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (/mnt/d/Portable/ZED/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) This thing is driving me crazy.
  18. This is my code: if (offer.partner.getSteamID64() === '76561198061492959') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(chalk.green(`Accepted offer ${offer.id} from owner. Status: ${status}.`)); community.acceptConfirmationForObject(identitySecret, offer.id, function(err) { if(err){ console.log(chalk.red("Confirmation Failed for " + offer.id + ": " + err)); } else { console.log(chalk.green("Offer " + offer.id + ": Confirmed!")); } }); } }); It's working fine (at least when I tried) but I read on another thread where you suggested to add a delay just to be sure the confirmation would fire after accepting the offer - and I didn't want to necro that post.
  19. community.acceptConfirmationForObject(identitySecret, offer.id, function(err) { if(err){ console.log(chalk.red("Confirmation Failed for " + offer.id + ": " + err)); } else { console.log(chalk.green("Offer " + offer.id + ": Confirmed!")); } }); How can I delay this ^ for a couple seconds, avoiding it being fired earlier than offer.accept (which is right before)? I know this is more a coding issue rather than module's issue but I'm beginning to code in js and this async stuff hurts Thanks
  20. If "looking to Trade" counts as online, then yes, it is. client.setPersona(5); //"5": "LookingToTrade" -- https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js client.gamesPlayed('Accepting Junk and Making Friends!');
  21. My bad. Most probably that isn't the cause but failed offers are; I mean offers which don't go through because they're canceled or something. I still need a way to get rid of those notifications, if anyone knows how to do do it.
×
×
  • Create New...