This commit is contained in:
Mylloon 2023-09-24 01:32:37 +02:00
parent 9b494cc014
commit bbb323a278
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -18,7 +18,7 @@ if __name__ == "__main__":
# Find the burger
result = matchTemplate(main_image, template_image, TM_CCOEFF_NORMED)
threshold = 0.8
threshold = 0.6
locations = where(result >= threshold)
# Fetch coordinates
@ -27,6 +27,7 @@ if __name__ == "__main__":
# If we find a burger
if len(locations):
coordinates = locations[0]
print(f"Find a golden burger at {coordinates[0]}x{coordinates[1]}")
# Move and click
moveTo(coordinates[0], coordinates[1])
click()