Jump to content
McKay Development


  • Content Count

  • Joined

  • Last visited

1 Follower

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
  • Interests
    Node.js & Python programming.

Recent Profile Visitors

756 profile views
  1. You probably want to listen for the 'newOffer' event using your steam-tradeoffer-manager instance.
  2. You could filter your inventory items by their market_hash_name.
  3. You can get a user's escrow days by using getUserDetails() and only send the trade offer if your trade partner's escrow days are 0, otherwise, you would cancel the offer and notify the user.
  4. Since you haven't posted any code I'm unsure how you're using the method. So I'll show you how I usually do it. Let's say you want to invite the user as soon as they become friends with yout bot, you can do it as follows: client.on('friendRelationship', (steamID, relationship) => { switch(relationship) { //The bot received a friend request from another Steam user case 2: console.log(`Bot ${client.steamID.getSteamID64()} received a friend request from user ${steamID}.`); client.addFriend(steamID, (err) => { if(e
  5. First of all, thank you for the great answer! Alright, so all I really need is to extract the owner's steamid from the inspect link. const groups = /^steam:\/\/rungame\/730\/\d+\/[+ ]csgo_econ_action_preview[%20 ]*?([SM])(\d+)A(\d+)D(\d+)$/.exec(inspectLink); Using the regex above I can get the item's owner and assetid, along with two other values I have no idea what are used for. [ 'steam://rungame/730/76561202255233023/+csgo_econ_action_preview S76561198964582249A17986946021D14442516311341693499', 'S', '76561198964582249', '17986946021', '14442516311341693499', ind
  6. Below is a set of data that I got from using the inspectItem() method from node-globaloffensive. { "stickers": [], "accountid": null, "itemid": "17981383956", "defindex": 5035, "paintindex": 10059, "rarity": 6, "quality": 3, "paintwear": 0.19330522418022156, "paintseed": 904, "killeaterscoretype": null, "killeatervalue": null, "customname": null, "inventory": 3221225475, "origin": 8, "questid": null, "dropreason": null, "musicindex": null } Now I'm wondering, how do I get the item name & image? Is there some library
  7. If you wish to use websockets, socket.io-client allows you to connect to another http server that's using socket.io. const io = require('socket.io-client'); const socket = io.connect('localhost:8080', { reconnect: true }); socket.on('connect', (socket) => { console.log('Connected to server!'); }); I hope this helps!
  8. You could make a seperate server for x amount of SteamUsers and use http requests to communicate with the main server.
  9. What I posted is the basics you need to know for creating commands & trades. But since you're looking for an example that solves your exact problem, this old post of mine might help. I wanted to loop trough an inventory and add the correct metal for a specific amount of Mann Co. Keys, after this I can create the trade offer. You don't see this in the post, but if you read the steam-tradeoffer-manager documentation you should be able to do it. Or just use parts of your posted code. There's not many cases out there where users have published their code for solving a specfic problem y
  10. Alright, there's primarily to parts of creating a systen like this. 1. Handling chat commands / buy & sell requests from Steam chat. 2. Searching inventories for the required items and creating the trade offer. Luckily for you, other users have had similar questions regarding this topic. Here's an entry regarding chat commands. Here's an entry regarding looping trough the inventory and looking for item matches. I hope this helps!
  11. Yes, it's possible to have "inputs" in a message or command. To do so, you'll have to learn about regex. Here's an example: //Act on chat messages & commands client.on('friendMessage', (steamID, message) => { //Command place holder var cmd; //Does the message match our buy command if(cmd = message.match(/^!buy (\d+) (\D+)/i)) { //The amount to buy (input string to number) var amount = Number(cmd[1]); //The item to buy (input string) var item = cmd[2]; //Log the regex values console.log(`User ${steamID} would like to purchase ${amount} of ${item}`);
  12. You can use Steam Trade Offer Manager to check for sent offers & check the offer state with ETradeOfferState. manager.on('sentOfferChanged', (offer, oldState) => { console.log(`Bot ${this.client.steamID.getSteamID64()}'s offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`); });
  • Create New...