hphphp User

I did some testing of my own. The problem is that the popups take a bit of time to load. The code breaks because the popup comes after the if-test for popup has already happened. If the if-clause is executed with a delay of about 10ms, the code should work.

I came up with a very dirty solution for my own code. Inside the doBattle() function, inside "if(page===arena)" I simply added "unsafeWindow.reload();" in the very beginning. This way, every time arena is brought up, the page refreshes first no matter what, then everything else happens. I also deleted the if/else inside "if(page===arena)" regarding the popup.

I have been running this now for more than a week and works flawlessly.


I wish I had my console logs to show you but this always happens when I away from my computer for a long time.

The webpage keeps coming back to the arena page, but it does nothing there, although there are battles to be had. All other functions of the script work flawlessly during this time. As if the script thinks the arena page was opened manually, but there is nothing for it to do there. So after each function, it comes back to that page.

The issue is always resolved by deleting the nextArenaTime cookie. Also, important to note that AutoArena works just fine until this happens.

If I managed to hunt down the console log when this occurs next time, I'll post it here.

I think the problem has something to do with the daily battle rewards, since this seems to always happen after my rewards are all collected (speaking of which, how the script deals with the pop-ups of the rewards, seems very inconsistent. Sometimes they go away instantly, sometimes it takes a while. Also, one time I had to get rid of it manually for the script to get back to business).