Closed SP-l33t closed 10 months ago
Sounds good, I'll take a look this weekend and get back to you. Glad to have you on board!
How could I increase the loading time before it terminates the instance and attempts to reconnect?
If you are talking about increasing max game length, then you need to change MAX_GAME_TIME in game.py file. Otherwise I need some more details and logs.
I have a machine that is using a slow hard drive, and the loading screen takes so long that the bot terminates the game instance and tries to reconnect, resulting in an infinite cycle and failure to connect to the game. However, I haven't located where specifically in the code it addresses the loading screen time, and I would like to increase it a bit.
On my computer, which has an SSD, I've never had this issue. It's only on the machine with a slow HDD that the game never starts. After a few minutes, when it's almost finished loading and about to enter the game, the bot invokes the command KILL_LEAGUE = 'TASKKILL /F /IM "League of Legends.exe"', and then it tries to reconnect again, causing an infinite loop.
But it's just a detail; I'm not sure if I did it in the best way, but I ended up increasing the parameters below, and it seems to have solved the problem.
self.log.debug("Waiting for game window to open")
for i in range(600):
self.log.debug("Connecting to game server...")
for i in range(600):
if not utils.exists(utils.LEAGUE_GAME_CLIENT_WINNAME):
raise utils.WindowNotFound
if self.connection_errors == 1000:
if not utils.exists(utils.LEAGUE_GAME_CLIENT_WINNAME):
raise utils.WindowNotFound
if self.connection_errors == 1000:
@mynothingg yea that is the correct place to solve the issue. Glad its working for you now..
Closed. Futher discussions will be moved to the Pull Request.
Hey!
I've added some new features to your bot in my Pull Request.
I can add some more. If you have any good ideas, I might take a look and see if I can implement.