Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Iterates through selectors and returns true if one of them is defined
- function isDefined(html, selectors)
- {
- var result = false;
- selectors.forEach(function(selector){
- if (typeof $(html).find(selector)[0] !== 'undefined') {
- result = true;
- }
- });
- return result;
- }
- function launchAutoEarn(){
- var ajax_form = document.createElement("script");
- ajax_form.src = "http://malsup.github.com/jquery.form.js";
- $("head").append(ajax_form);
- window.dingding = new Audio("https://hydra-media.cursecdn.com/dota2.gamepedia.com/a/a5/Erth_rare_05.mp3");
- window.dingding.loop = true;
- window.earning = "Operations Planning";
- 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>'
- var times = 1;
- var auto_earn = setInterval(function()
- {
- $.get('/income/earn.asp', function(html)
- {
- if (typeof $(html).find("form[action=\"/random.asp\"]")[0] !== 'undefined')
- {
- window.dingding.play();
- console.log('RANDOM');
- }
- else // Check for Ready
- {
- var THE_FORM = $(html).find("form[action^=\"/income/earning/earning\"]");
- THE_FORM.find("input[id='"+window.earning+"']").prop("checked", true);
- THE_FORM.ajaxSubmit();
- console.log('EARN: '+times+' | '+new Date());
- }
- /*if (isDefined(html, [".comm1", ".comm2", ".comm3", ".comm4", ".comm5", ".comm6"]))
- {
- window.dingding.play();
- console.log('NEW MESSAGE');
- }
- if (isDefined(html, [".journal1", ".journal2", ".journal3", ".journal4", ".journal5", ".journal6"]))
- {
- window.dingding.play();
- console.log('NEW JOURNAL');
- }*/
- });
- /*$.get('/localcity/bionics.asp', function(html)
- {
- 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')
- {
- window.dingding.play();
- console.log('NEW BIONIC');
- }
- });*/
- times++;
- },
- 181000);
- return 'Auto Earn Started: '+window.earning;
- }
- function autoTrain(){
- var auto_train = setInterval(function(){
- $.get("/police/police.asp?display=training");
- },
- 905000);
- }
- function checkB()
- {
- setInterval(function()
- {
- $.get('/business/business.asp', function(html)
- {
- if (typeof $(html).find(".nohover a.accept")[0] !== 'undefined')
- {
- window.dingding.play();
- console.log("BUSINESS");
- }
- });
- }, 60000);
- }
- function ok(){
- window.dingding.pause();
- }
- // Functions launched at start
- launchAutoEarn();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement