twelve27 User

Re: @3jameo3:

I'm not sure what it returns nothing even if the collect button is not visible yet. For some reason the span is empty sometimes and

var CAB = $("#collect_all_bar .in").text();

evaluates to ""

Still looking into what the game is doing that it happens like that.


We could check the the length of CAB is 0 or if it does not include h, m, or s and take a certain action for there. I'm just not sure why that span becomes empty after a while. Maybe we'll have to navigate to check the harem page for the value


Re: @3jameo3:
Next time I have a quest available I'll try to look at it as well.

For now, it seems what CAB is being set to returns nothing.


Re: @3jameo3:

Not sure either but if I figure it out then I will let you know.

Select autobattle is a good idea since I don't want to fight the very last troll at the moment.

What is wrong with auto questing? I can't test it right now because I have no more quests available at the moment.


Re: @3jameo3:
Yeah, I removed that portion with isNan. What I was actually looking at right now is that the script randomly stopped and next salary time was undefined. Clearing cookies solved the problem but temporarily. But I'll just start testing the other script you have for the entire site and see if the error reproduces itself.

Good work, again. Makes me want to brush up on my javascript skills way more. Maybe I'll see if I can add other features over time


Re: @3jameo3:
Sure, I'll let you know if I come up with anything that will be helpful. I'm actually trying to insert your auto salary script in now with what I have to see if it will work. Its not reacting for me so far so I'll have to debug for now.


Re: @3jameo3:

Nice going, 3jame03! I've been trying to do some jQuery to try and find a working solution that requires as little change to eileen12's code as possible but haven't found anything truly viable so far.


Re: @3jameo3:
Thanks. Now that I have some free time I'll be trying to see if I can work something, if anything, out with the changes.


Re: @Marti:
Thanks! Appreciate the fix for me. I'll be sure to make use of the preview button in the future.

Re: @3jameo3:
Nice! Looks good. I'll continue taking a look to see if I can find a fix as well but this fix seems really good regardless. I'll have to try to make use of it later today.


Oops, I've messed up the code snippets in my post above but they are still pretty legible. I can't edit the post


You're right. I should say that the display for them is different and that the change broke the scripts. I've been working on it as well but I am a bit rusty with javascript. So I've been having issues pulling the relevant data before setting the number of seconds in the cookies.

In eileen's script there are calls like

var energyCurrent = Number($("span[hero='energy_quest']").text());

and

Number($("div[hero='soft_currency'] span").text()

which might be helpful in pulling the spans.


Now that the developers have broken the timers with a terrible update, does anyone have changes they use to make auto salary work again? Auto pachinko might be messed up as well since it is based on a timer. Salary is the most useful part of the script for me and now I have to either pause the script or open up a new tab to continue playing the game without the script continually setting the next salary time to zero seconds.

Anyone have a working solution for this breaking change?


Re: @3jameo3:
No problem. Coincidentally I was actually about to test out a few different solutions to the issue and saw you posted one as well. I think I might switch to what you are using since its so close to what @eileen12 already had.


Hopefully :@eileen12: will be able to update the script soon. Its really great but the updates on the game seem like they might break it from time to time.


Re: @3jameo3:

It looks like one of the game updates broke this specific functionality. When I was debugging I found that the line

var moneyCurrent = Number($("div[hero='soft_currency'] span").text().trim().replace(',', ''));

was evaluation to NaN and that would cause us to always hit the next upcoming return statement because

if(proceedCostMoney <= moneyCurrent)

would not evaluate properly.

Instead I have fixed this locally by changing the original evaluation of moneyCurrent to:

 var moneyCurrent = Number($("div[hero='soft_currency'] span").get(0).innerHTML.trim().replace(',', '')); //Number($("div[hero='soft_currency'] span").text().trim().replace(',', ''));

Of course people can feel free to remove the commented code there. The above resolved my issue and let the auto quest function work again because moneyCurrent evaluated properly instead of NaN and so the if condition evaluated properly and did not hit a return statement. This let me finally hit the ```
proceedButtonMatch.click();

that I wasn't hitting before.