Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sogoeslight committed Sep 22, 2020
1 parent 775e7c1 commit 694aa2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gameplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))

Expand Down
10 changes: 6 additions & 4 deletions menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down

0 comments on commit 694aa2f

Please sign in to comment.