Krach64 / lol-bot-leveling-free

Free Leveling Bot. Interested to develop deep learning, mp me if interested.
4 stars 4 forks source link

Waiting for game to start #3

Closed aASDa213ASD closed 3 years ago

aASDa213ASD commented 3 years ago

In the code of bot last two stings are commented, so they're not in use. While then it makes another issue - if you skip this check sometimes (actually 99%) once loading screen appears bot say "1 out of X games completed; Queuing for the game; Bot stuck - Restart; Awaiting login"

And all of this stuff is on loading screen on the first game. I tried to uncomment those two lines and on my previous run on vmware it was working perfectly fine somehow (im using the same build of the bot just in case), but now it just doesn't detect that we're ingame regardless of what I do. Tried to make recall = "Capture.png/make own recall screenshot/use original recall.png from this bot" and nothing.


>     utilities.set_status('Waiting for game to start...')
> 
>     # Wait until recall is visible, then we know we're in game
>      while not attempt_to_click_on(pictures.recall, None, is_game=True, click=False) or attempt_to_click_on(pictures.cam, None, is_game=True, click=False):
>          pause_if_needed()
aASDa213ASD commented 3 years ago

One more thing - If I press space or Y to lock screen manually - works fine.

Krach64 commented 3 years ago

First, in the last version, there is no need to press button to lock screen manually, the bot do it alone and detect when he is not in camera lock. Never had the issue of finished game when it's not. I think, this is a problem of confident image detection. I will make an update and uncomment this 2 lines.

aASDa213ASD commented 3 years ago

I've fixed that thing by placing trytoclickoncam before those 2 lines. So it's like "Waiting for game to start" > lock screen if possible > check if screen is locked (actually it is) > and boom we're ingame, correctly detected everything.

# Wait until recall is visible, then we know we're in game
    attempt_to_click_on2(pictures.cam, regions.accept, 'y', conf=0.9)
    while not attempt_to_click_on(pictures.recall, None, is_game=True, click=False) or attempt_to_click_on(pictures.cam, None, is_game=True, click=False):
        pause_if_needed()