linus-jansson / btd6farmer

A tool to make autonomous macros in Bloons Td 6. Relies on OCR and template matchmating for navigation. Made in python
https://discord.gg/qyKT6bzqZQ
MIT License
32 stars 11 forks source link

Crashing if Obyn is not selected #20

Closed jason00-r closed 2 years ago

jason00-r commented 2 years ago

I have Etienne selected as my hero, and it prints the selecting obyn message and then crashes:

python main.py "\\Instructions\\Dark_Castle_Hard_Standard"
Setting up Bot...
Setup Complete.
Waiting for 5 seconds... Please select the Bloons TD 6 window during this time.
Selecting obyn if not selected
Traceback (most recent call last):
  File "C:\Users\Jason\Downloads\btd6farmer-main\main.py", line 43, in <module>
    bot.hero_select()
  File "C:\Users\Jason\Downloads\btd6farmer-main\bot.py", line 333, in hero_select
    utils.button_click(self.settings["HERO"])
  File "C:\Users\Jason\Downloads\btd6farmer-main\l_utils.py", line 118, in button_click
    move_mouse(scaling(static.button_positions[btn]))
KeyError: 'OBYN'
jason00-r commented 2 years ago

Although if I have Obyn preselected it goes and starts a game and then runs fine.