Sleazy Fork is available in English.

HaremHeroes Automatic

Open the menu in HaremHeroes(topright) to toggle AutoControlls. Supports AutoSalary, AutoContest, AutoMission, AutoQuest, AutoTrollBattle, AutoArenaBattle and AutoPachinko(Free). Messages are printed in local console.

< Opinie na HaremHeroes Automatic

Ocena: OK - skrypt działa, ale ma błędy

§
Napisano: 25-06-2018
Edytowano: 25-06-2018

Salary Loop

The Autosalary doesn't work well anymore, still loop even when there's no money to collect.

§
Napisano: 25-06-2018

its something to do with the code that reads for the nextfetchtime. It goes undefined.

Time to fetch salary. VM10654 userscript.html:285 Navigating to Harem window. VM10654 userscript.html:647 autoLoop Disabled VM10682 userscript.html:471 Time to fetch salary. VM10682 userscript.html:277 Detected Harem Screen. Fetching Salary VM10682 userscript.html:476 Salary fetched. Getting next fetch time VM10682 userscript.html:478 Moving to home. VM10714 userscript.html:476 Salary fetched. Getting next fetch time VM10714 userscript.html:499 New fetch time stored in nextSalaryTime cookie.(+undefined sec.)

§
Napisano: 25-06-2018

It looks like the devs changed how the salary timer object works. I'm trying to patch it now.

§
Napisano: 25-06-2018

I've made a fix that auto checks every 30 seconds until I (or the author) can find where the devs have hidden the salary timers.

Change line 345 as follows

From Cookies.remove('nextSalaryTime') To Cookies.set('nextSalaryTime',closestTime,{expires:new Date(new Date().getTime() + 30 * 1000)});

MAT
§
Napisano: 25-06-2018

@Muffinmans said: I've made a fix that auto checks every 30 seconds until I (or the author) can find where the devs have hidden the salary timers.

Change line 345 as follows

From Cookies.remove('nextSalaryTime') To Cookies.set('nextSalaryTime',closestTime,{expires:new Date(new Date().getTime() + 30 * 1000)});

Thanks

§
Napisano: 26-06-2018

my line 345 isn't that but it works kind of. I found that line of Cookies.remove tho on the line after.

there is this error in the console tho. error {class: "Girl", who: "185685", action: "getsalary"} Arguments(3) [{…}, "error", "", callee: ƒ, Symbol(Symbol.iterator): ƒ] error {class: "Girl", who: "121", action: "getsalary"} Arguments(3) [{…}, "error", "", callee: ƒ, Symbol(Symbol.iterator): ƒ] error {class: "Girl", who: "4439873", action: "getsalary"} Arguments(3) [{…}, "error", "", callee: ƒ, Symbol(Symbol.iterator): ƒ] error {class: "Girl", who: "185682", action: "getsalary"} Arguments(3) [{…}, "error", "", callee: ƒ, Symbol(Symbol.iterator): ƒ] error {class: "Girl", who: "73", action: "get_salary"} Arguments(3) [{…}, "error", "", callee: ƒ, Symbol(Symbol.iterator): ƒ]

with this on the end of them VM334 phoenix-default-52993412.js:7636

§
Napisano: 26-06-2018

That happens when the Harem page loads too slowly. They are harmless errors.

§
Napisano: 26-06-2018

@Muffinmans said: I've made a fix that auto checks every 30 seconds until I (or the author) can find where the devs have hidden the salary timers.

Change line 345 as follows

From Cookies.remove('nextSalaryTime') To Cookies.set('nextSalaryTime',closestTime,{expires:new Date(new Date().getTime() + 30 * 1000)});

Changing autoSalary block of autoLoop

https://openuserjs.org/scripts/eileen12/HaremHeroesAutomatic/issues/hareminaopenandclose_loop#comment-1643e4ca7f7

if (sessionStorage.autoSalary === "true" && busy === false) {
        Cookies.set('possibleSalaryTime', Number($("#collect_all .sum").attr('amount')));
        if (!isNaN(Cookies.get("possibleSalaryTime"))) {
            Cookies.set('nextSalaryTime', Cookies.get("possibleSalaryTime"));
        }
        if (Cookies.get("nextSalaryTime") > 0) {
          console.log("Time to fetch salary.");
          getSalary();
          busy = true;
        }
        else if (Cookies.get("nextSalaryTime") === "none") {
            if ($("nav div[rel='content'] a:has(.home)").attr("href") !== window.location.pathname) {
                console.log("Moving to home.");
                sessionStorage.autoLoop = "false";
                // Goto Home page.
                window.location = window.location.origin + $("nav div[rel='content'] a:has(.home)").attr("href");
                busy=true;
                return;
            }
            busy = false;
        }
    }

Odpowiedz

Zaloguj się, by odpowiedzieć.