eileen12 / HaremHeroes Automatic

there is 2 options for the autotrollbattle now, 1 for x1 that uses the energy you have and 1 for x10 that uses 2 koban for harem heroes.

the reason the autotrollbattle is not working is they updated and changed the boss battles to where you can spend kobans to do ten battles in one go but the arena i have no clue

Re: @MrKeeney:
They code for the arena has changed as well and has a different button as well. So it was not just troll battle that was changed.

I might have a temporary fix soon. I've gotten the troll battles working slightly. Need to recharge for another text and also test arena battles

Re: @twelve27:

Actually it seems it will be hard to get both working since the function to do boss battles and arena battles are not decoupled.

I can only seem to get one or the other going. Will keep looking into this though. Unless it is updated before I find some worthwhile solution

Quick and dirty fix:

In the doBattle() function, everywhere you see:

battleButton.attr("price");

change it to:

battleButton.attr("price_fe");

That _fe is what you have to add to make it work. This works flawlessly for auto arena but when you do auto troll then the prompt for spending 12 kobans for the new 10 battle system will appear. Not to worry, no kobans will actually be spent when you do this. The pop up prompt is just an ugly thing that shows up that I can't see how to resolve right now.

The solution for auto troll that I had tested was changing the button in addition to adding _fe.

It was:

var battleButton = $("#battle_middle button[rel='launch']");

and I had it changed to:

var battleButton = $("#battle_middle button[rel='launch' price_fe='1']");

But that will not work on the auto troll screen. At least if you do the temporary fix you can do both auto troll and auto arena.

I should add that this solution is just what I came up with when not splitting the doBattle() function. If its going to get split then I'll leave that to eileen12 since posting that in comments for people to implement seems like it would be a hassle.

Re: @Pitichou:
Awesome. And I'll have to place it into my local version of the script to test out later on today.

And it fixes both troll battle and arena battle?

Just tested that other battleButton. It functions with troll battle but does not function for arena battle.

they will need to be split troll battle button is price_fe 1 and the arena is a 0
but thanks for the fix for the troll battle