Jump to content
McKay Development

Includes

Member
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Includes

  1. Hello, i wanted add comment on steam profile, what's wrong?
     

    ff3178d4e8a646b2aed9103aa858016f.png

    var SteamCommunity = require('../index.js');
    var ReadLine = require('readline');
    var fs = require('fs');
    
    var SteamID = require('steamid');
    var CEconItem = require('../classes/CEconItem.js');
    
    var community = new SteamCommunity();
    var rl = ReadLine.createInterface({
    	"input": process.stdin,
    	"output": process.stdout
    });
    
    rl.question("Username: ", function(accountName) {
    	rl.question("Password: ", function(password) {
    		doLogin(accountName, password);
    	});
    });
    
    function doLogin(accountName, password, captcha) {
    	community.login({
    		"accountName": accountName,
    		"password": password,
    		"captcha": captcha
    	}, function(err, sessionID, cookies) {
    		if(err) {
    			
    			if(err.message == 'CAPTCHA') {
    				console.log(err.captchaurl);
    				rl.question("CAPTCHA: ", function(captchaInput) {
    					doLogin(accountName, password, captchaInput);
    				});
    
    				return;
    			}
    
    			console.log(err);
    			process.exit();
    			return;
    		}
    
    		console.log("Logged on!");
    
    		
    		
    		SteamCommunity.prototype.postUserComment = function(userID, message, callback) {
    	if(typeof userID === 'string') {
    		userID = new SteamID(userID);
    	}
    
    	var self = this;
    	this.httpRequestPost({
    		"uri": "https://steamcommunity.com/comment/Profile/post/76561198015482752",
    		"form": {
    			"comment": message,
    			"count": 6,
    			"sessionid": this.getSessionID()
    		},
    		"json": true
    	}, function(err, response, body) {
    		if(!callback) {
    			return;
    		}
    
    		if (err) {
    			callback(err);
    			return;
    		}
    
    		if(body.success) {
    			callback(null);
    		} else if(body.error) {
    			callback(new Error(body.error));
    		} else {
    			callback(new Error("Unknown error"));
    		}
    	}, "steamcommunity");
    };
    
    		
    	});
    }
    
    
    
  2. Oh i mean rate screenshots on steam community. For example this screenshot: https://steamcommunity.com/sharedfiles/filedetails/?id=388660226

     

    Also i found https://github.com/SteamDatabase/SteamTracking/blob/e0e3e9b12c99401fe665376c74975274e8840625/Scripts/Community/sharedfiles_functions_logged_in.js but i don't know how to start. 

    function VoteUp(item_id)
    {
    	if ( !$('VoteUpBtn').hasClassName( 'toggled' ) )
    	{
    		$('action_wait').show();
    		var options = {
    			method: 'post',
    			postBody: 'id=' + item_id + '&sessionid=' + g_sessionID,
    			onSuccess: (function(item_id){
    				return function(transport)
    				{
    					$('action_wait').hide();
    
    					if ( !CheckVoteResults( transport ) )
    						return;
    
    					ToggleChildItemVoteBtns( transport, true );
    
    					var votesUpCount = $('VotesUpCount');
    					if ( votesUpCount )
    					{
    						UpdateFormattedNumber( votesUpCount, 1 );
    						$('VotesUpCountContainer').show();
    					}
    
    					$('VoteUpBtn').addClassName('toggled');
    					$('VoteDownBtn').removeClassName('toggled');
    					var voteLaterBtn = $('VoteLaterBtn');
    					if ( voteLaterBtn )
    					{
    						voteLaterBtn.hide();
    					}
    
    					var blurb = $('rated_blurb');
    					if( blurb != null )
    						blurb.show();
    
    					var next = $('voteNext');
    					if( next != null )
    						next.show();
    				}
    			}(item_id))
    		};
    		new Ajax.Request(
    			'https://steamcommunity.com/sharedfiles/voteup',
    			options
    		);
    	}
    	return false;
    }
    
×
×
  • Create New...