-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtatat1clickerFast.py
307 lines (276 loc) · 9.39 KB
/
tatat1clickerFast.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
#tatat1clicker
import pyautogui, time
print('Press Ctrl-C to quit.')
flag = 1
riload = 0
loop1 = 200
while loop1>0:
#switch to chrome window
x, y =(1070, 10)
print(x, y)
print('Switching to chrome')
pyautogui.moveTo(x,y)
pyautogui.click()
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
if riload == 1:
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(10)
loop1 = loop1-1
loop2 = 10
while loop2>0:
# checking for previous used card
print('Taking ScreenShot')
im = pyautogui.screenshot()
rs,gs,bs = im.getpixel((755,260))
print(rs,gs,bs)
ru,gu,bu = im.getpixel((755,471))
print(ru,gu,bu)
if rs==255 and gs==255 and bs==255 and ru==255 and gu==255 and bu==255 :
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y,duration=0)
pyautogui.click()
#press Back button
x, y =(731, 65)
print(x, y)
print('Pressing back button')
pyautogui.moveTo(x,y,duration=0)
pyautogui.click()
time.sleep(10)
rs,gs,bs=(0,0,0)
ru,gu,bu=(0,0,0)
if flag==1:
flag=2
elif flag==2:
flag=1
continue
rh,gh,bh = im.getpixel((976,205))
rr,gr,br = im.getpixel((834,457))
rp,gp,bp = im.getpixel((1290,197))
if not(rh== 255 and gh==204 and bh==0 and rr==216 and gr==0 and br==0 and rp==255 and gp==255 and bp==255):
rh,gh,bh=(0,0,0)
rr,gr,br=(0,0,0)
rp,gp,bp=(0,0,0)
#switch to chrome window
x, y =(1070, 10)
print(x, y)
print('Switching to chrome')
pyautogui.moveTo(x,y)
pyautogui.click()
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
time.sleep(10)
continue
if flag == 1:
# checking for previous used card
im = pyautogui.screenshot()
r,g,b = im.getpixel((1186,284))
r2,g2,b2 = im.getpixel((1186,270))
if (r==255 and g==192 and b==0) or (r2==255 and g2==192 and b2==0) :
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
time.sleep(10)
r,g,b=(0,0,0)
r2,g2,b2=(0,0,0)
continue
#Sequence S1
print('Genetating sequence 1')
#move to first Player
x, y =(967, 354)
print(x, y)
print('Choosing S1-1')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
#move to Second Player
x, y =(1258, 588)
print(x, y)
print('Choosing S1-2')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
#Scrolling for third player
x, y =(1340, 340)
dragdistance=145
print(x, y)
print('Scrolling')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
pyautogui.dragRel(0, dragdistance, duration=0.25)
#move to third Player
x, y =(1258, 511)
print(x, y)
print('Choosing S1-3')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
# checking for previous used card
im = pyautogui.screenshot()
r,g,b = im.getpixel((1186,284))
r2,g2,b2 = im.getpixel((1186,270))
if (r==255 and g==192 and b==0) or (r2==255 and g2==192 and b2==0) :
flag=2
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
time.sleep(10)
r,g,b=(0,0,0)
r2,g2,b2=(0,0,0)
continue
#move to House button
x, y =(977, 206)
print(x, y)
print('Clicking House Button')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(1.5)
pyautogui.click()
time.sleep(1.5)
pyautogui.click()
flag = 2
elif flag == 2:
# checking for previous used card
im = pyautogui.screenshot()
r,g,b = im.getpixel((1186,284))
r2,g2,b2 = im.getpixel((1186,270))
if (r==255 and g==192 and b==0) or (r2==255 and g2==192 and b2==0) :
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(13)
r,g,b=(0,0,0)
r2,g2,b2=(0,0,0)
continue
#Sequence S2
print('Genetating sequence 2')
#move to first Player
x, y =(1110, 360)
print(x, y)
print('Choosing S2-1')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
#Scrolling for third player
x, y =(1340, 361)
dragdistance=179
print(x, y)
print('Scrolling')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
pyautogui.dragRel(0, dragdistance, duration=0.25)
#move to Second Player
x, y =(817, 395)
print(x, y)
print('Choosing S2-2')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
#move to first Player
x, y =(960, 614)
print(x, y)
print('Choosing S2-3')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
# checking for previous used card
im = pyautogui.screenshot()
r,g,b = im.getpixel((1186,284))
r2,g2,b2 = im.getpixel((1186,270))
if (r==255 and g==192 and b==0) or (r2==255 and g2==192 and b2==0) :
flag=1
#move to first tab
x, y =(741, 31)
print(x, y)
print('Moving to first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
#Reload first tab
x, y =(788, 66)
print(x, y)
print('Reloading first tab')
pyautogui.moveTo(x,y)
pyautogui.click()
time.sleep(13)
r,g,b=(0,0,0)
r2,g2,b2=(0,0,0)
continue
#move to House button
x, y =(977, 206)
print(x, y)
print('Clicking House Button')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(1.5)
pyautogui.click()
time.sleep(1.5)
pyautogui.click()
flag = 1
#Now to screen 2- challange screen
time.sleep(2)
#press challange button
x, y =(1077, 488)
print(x, y)
print('Pressing challange button')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(2)
pyautogui.click()
time.sleep(8)
#press Play again button
x, y =(1037, 381)
print(x, y)
print('Pressing Play again button')
pyautogui.moveTo(x,y,duration=0.5)
pyautogui.click()
time.sleep(1.5)
pyautogui.click()
loop2 = loop2-1
print('Loop1:')
print(loop1)
print('Loop2:')
print(loop2)
time.sleep(7)