Closed Nuts123 closed 8 years ago
So does it actually refresh the page? At the time of crash, is the game page still loading in the browser like in your screenshot?
there is a sequence: 1) catbomb 2) bot refresh the page 3) bot crash in moment as in the screenshoot 4) bot terminated but game screen loaded
may need to add (config.ini) a delay after the update page?
by the way, there one other problem: catbombs every 5 min after a day of use
@Nuts123 Right now the catbomb recovery just waits 60 seconds before looking for the game start button. I could add a looped check for the button. Not sure how it got past that and crashed at what looks like in the focus_window
function, however.
As for catbombs after every 5 minutes, that's more of an issue with how you might have configured/are using kancolle-auto. If it's set to be aggressive/very active then you'll probably trigger their bot detection. If it's configured to be relatively passive, you should be ok.
Right now the catbomb recovery just waits 60 seconds before looking for the game start button.
Sorry, but judging from the error he is looking for a window immediately after the 'F5 enter TAB enter'
Since you're encountering the cat a lot right now maybe you can test the code. Replace line 426 (wait_and_click(kc_window, Pattern('game_start.png').exact(), WAITLONG)
) with:
while not kc_window.exists(Pattern('game_start.png').similar(0.999)):
sleep(2)
check_and_click(kc_window, 'game_start.png')
O, it's work! But new error
(i use log for test)
This error occurs after the "game start"
But this is not a problem, since on the VBS was written a simple script that restarts the bot on any error
Do: CreateObject("WScript.Shell").Run """C:\Users\maks\Desktop\Sikuli\start.bat""", , True: Loop
start.bat
java -jar sikuli-script.jar -r kancolle-auto-master/kancolle_auto.sikuli
offer users this method to improve the reliability of the bot.
I think that that can be rectified by adding a call to init()
at the end of the catbomb recovery function, so I'm going to add that in, but thanks for providing the vbs workaround.
Sorry that I write here. I found another bug. Sometimes, the bot gets a catbomb when you send an expedition, but writes to the console that the expedition was sent, but the expedition was not sent.
@Nuts123 Wait, so kancolle-auto presses the expedition start button, but upon doing so, the game catbombs, and if you reload the game, the expedition was never sent?
I could account for this, but it really does seem like you're encountering a lot more catbombs than the average user of this bot is... perhaps tweak your settings so it's less likely to trigger bot detection, or come back to the bot after a day or two of taking a break from it?
Wait, so kancolle-auto presses the expedition start button, but upon doing so, the game catbombs, and if you reload the game, the expedition was never sent?
Yes, sometimes
I could account for this, but it really does seem like you're encountering a lot more catbombs than the average user of this bot is... perhaps tweak your settings so it's less likely to trigger bot detection, or come back to the bot after a day or two of taking a break from it?
I tried to not enter the game 1.5 days, but it did not help...
@Nuts123 I'm a bit hesitant to add the post-expedition catbomb recovery because I don't know how many other people are plagued by that particular issue, but I'm going to test it for a bit to see. If you want the code, it's this. Replace expedition_action()
in kancolle_auto.py
with this:
def expedition_action(fleet_id):
global kc_window, fleet_needs_resupply, expedition_item, settings
for expedition in expedition_item.expedition_list:
if fleet_id == 'all':
pass
else:
if fleet_id != expedition.fleet_id:
continue
while expedition_item.run_expedition(expedition):
fleet_needs_resupply[expedition.fleet_id - 1] = True
check_and_click(global_regions['game'], 'menu_side_resupply.png')
resupply()
expedition_item.go_expedition()
fleet_needs_resupply[expedition.fleet_id - 1] = False
sleep(2)
if kc_window.exists('catbomb.png') and settings['recovery_method'] != 'None':
refresh_kancolle('Post-expedition crash')
Environment details
Issue
Console log (if applicable)
Relevant config snippet (if applicable)