Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. // Iterates through selectors and returns true if one of them is defined
  2. function isDefined(html, selectors)
  3. {
  4. var result = false;
  5. selectors.forEach(function(selector){
  6. if (typeof $(html).find(selector)[0] !== 'undefined') {
  7. result = true;
  8. }
  9. });
  10. return result;
  11. }
  12.  
  13. function launchAutoEarn(){
  14.  
  15. var ajax_form = document.createElement("script");
  16. ajax_form.src = "http://malsup.github.com/jquery.form.js";
  17. $("head").append(ajax_form);
  18.  
  19. window.dingding = new Audio("https://hydra-media.cursecdn.com/dota2.gamepedia.com/a/a5/Erth_rare_05.mp3");
  20. window.dingding.loop = true;
  21. window.earning = "Operations Planning";
  22.  
  23. var hospital = '<form method="POST" action="hospital.asp"> <div id="holder_content"> <div class="links"> <table style="margin-left:25px"> <tbody><tr> <td><a href="hospital.asp?display=patients">PATIENTS</a></td><td><a href="hospital.asp?display=costs">HOSPITAL STAFF/COSTS</a></td><td><a href="hospital.asp?display=tattoo">TATTOO REMOVAL</a></td><td><a href="hospital.asp?display=bionic">BIONIC IMPLANTS</a></td></tr><tr> <td><a href="detox.asp">DETOX / REHAB CLINIC</a></td><td><a href="hospital.asp?display=recover">RECOVER FROM INJURY</a></td><td><a href="hospital.asp?display=apply">APPLY FOR SURGERY</a></td><td><a href="hospital.asp?display=sexchange">APPLY FOR A SEX CHANGE</a></td></tr><tr> </tr></tbody></table> </div><center><table border="1" style="border: 1px solid #000; text-align:center"> <tbody><tr> <td colspan="4" class="column_title">SURGERY</td></tr><tr> <td class="display_border" colspan="4">There are currently no patients at the Hong Kong Hospital...</td></tr><tr> <td colspan="4" class="column_title"> DNA </td></tr><tr> <td class="display_border" colspan="4">There are currently no DNA samples in for testing at the Hong Kong Hospital...</td></tr></tbody></table> </center></div></form>'
  24.  
  25. var times = 1;
  26. var auto_earn = setInterval(function()
  27. {
  28. $.get('/income/earn.asp', function(html)
  29. {
  30. if (typeof $(html).find("form[action=\"/random.asp\"]")[0] !== 'undefined')
  31. {
  32. window.dingding.play();
  33. console.log('RANDOM');
  34. }
  35. else // Check for Ready
  36. {
  37. var THE_FORM = $(html).find("form[action^=\"/income/earning/earning\"]");
  38. THE_FORM.find("input[id='"+window.earning+"']").prop("checked", true);
  39. THE_FORM.ajaxSubmit();
  40.  
  41. console.log('EARN: '+times+' | '+new Date());
  42. }
  43.  
  44. /*if (isDefined(html, [".comm1", ".comm2", ".comm3", ".comm4", ".comm5", ".comm6"]))
  45. {
  46. window.dingding.play();
  47. console.log('NEW MESSAGE');
  48. }
  49.  
  50. if (isDefined(html, [".journal1", ".journal2", ".journal3", ".journal4", ".journal5", ".journal6"]))
  51. {
  52. window.dingding.play();
  53. console.log('NEW JOURNAL');
  54. }*/
  55. });
  56.  
  57. /*$.get('/localcity/bionics.asp', function(html)
  58. {
  59. if ($($(html).find("form[action=\"bionicpurchase.asp\"] tr")[5]).find("td")[3].textContent != '0' || $($(html).find("form[action=\"bionicpurchase.asp\"] tr")[4]).find("td")[3].textContent != '0')
  60. {
  61. window.dingding.play();
  62. console.log('NEW BIONIC');
  63. }
  64. });*/
  65.  
  66. times++;
  67. },
  68.  
  69. 181000);
  70.  
  71. return 'Auto Earn Started: '+window.earning;
  72. }
  73.  
  74. function autoTrain(){
  75. var auto_train = setInterval(function(){
  76. $.get("/police/police.asp?display=training");
  77. },
  78. 905000);
  79. }
  80.  
  81. function checkB()
  82. {
  83. setInterval(function()
  84. {
  85. $.get('/business/business.asp', function(html)
  86. {
  87. if (typeof $(html).find(".nohover a.accept")[0] !== 'undefined')
  88. {
  89. window.dingding.play();
  90. console.log("BUSINESS");
  91. }
  92. });
  93. }, 60000);
  94. }
  95.  
  96. function ok(){
  97. window.dingding.pause();
  98. }
  99.  
  100. // Functions launched at start
  101. launchAutoEarn();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement