Jump to content
McKay Development

Go Fast

Member
  • Posts

    21
  • Joined

  • Last visited

Posts posted by Go Fast

  1. I'm trying to get user details on a message. The problem is that if the user changes his profile (name,location,etc) the bot will have to reset in order to update those values..

     

    [Here's my code](https://pastebin.com/7pq0rJqC):

     

    I get it that the bot gets the caches version of the steam profile page, but is there a way it can update it every couple of minutes?

     

    The only alternative I have my mind is logging a different bot that'll update those details & then send them to the main bot, but that's way too much to do each time I get a new message..

  2. Hi,

     

    Is it ok by Steam if I use my bot to scan my accounts inventories every 2-3 minutes?

     

    I have a function that scans a certain SteamID's inventory & then I use a randomized interval to run that function.

     

    Is it allowed to even do that? And if it is, And how frequently is it safe to scan inventories?  :) 

     

    Also, what's the recommended number to use for pollInterval of my 'steam-tradeoffer-manager' node? So that I don't spam Steam servers with too frequent requests

     
  3. DigitalOcean is fine. I'd recommend them more now that they've dropped their prices than I would in the past. If you're going with a VPS then you need to read up on security so you don't get pwned.

     

    You probably want at least 2 GB of RAM. 1 GB might work but keep in mind that it also needs to support the entire OS too.

     

    On a reputable host your files are safe. You don't need to encrypt them unless you're really paranoid, and if you do go that route you can't store the key on the server or it'll defeat the purpose.

    I'm definitely going to look into VPS protection, thanks!

     

    Speaking of protection, do you know if it's possible for users to Inject malicious code through the steam chat? Or does Steam take of that?

  4. The bot is currently ran &hosted on my PC just until I finish testing it, and I have a few questions before I host it on a sever:

     

    1) Where should I host my bot? What's the best server host in terms of reliability / performance? I heard some people talking about DigitalOcean being a good host, is that so?

     

    2) How much RAM do I need?  Assuming I have 100+ friends using the bot regularly and the bot itself is pretty simple (kinda similar to what Trading Card bots do but with a much smaller item database of accepted items) - How much RAM (or other hardware requirements) would I need?

     

    3) Are my config.json & other files(where I store my sensitive information) safe? Do I need to encrypt the sensitive information on a different file? (A guide will be extremely helpful)

     

    4) Is it crucial that my code isn't the most efficient? Or is it based on how much RAM the server have?

     

    I appreciate any help! Thank you  B)

  5. Don't because:

     

     

    1.) It's super annoying.

     

    2.) It doesn't give any actual advertisement whatsoever.

     

    3.) Bots get community banned for doing this.

     

     

    However, if you still choose to do it just read the actual documentation.

    > Either a SteamID object or a user's URL (the part after /id/)

    aka

    typeof id === 'string' ? "id/" + id : "profiles/" + id.toString()

    I wasn't aware this was not allowed, because I see many card bots doing that. So thank you for the info & also the code!

     

    Edit: On a second thought, I'll try to code a script to check if I already left a comment on a specific user's profile today, that way it won't be considered as spam

  6.  

    1. Sure, just load two inventories and add two items from different games.
    2. Change the amount property on the item. For example:
    manager.getUserInventoryContents(steamID, 753, 6, true, (err, theirInv) => {
    	if (err) {
    		throw err;
    	}
    	
    	let gems = inv.filter(item => item.market_hash_name == "Gems");
    	let item = gems[0];
    	item.amount = 300;
    	offer.addMyItem(item);
    });
    

    Just realized filter() is a javascript method. I solved it 

  7.  

    1. Sure, just load two inventories and add two items from different games.
    2. Change the amount property on the item. For example:
    manager.getUserInventoryContents(steamID, 753, 6, true, (err, inv) => {
    	if (err) {
    		throw err;
    	}
    	
    	let gems = inv.filter(item => item.market_hash_name == "Gems");
    	let item = gems[0];
    	item.amount = 300;
    	offer.addMyItem(item);
    });
    
    

     

    That was extremely helpful! Thanks!

    I wasn't aware of the built in inv.filter command, so I made my own. At least now I know of a more efficient way

  8. Hi,

     

    I have 2 things I'm not quite sure about:

     

    1) Currently I use getUserInventoryContents(appid,contextid...etc) to load user's inventory as well as mine. Is it possible to select items from 2 different games in the same trade offer? For example: Their items in trade window will have both CSGO + Steam inventory items

     

    2) How do I go about adding a certain amount of Steam Gems from user's / bot's inventory? I read this article: https://dev.doctormckay.com/topic/332-identifying-steam-items/ and know what asseid,contextid stands for, but I just can't figure out how to find a specific item in an inventory and  select Steam gems for example

     

    Any help is appreciated!

  9. So far I got this code inside of my client.on('webSession', (sessionid, cookies):
    
    manager.on('sentOfferChanged', function(offer, oldState) {
    	const partnerID = offer.partner.getSteamID64();
    
    	console.log(`Offer #${offer.id} changed: ${TradeOfferManager.ETradeOfferState[oldState]} -> ${TradeOfferManager.ETradeOfferState[offer.state]}`);
    	
    	if(TradeOfferManager.ETradeOfferState[offer.state] == "Accepted"){ 
    		
    	  client.chatMessage(partnerID, "Thank you for trading with me!");
    	  community.getSteamUser(partnerID, function(err, user){
    		  if(err){
    			  console.log(err);
    		  } else{
    		  user.comment("Thanks for trading with me", function(err){
    			  if(err){
    				  console.log(err);
    			  }
    		  });
    		  }
    	  });
    

    Error I get:

    The specified profile could not be found, even though I get the Steam ID by using offer.partner.getSteamID64()

×
×
  • Create New...