eileen12 / HaremHeroes Automatic

Hi today it broke, it stays only at arena battle not doing anything else

actually i installed the addon and i activated another option first , and it got stuck to that , so even if i try to disble that after refresh it keep reactivating it automatically. So i think they changed smth in game and it interferes with that addon

Looks like they removed the timers completely. I'm out of time today to research, I'll try again later.

Ok, final point of clarification for fellow devs. The HHTimers are gone, any other workarounds still work.

So Auto Troll and Auto Salary seem functional for now

Of course HHTimers are not gone. They just added energy timers, which don't have $elm. Here are changes that seem to work for me:

--- HaremHeroes_Automatic.user.js       2018-07-24 21:45:06.948340700 +0200
+++ HaremHeroes_Automatic.user.js.changed       2018-07-24 21:45:19.038032200 +0200
@@ -346,7 +346,7 @@
             }
             var time = 0;
             for(var e in unsafeWindow.HHTimers.timers){
-                if(unsafeWindow.HHTimers.timers[e].$elm.selector.includes("#missions_counter"))
+                if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timers[e].$elm.selector.includes("#missions_counter"))
                     time=unsafeWindow.HHTimers.timers[e];
             }
             time = time.remainingTime;
@@ -354,7 +354,7 @@
             {
                 //try again with different selector
                 for(e in unsafeWindow.HHTimers.timers){
-                    if(unsafeWindow.HHTimers.timers[e].$elm.selector.includes(".after_gift"))
+                    if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timers[e].$elm.selector.includes(".after_gift"))
                         time=unsafeWindow.HHTimers.timers[e];
                 }
                 time = time.remainingTime;
@@ -388,7 +388,7 @@
         // need to get next contest timer data
         var time = 0;
         for(var e in unsafeWindow.HHTimers.timers){
-            if(unsafeWindow.HHTimers.timers[e].$elm.selector.includes(".contest_timer"))
+            if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timers[e].$elm.selector.includes(".contest_timer"))
                 time=unsafeWindow.HHTimers.timers[e];
         }
         time = time.remainingTime;
@@ -397,7 +397,7 @@
             //try again with different selector
             time = undefined;
             for(e in unsafeWindow.HHTimers.timers){
-                if(unsafeWindow.HHTimers.timers[e].$elm[0].className.includes("contest_timer"))
+                if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timers[e].$elm[0].className.includes("contest_timer"))
                     // get closest time
                     if(!(unsafeWindow.HHTimers.timers[e].remainingTime>time))
                         time=unsafeWindow.HHTimers.timers[e].remainingTime;
@@ -567,7 +567,7 @@
                 console.log("No arena opponents found, storing nextArenaTime...")
                 var arenatime = 0;
                 for(var e in unsafeWindow.HHTimers.timers){
-                    if(unsafeWindow.HHTimers.timers[e].$elm.selector.startsWith(".arena_refresh_counter"))
+                    if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timers[e].$elm.selector.startsWith(".arena_refresh_counter"))
                         arenatime=unsafeWindow.HHTimers.timers[e];
                 }
                 arenatime = arenatime.remainingTime;
@@ -676,7 +676,7 @@
             $("#pachinko button[free=1]")[0].click();
             var npach;
             for(var e in unsafeWindow.HHTimers.timersListMin){
-                if(unsafeWindow.HHTimers.timersListMin[e].$elm.selector.startsWith(".pachinko_change"))
+                if(typeof unsafeWindow.HHTimers.timers[e].$elm != "undefined" && unsafeWindow.HHTimers.timersListMin[e].$elm.selector.startsWith(".pachinko_change"))
                     npach=unsafeWindow.HHTimers.timersListMin[e].remainingTime;
             }
             if(npach !== undefined || npach !== 0)

Those changes do work now to combat the undefined errors that love this script in general.

strange ,so for you salary works but area doesn't ,and for me is the opposite :(

i use opera not Mozilla, ill try other browsers to see if it works

Weirdest thing for me is that the entire script works flawlessly minus the arena popups and mission popup for the end gift (25 kobans). Those two always want to freeze the page but other than those quirks I don't have any issues, well now considering I fixed the undefined error that pachinko was loving.

just tryed on chrome, same thing money are not collected, and i also seen that if i click the logo or enter anythign like shop or arena, or harem, all the options that are enabled in the scrip get disabled..i rly do not know what to do to get salary working :(

Re: @spheedy:

That seems to be a weird problem that I wouldn't be able to recreate if I tried. I would have to see a video of what is happening in both the game and the console to even start to be able to guess the cause.

i can use teamviewer if you want to test it on my versions , i have it installed on all 3 browsers (opera chrome and mozila )but tomorrow, since now i need to sleep is very late.

let me know if you want and how to msg you

Re: @spheedy:

If I had a decent way to get in contact with people I wouldn't mind. Too bad the site doesn't seem to have a private message system.

ok , so i finally fixed it , after reinstalling windows and all browsers now it works. I hope it will remain working

i'm sorry for bugging you guys so much