forked from jfd02/TFT-OCR-BOT
-
Notifications
You must be signed in to change notification settings - Fork 2
/
screen_coords.py
147 lines (118 loc) · 3.74 KB
/
screen_coords.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
"""
Contains static screen coordinates the bot uses
Screen coords for 1920x1080 screens
(x, y, x+w, y+h) for Vec4 locations, (x, y) for Vec2 locations
"""
from vec4 import Vec4, GameWindow
from vec2 import Vec2
BENCH_HEALTH_POS: list[Vec4] = [
Vec4(GameWindow(369, 622, 472, 757)),
Vec4(GameWindow(485, 622, 588, 757)),
Vec4(GameWindow(601, 622, 704, 757)),
Vec4(GameWindow(728, 622, 831, 757)),
Vec4(GameWindow(844, 622, 947, 757)),
Vec4(GameWindow(960, 622, 1063, 757)),
Vec4(GameWindow(1076, 622, 1179, 757)),
Vec4(GameWindow(1192, 622, 1295, 757)),
Vec4(GameWindow(1308, 622, 1411, 757)),
]
ITEM_POS: list[list] = [
[Vec2(273, 753), Vec4(GameWindow(373, 794, 611, 824))],
[Vec2(348, 737), Vec4(GameWindow(451, 778, 689, 808))],
[Vec2(289, 692), Vec4(GameWindow(391, 734, 629, 764))],
[Vec2(356, 676), Vec4(GameWindow(458, 717, 696, 747))],
[Vec2(307, 631), Vec4(GameWindow(410, 674, 648, 704))],
[Vec2(323, 586), Vec4(GameWindow(422, 623, 658, 659))],
[Vec2(407, 679), Vec4(GameWindow(507, 721, 745, 751))],
[Vec2(379, 632), Vec4(GameWindow(482, 674, 721, 704))],
[Vec2(396, 582), Vec4(GameWindow(497, 625, 735, 655))],
[Vec2(457, 628), Vec4(GameWindow(559, 670, 797, 701))],
]
ROUND_POS: Vec4 = Vec4(GameWindow(767, 10, 870, 31))
ROUND_POS_ONE: Vec4 = Vec4(GameWindow(2, 0, 42, 21), use_screen_offset=False)
ROUND_POS_TWO: Vec4 = Vec4(GameWindow(57, 1, 96, 21), use_screen_offset=False)
SHOP_POS: Vec4 = Vec4(GameWindow(481, 1039, 1476, 1070))
CHAMP_NAME_POS: list[Vec4] = [
Vec4(GameWindow(3, 5, 120, 24), use_screen_offset=False),
Vec4(GameWindow(204, 5, 320, 24), use_screen_offset=False),
Vec4(GameWindow(407, 5, 522, 24), use_screen_offset=False),
Vec4(GameWindow(608, 5, 712, 24), use_screen_offset=False),
Vec4(GameWindow(808, 5, 912, 24), use_screen_offset=False),
]
GOLD_POS: Vec4 = Vec4(GameWindow(870, 883, 920, 909))
EXIT_NOW_POS: Vec4 = Vec4(GameWindow(771, 541, 890, 564))
AUGMENT_POS: list[Vec4] = [
Vec4(GameWindow(423, 579, 675, 614)),
Vec4(GameWindow(835, 579, 1086, 614)),
Vec4(GameWindow(1244, 579, 1495, 614)),
]
AUGMENT_LOC: list[Vec2] = [Vec2(549, 445), Vec2(955, 445), Vec2(1365, 445)]
VICTORY_POS: Vec4 = Vec4(GameWindow(916, 630, 1008, 652))
BUY_LOC: list[Vec2] = [
Vec2(575, 992),
Vec2(775, 992),
Vec2(975, 992),
Vec2(1175, 992),
Vec2(1375, 992),
]
ITEM_PICKUP_LOC: list[Vec2] = [
Vec2(1427, 611),
Vec2(406, 544),
Vec2(1412, 486),
Vec2(469, 440),
Vec2(1380, 381),
Vec2(644, 323),
Vec2(1297, 262),
Vec2(590, 215),
]
BENCH_LOC: list[Vec2] = [
Vec2(425, 777),
Vec2(542, 777),
Vec2(658, 777),
Vec2(778, 777),
Vec2(892, 777),
Vec2(1010, 777),
Vec2(1128, 777),
Vec2(1244, 777),
Vec2(1359, 777),
]
# This list goes from bottom left (0) to top right (27)
BOARD_LOC: list[Vec2] = [
Vec2(581, 651),
Vec2(707, 651),
Vec2(839, 651),
Vec2(966, 651),
Vec2(1091, 651),
Vec2(1222, 651),
Vec2(1349, 651),
Vec2(532, 571),
Vec2(660, 571),
Vec2(776, 571),
Vec2(903, 571),
Vec2(1022, 571),
Vec2(1147, 571),
Vec2(1275, 571),
Vec2(609, 494),
Vec2(723, 494),
Vec2(841, 494),
Vec2(962, 494),
Vec2(1082, 494),
Vec2(1198, 494),
Vec2(1318, 494),
Vec2(557, 423),
Vec2(673, 423),
Vec2(791, 423),
Vec2(907, 423),
Vec2(1019, 423),
Vec2(1138, 423),
Vec2(1251, 423),
]
CAROUSEL_LOC: Vec2 = Vec2(964, 644)
EXIT_NOW_LOC: Vec2 = Vec2(830, 551)
BUY_XP_LOC: Vec2 = Vec2(364, 964)
REFRESH_LOC: Vec2 = Vec2(364, 1039)
DEFAULT_LOC: Vec2 = Vec2(60, 222)
HEALTH_LOC: Vec2 = Vec2(1897, 126)
SURRENDER_LOC: Vec2 = Vec2(771, 843)
SURRENDER_TWO_LOC: Vec2 = Vec2(832, 489)
TAKE_ALL_BUTTON: Vec2 = Vec2(1352, 940)