forked from mistakenchicken/gt7-extramenus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gt7-extramenus-original-optimized-slow-network.py
109 lines (87 loc) · 2.37 KB
/
gt7-extramenus-original-optimized-slow-network.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import time
import argparse
import pyautogui
DEFAULT_DELAY = 0.75
STARTUP_DELAY = 5
def press(key: str) -> None:
"""Press a key.
Using vanilla `pyautogui.press()` will not register the keystroke
because GT requires you hold a keypress for a small duration."""
with pyautogui.hold(key):
time.sleep(0.2)
time.sleep(DEFAULT_DELAY) # delay after any press
def hold(key: str, duration: float) -> None:
"""Hold a key for some duration."""
with pyautogui.hold(key):
time.sleep(duration)
def sleep(seconds: float):
time.sleep(seconds)
def focus_window():
"""Focus the window by clicking on the center of the primary screen."""
# Click center of screen to focus remote play window.
# You can reposition and resize remote play window, just
# make sure you update where you click. I don't know how to
# use pyautogui in headless mode.
print(
"Using startup delay of "
+ str(STARTUP_DELAY)
+ " seconds. Switch to PS Remote Play window now"
)
time.sleep(STARTUP_DELAY)
def start_exploit(section):
"""Begin a cycle"""
print(" [-] Entering Cafe.")
press("enter")
sleep(5)
press("left")
press("enter")
press("down")
press("right")
press("enter")
press("up")
if section == "ROTARY":
press("right")
press("right")
# Inside Rotary Engine
press("enter")
press("enter")
sleep(1) # Exploiting
press("escape")
press("escape")
press("escape")
sleep(5)
# Back to map to open ticket
press("right")
press("enter")
sleep(5)
press("right")
press("right")
press("right")
press("enter")
press("enter")
press("enter")
print(" [-] Opening ticket.")
sleep(16)
# Accepting any kind of ticket, avoids using image detection
press("enter")
sleep(10)
press("enter")
sleep(5)
press("enter")
press("enter")
print(" [-] Accepting ticket.")
press("enter") # accept ticket
# Back out of tickets
print(" [-] Going back to map.")
press("escape")
press("escape")
sleep(4)
press("left") # Place cursor on Menu to start over
if __name__ == "__main__":
cycles = 0
focus_window()
while True:
start_exploit("")
start_exploit("ROTARY")
cycles += 1
print(" [+] Cycles completed: " + str(cycles))