diff --git a/gameplay.py b/gameplay.py index 15035f7..d6e92d8 100644 --- a/gameplay.py +++ b/gameplay.py @@ -45,7 +45,7 @@ def simulate(enable_simulation): # check if did not close buy window try: - m.move_to(settings.safe_point[0], settings.safe_point[1], random.uniform(0.1, 0.2)) + m.move_to(settings.safe_point[0], settings.safe_point[1], 0.1) x, y, w, h = pyautogui.locateOnScreen('resources/' + settings.resolution_string + '/guns/phantom.png', confidence=.7) m.move_to(x + random.randint(10, w - 10), y + random.randint(10, h - 10)) @@ -108,7 +108,7 @@ def simulate_movements(): def buy(): k.press_button('b') - m.move_to(settings.safe_point[0], settings.safe_point[1], random.uniform(0.1, 0.2)) + m.move_to(settings.safe_point[0], settings.safe_point[1], 0.1) gun = random.randint(0, 2) time.sleep(random.uniform(0.15, 0.25)) diff --git a/menu.py b/menu.py index b7f816b..ef45434 100644 --- a/menu.py +++ b/menu.py @@ -89,11 +89,13 @@ def queueing(again): needed_pic = "/match_found.png" try: - settings.safe_point = pyautogui.locateCenterOnScreen('resources/' + settings.resolution_string - + '/friends.png', confidence=.85) - m.move_to(settings.safe_point[0], settings.safe_point[1], 0.1) + pos = pyautogui.locateCenterOnScreen('resources/' + settings.resolution_string + + '/friends.png', confidence=.85) + settings.safe_point = pos[0], pos[1] except TypeError: - m.move_to(settings.resolution_x * 0.92, settings.resolution_y * 0.1, 0.1) + pass + + m.move_to(settings.safe_point[0], settings.safe_point[1], 0.1) # TODO: handle it somehow # try: diff --git a/settings.py b/settings.py index cfce757..6cbfc30 100644 --- a/settings.py +++ b/settings.py @@ -11,7 +11,7 @@ resolution_string = "QHD" border = 20 -safe_point = resolution_x * 0.95, resolution_y * 0.05 +safe_point = resolution_x * 0.9, resolution_y * 0.13 valorant_location = '"C:\Riot Games\Riot Client\RiotClientServices.exe" --launch-product=valorant ' \ '--launch-patchline=live '