eileen12 / HaremHeroes Automatic

I'm just wondering if anyone else is trying to fix this script. If not, then I'll try.

yes another patch it broke again. I hope this fine ppl who make this script can help again,

Look at this new piece of code I found:

function is_cheat_click(e) {
    function is_cheater(e) {
        e.preventDefault();
        e.stopPropagation();
        e.stopImmediatePropagation();
        return true
    }
    var items = ["offset", "page", "screen", "client"], ne = 0, i;
    for (i in items) {
        if (items[i] + "X"in e && items[i] + "Y"in e) {
            if (0 === e[items[i] + "X"] && 0 === e[items[i] + "Y"]) {
                return is_cheater(e)
            }
        } else {
            ++ne
        }
    }
    return items.length === ne ? is_cheater(e) : false
}

:)

Re: @alnmawi:
I just noticed it too. Getting around that function itself would be the easiest way to resolve this. Otherwise there would be an annoying amount of changes to do from what i can tell.

Would it be easier to just set a subscript inside the script to set the condition to false? or just block the function

I'm not sure. I'm looking into it now. I haven't ever tried to use this to block out scripts. Looking into some solutions and testing stuff out on how to make the function return false.

Can it be possible for someone to modify it so that it collects money from home button for people who have the monthly card? I am guessing that this will not be affected by the new "cheat" code . I ma only interested in arena and money collection , with monthly card active ?

Thank you very much for your work and dedication

Look at the comment section for the other site with the code here:
https://greasyfork.org/en/forum/discussion/43207/x

That thread talks about a way to edit the script so it works again. I've been testing it out and it seems to work. Although I'll see if I can cut it down and edit the usage of that line as necessary when I can. But either way it looks like a solution is available and its to pretty much "overwrite" the function from the game

yea that works, thank you, but anyone could make a version for monthly card so it does not enter the girl page and start collecting instead of just click when it appears

@alnmawi I don't know that I would have found that code snippet, so I probably wouldn't have done a very good job of fixing this. Great find.

@twelve27 Thanks for posting a link to the solution. I seriously doubt I would have come up with as clean of a fix, so I'm glad that more experienced minds addressed the problem.

Should we fork the code so that working code is on this site as well?

I have a version that works. My issue is that the website developers know about the scripts getting uploaded to OpenUser. In the last updated they added a function that is designed to prevent auto salary and auto pvp. I got around it but I don't want the website to know how I did it or they'll just change it again. I think the best way forward is to obfuscate what we upload here but I don't know if that is against OpenUser standards.

Re: @scriptdoog:
Yeah, its a really good solution. I was trying to replace the is_click_cheat function to return false but I didn't have it before every click. I only had it in one part of the code and it didn't work for every function for me.

Re: @Ally_E:
No problem. When something goes wrong with the script I tend to look on both here and greasy fork since the code is kept on both sites. My fix wasn't going to be as clean since the original thought I had didn't work and I was planning to simulate Mouseclick events with some coordinates in there.

Re: @MrCoder:
And how exactly do your prevent the game developers from getting this code you have if you were to deliver it to anyone else and not keep it for yourself? The devs will always work to stop us from automating the crappy parts of the game. Like when they destroyed their timers to be worse or changed element names unnecessarily. This cheat check is the most direct way they've addressed this as far as I can tell. If you have your code available to anyone else at all, it seems like they'll still work to stop your script.

At the very least, we got around the most recent block that the patch caused already.

I don't know if anyone else is having this problem, but I'm a Chromebook user and everything was working until AutoArena stopped working. If so, then try changing line 830 of the pastebin code to the following:

if( ( Cookies.get("nextArenaTime") === undefined ) || ( Cookies.get("nextArenaTime") === "undefined" ) )

That's working for me today. I'm hoping it'll still work after the daily reset.

@jpaa128 The script here hasn't been updated, but links have been posted to a working script. See the replies from twelve27 on 28 Sep, or scriptdoog on 28 Sep. I still think that we should fork a working script, but I'm deferring to those with more experience since I wasn't responsible for the fix. Maybe if I get super ambitious and add any fixes or functionality to the script, then I'll fork it.