Advertisement
Guest User

Untitled

a guest
Mar 1st, 2015
354
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. var buildABot = function(steamName, password){
  2. var bot = new Steam.SteamClient();
  3. if(fs.existsSync("sentryfile" + 'sirrofl360')){
  4. //If there is a sentry file, use it.
  5. bot.logOn({
  6. accountName: '<REDACTED>',
  7. password: '<REDACTED>',
  8. shaSentryfile: fs.readFileSync("sentryfile" + 'sirrofl360')
  9. })
  10. } else {
  11. //Probably gonna need another couple ifs here, gonna need to scrape steamguard.
  12. bot.logOn({
  13. accountName: '<REDACTED>',
  14. password: '<REDACTED>'
  15. })
  16. }
  17.  
  18. bot.on('loggedOn', function() {
  19. console.log('Logged in!');
  20. bot.setPersonaState(Steam.EPersonaState.Online); // to display your bot's status as "Online"
  21. });
  22.  
  23. bot.on('webSessionID', function(sessionID){
  24. //steamTrade.sessionID = sessionID;
  25. bot.webLogOn(function(cookies){
  26. steamOffers.setup({
  27. sessionID: sessionID,
  28. webCookie: cookies
  29. }, function(){
  30. console.log("SteamOffers cookies set");
  31. return steamOffers;
  32. })
  33. });
  34.  
  35. });
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement