Guest User

Mica

a guest
Dec 16th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @id             CardsBatGenerator
  3. // @name           CardsBatGenerator
  4. // @version        1.0
  5. // @namespace      
  6. // @author         Mica
  7. // @description    
  8. // @include        http://steamcommunity.com/id/*
  9. // @include        https://steamcommunity.com/id/*
  10. // @require        http://code.jquery.com/jquery-latest.min.js
  11. // @run-at         document-end
  12. // ==/UserScript==
  13.  
  14.  
  15. $(document).ready(function()
  16. {  
  17.     var script = "";
  18.     var cards_sum = 0;
  19.     var time_per_card = 2000;
  20.    
  21.     $('div.badge_row').each(function()
  22.     {
  23.         var gameid = $(this).find('a.btn_green_white_innerfade');
  24.         var cards = $(this).find('span.progress_info_bold').text();
  25.        
  26.        
  27.        
  28.         if (gameid.length > 0)
  29.         {
  30.             cards = parseInt(cards);
  31.            
  32.            
  33.             cards_sum += cards;
  34.             gameid = gameid.attr("href").substring(("steam://run/").length);
  35.            
  36.             script += 'start /D "C:\\SAM\\" "" "C:\\SAM\\SAM.Game.exe" "'+gameid+'"' + "\n" + 'timeout '+(cards*time_per_card) + "\ntaskkill /im SAM.Game* /f\ntimeout 1\n";
  37.         }
  38.        
  39.     });
  40.    
  41.     console.log(script);
  42.     console.log("Total cards: " + cards_sum);
  43.     console.log("Total time: " + ((cards_sum * time_per_card)/3600) + " hours");
  44.  
  45. });
Advertisement
Add Comment
Please, Sign In to add comment