Advertisement
Guest User

CardsBatGenerator

a guest
Apr 13th, 2014
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  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. // @require http://code.jquery.com/jquery-latest.min.js
  10. // @run-at document-end
  11. // ==/UserScript==
  12.  
  13.  
  14. $(document).ready(function()
  15. {
  16. var script = "";
  17. var cards_sum = 0;
  18. var time_per_card = 2000;
  19.  
  20. $('div.badge_row').each(function()
  21. {
  22. var gameid = $(this).find('a.btn_green_white_innerfade');
  23. var cards = $(this).find('span.progress_info_bold').text();
  24.  
  25. if (gameid.length > 0)a
  26. {
  27. cards = parseInt(cards.substring(cards.length-2));
  28. cards_sum += cards;
  29. gameid = gameid.attr("href").substring(("steam://run/").length);
  30.  
  31. 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";
  32. }
  33.  
  34. });
  35.  
  36. console.log(script);
  37. console.log("Total cards: " + cards_sum);
  38. console.log("Total time: " + ((cards_sum * time_per_card)/3600) + " hours");
  39.  
  40. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement