-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopyusersfrommasterfile_tickcount.ahk
More file actions
364 lines (352 loc) · 12.1 KB
/
copyusersfrommasterfile_tickcount.ahk
File metadata and controls
364 lines (352 loc) · 12.1 KB
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
#include <tf>
;location = G:\My Drive\file share\val\masterusername.csv
location = masterusername.csv
RunWait,downloadsheet.exe
file_write = !%location%
IniWrite,%A_NowUTC%,G:/My Drive/file share/val/extra/progress.ini,last_active,%A_UserName%
word_array:=[]
set_user:=[]
global acc_perpc
acc_perpc = 80
acc_perpc++
RunAsAdmin()
IniRead,lvl,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,lvl
IniRead,ReadLine,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
word_array := StrSplit(ReadLine, A_Tab )
compelted_acc := word_array[1]
if (lvl = 20 or instr(lvl,"no_tut") or instr(lvl,"wrong_pass") or instr(lvl,"err"))
{
IniWrite,0,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,lvl
OutputDebug lvl %lvl%
}
papaloop = 25
ticks_in_hour = 3600000
Loop, Read,%location%
total_accs:= A_Index
loop,25 ;% papaloop.MaxIndex()
{
papa_value:= papaloop ;[A_Index]
papa_value += 0
target_tick := papa_value ;+ 5
OutputDebug papa_value=%papa_value% target_tick=%target_tick% lvl-%lvl% `n
Loop,% total_accs
{
FileReadLine,ReadLine,%location%,%A_Index%
word_array := StrSplit(ReadLine, "," )
worker :=word_array[3]
workerx:=worker
if instr(worker,"xx")
{
worker:=StrSplit(worker,"xx")
,worker:=worker[1]
}
if a_index = 102
OutputDebug `n %A_Index% %ReadLine% - %worker%
if (instr(ReadLine,compelted_acc) and !instr(lvl,"ERROR") and lvl != 0)
{
user :=word_array[1]
,pass :=word_array[2]
progres:=word_array[4]
,last_match:=word_array[6] / ticks_in_hour
if !last_match
last_match = 30
;if lvauto-py-to-exel = progres
; ExitApp1()
index1 = %A_Index%
; if lvl between 1 and 19 ;20
; {
; str = %user%,%pass%,%A_UserName%,%lvl%,,active,%A_NowUTC%
; str1 = %user%,%pass%,%A_UserName%,%lvl%
; OutputDebug `n %A_Index% %str%
; TF_ReplaceLine1(file_write,index1,index1,str)
; }
; else
; {
str = %user%,%pass%,%workerx%,%progres%,%lvl%,,%A_NowUTC%
OutputDebug `n %A_Index% %str%
TF_ReplaceLine1(file_write,index1,index1,str)
kill_epic()
ExitApp1()
; }
; if (lvl >= target_tick)
; {
; kill_me := target_tick
; }
}
else if (worker == A_UserName)
{
progres:=word_array[4]
,last_match:=word_array[6] / ticks_in_hour
if !last_match
{
last_match = 30
last_match_t := last_match * ticks_in_hour
}
anyerror:=word_array[5]
;OutputDebug csv_lvl=%progres%
if !(anyerror == "err" or progres = 20 or anyerror == "wrong_pass" or anyerror == "no_tut")
{
set_user.Push(ReadLine)
OutputDebug % set_user.maxindex()
;if (set_user.maxindex() = acc_perpc)
; break
if last_match != 30
OutputDebug `n %last_match%
if (last_match > target_tick)
{
;if kill_me = target_tick
;{
; TF_ReplaceLine1(file_write,index1,index1,str1)
; kill_epic()
; Break
;}
;Else if (kill_me < target_tick and kill_me)
; ExitApp1()
user :=word_array[1]
,pass :=word_array[2]
str = %user%,%pass%,%A_UserName%,%progres%,,active,%last_match_t%
OutputDebug `n %A_Index% %str%
index = %A_Index%
TF_ReplaceLine1(file_write,index,index,str)
ReadLine =%user% %pass%
IniWrite,%ReadLine%,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
Sleep 200
ExitApp1()
}
}
}
else if !worker
{
user :=word_array[1]
,pass :=word_array[2]
str = %user%,%pass%,%A_UserName%,0,,active
OutputDebug `n %A_Index% %str%
index = %A_Index%
TF_ReplaceLine1(file_write,index,index,str)
ReadLine =%user% %pass%
IniWrite,%ReadLine%,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
Sleep 200
if str1
TF_ReplaceLine1(file_write,index1,index1,str1)
ExitApp1()
}
}
papaloop--
set_user:=[]
} ;papa loop
;........................................... the end ...............................
;................................error wale acc run kro.......................
workers:=[]
Loop,% total_accs
{
FileReadLine,ReadLine,%location%,%A_Index%
word_array := StrSplit(ReadLine, "," )
worker :=word_array[3]
,anyerror:=word_array[5]
; if instr(worker,"xx")
;{
; worker:=StrSplit(worker,"xx")
; ,worker:=worker[1]
;}
OutputDebug `n %A_Index% %ReadLine% - lvl=%progres%
if (anyerror == "err") ;or anyerror == "wrong_pass")
{
workers:=StrSplit(worker,"xx")
,workered:=workers[2]
OutputDebug % workered
if !workered
workered = 1
if (workered <= 3)
{
workered++
user :=word_array[1]
,pass :=word_array[2]
,Progress :=word_array[4]
ReadLine =%user% %pass%
str = %user%,%pass%,%A_UserName%xx%workered%,%Progress% ; j chkr pe reha tan ethe lvl wich 0 likh do
index = %A_Index%
TF_ReplaceLine1(file_write,index,index,str)
IniWrite,%ReadLine%,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
Sleep 200
if str1
TF_ReplaceLine1(file_write,index1,index1,str1)
ExitApp1()
}
}
}
;..............................error wale acc run kro ends................
;.................load balancing non active koi v chak lo................
loop,% papaloop.MaxIndex()
{
papa_value:= papaloop[A_Index]
papa_value += 0
target_tick := papa_value + 5
OutputDebug papa_value=%papa_value% target_tick=%target_tick% lvl-%lvl% `n
Loop,% total_accs
{
FileReadLine,ReadLine,%location%,%A_Index%
word_array := StrSplit(ReadLine, "," )
,active_status :=word_array[6]
,progres:=word_array[4]
,anyerror:=word_array[5]
OutputDebug `n csv_lvl=%progres%
if !(anyerror == "err" or progres = 20 or anyerror == "wrong_pass" or anyerror == "no_tut" or active_status == "active")
{
;progres+=0
if (progres < target_tick)
{
user :=word_array[1]
,pass :=word_array[2]
str = %user%,%pass%,%A_UserName%,%progres%,,active
OutputDebug `n %A_Index% %str%
index = %A_Index%
TF_ReplaceLine1(file_write,index,index,str)
ReadLine =%user% %pass%
IniWrite,%ReadLine%,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
Sleep 200
if str1
TF_ReplaceLine1(file_write,index1,index1,str1)
ExitApp1()
}
}
}
set_user.RemoveAll()
}
;.................load balancing non active koi v chak lo ends................
;.................load balancing v2 active v chak lo ................
IniRead,pc_users,G:\My Drive\file share\val\extra\progress.Ini,last_active
pc_users := StrSplit(pc_users,"`n")
sorttick:=[]
loop,% pc_users.MaxIndex()
{
current_user:=pc_users[A_Index]
,ticks:= StrSplit(current_user,"=")
ticks:= ticks[2]
sorttick.Push(ticks)
}
sort,sorttick,N
loop,% pc_users.MaxIndex()
{
uswr:=pc_users[A_Index]
ticks:=sorttick[A_Index]
if instr(uswr,ticks)
{
if (A_NowUTC - ticks > 28800000)
{
user:=pc_users[1]
Loop,% total_accs
{
FileReadLine,ReadLine,%location%,%A_Index%
word_array := StrSplit(ReadLine, "," )
worker:=word_array[3]
if instr(worker,"xx")
{
worker:=StrSplit(worker,"xx")
,worker:=worker[1]
}
progres:=word_array[4]
,anyerror:=word_array[5]
OutputDebug csv_lvl=%progres%
if !(anyerror == "err" or progres = 20 or anyerror == "wrong_pass" or anyerror == "no_tut" ) and (worker = user)
{
;progres+=0
user :=word_array[1]
,pass :=word_array[2]
str = %user%,%pass%,%A_UserName%,%progres%,,active
OutputDebug `n %A_Index% %str%
index = %A_Index%
TF_ReplaceLine1(file_write,index,index,str)
ReadLine =%user% %pass%
IniWrite,%ReadLine%,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
Sleep 200
if str1
TF_ReplaceLine1(file_write,index1,index1,str1)
ExitApp1()
}
}
}
}
}
;.................load balancing v2 active v chak lo ends ................
TF_ReplaceLine1(file_write,index,index1,str)
{
word_array := StrSplit(str, "," )
,user :=word_array[1]
,pass :=word_array[2]
,worker :=word_array[3]
,lvl :=word_array[4]
,errname :=word_array[5]
,isactive :=word_array[6]
,tick :=word_array[7]
IniWrite,%user%,sheetvalues.ini, values,user
IniWrite,%pass%,sheetvalues.ini,values,pass
IniWrite,%worker%,sheetvalues.ini,values,owner
IniWrite,%lvl%,sheetvalues.ini,values,lvl
IniWrite,%errname%,sheetvalues.ini,values,errname
IniWrite,%isactive%,sheetvalues.ini,values,isactive
IniWrite,%tick%,sheetvalues.ini,values,tick
IniWrite,%index%,sheetvalues.ini,values,line
Loop {
process, exist, editsheet.exe
sleep, 500
} until !errorlevel
Run, editsheet.exe
/*
; old method
if ping(server)
{
IniRead,file_in_use,%b%\extras\access_req.ini,what
while (file_in_use !=0)
IniRead,file_in_use,%b%\extras\access_req.ini,by
IniWrite,1,%b%\extras\pc\%a_username%\access_req.ini,what,access_req
while (file_in_use !=A_UserName)
IniRead,file_in_use,%b%\extras\access_req.ini,what
}
TF_ReplaceLine(file_write,index,index,str)
IniWrite,0,%b%\extras\pc\%a_username%\access_req.ini,what,access_req
*/
}
ExitApp1()
{
FileDelete, masterusername.csv
ExitApp
}
ping_check(server = 0)
{
if (server = 0)
Server = www.google.co.in ; network server nam
Target = %Server% -n 1 -w 250
RunWait, %comspec% /c ping %Target% > Ping.log, , Hide
Sleep, 50
FileRead, FileContent, Ping.log
If FileContent not contains Reply from ; or another error
{
}
Else
{
k = 1
;MsgBox, %Server% is up
}
FileDelete, Ping.log
Return k
}
IniDelete,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
kill_epic()
{
RunWait Taskkill /IM VALORANT-Win64-Shipping.exe /F ,,hide
RunWait Taskkill /IM VALORANT.exe /F ,,hide
RunWait Taskkill /IM UnrealCEFSubProcess.exe /F ,,hide
RunWait Taskkill /IM RiotClientUx.exe /F ,,hide
RunWait Taskkill /IM RiotClientServices /F ,,hide
IniDelete,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,user
IniDelete,c:\Users\%A_Username%\Documents\jatt\settings.ini,user,lvl
}
RunAsAdmin() {
Global 0
IfEqual, A_IsAdmin, 1, Return 0
Loop, %0%
params .= A_Space . %A_Index%
DllCall("shell32\ShellExecute" (A_IsUnicode ? "":"A"),uint,0,str,"RunAs",str,(A_IsCompiled ? A_ScriptFullPath
: A_AhkPath),str,(A_IsCompiled ? "": """" . A_ScriptFullPath . """" . A_Space) params,str,A_WorkingDir,int,1)
ExitApp1()
}