-
Notifications
You must be signed in to change notification settings - Fork 74
/
得无开源.js
1740 lines (1647 loc) · 72 KB
/
得无开源.js
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* cron 10 11 * * *
* 依赖 crypto-js & jsencrypt
* 得物APP 探索中的玩一玩 所有游戏的入口都在那里 请跑任务之前手动玩一次
* --------------------------------------------------
* 变量名:dewuCK
* 变量值:抓app.dewu.com 请求头Headers中的x-auth-token 去掉Bearer # 连接cookie中dutoken得值 可以直接搜dutoken # 连接SK
* 三个值 x-auth-token的值去掉Bearer#dutoken的值#SK的值
* UA的变量名UAdefult_dewu
* export UAdefult_dewu="Mozilla/5.0 (.....UA"
* 例如ejxxxxx...#d41d8cd9|16...2233|17...|4sasasasa...#9xxxxxxxx
* 多账号& 或换行 或新建同名变量
* -------------------------------------------------
* --------------------------------------------------
* new Env("得物")
*/
let ckName = "dewuCK";//CK变量名字
const version = "testV1"
const isPromiseAll = process.env["isPromiseAll"] ? process.env["isPromiseAll"] : "true";//是否开启并发
let UAdefult = "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.99 Mobile Safari/537.36/duapp/5.39.1(android;10)"
let UA = process.env["UAdefult_dewu"] ? process.env["UAdefult_dewu"] : UAdefult
let SK = process.env["SKdefult_dewu"] ? process.env["SKdefult_dewu"] : ""
const $ = new Env("得物农场");
const notify = $.isNode() ? require('./sendNotify') : '';
let envSplitor = ["&", "\n"]; //多账号分隔符
let strSplitor = "#"; //多变量分隔符
let userIdx = 0;
let userList = [];
let authShareCodeList = []
let stationShareCodesList = []
let zeroLotteryShareCodesModeGetList = []
let helpCode = ""
const CryptoJS = require("crypto-js");
async function main() {
$.log(`并发状态:${isPromiseAll == "true" ? "[true]" : "[false]"}`)
let { body: shareCode } = await $.httpRequest({ timeout: 10000, method: "get", url: "https://gitee.com/smallfawn/Note/raw/main/updateTeam/dwnc.json", headers: { "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148/duapp/5.38.6" } })
$.log(`当前版本:${version} 最新版本${shareCode.v}`)
if (version != shareCode.v) {
$.log(`当前版本和最新版本不一致`)
return
}
$.log(`[${shareCode.notice}]`);
authShareCodeList = shareCode.treeShareCodesList
stationShareCodesList = shareCode.stationShareCodesList
zeroLotteryShareCodesModeGetList = shareCode.zeroLotteryShareCodesModeGetList
let taskall = [];
$.log(`======= 🌳初始化邀请码 =======`)
for (let user in userList) {
if (userList[user].ckStatus) {
//如果user处于数组第一 那么则await 否则则promiseAll
if (user == 0) {
await userList[0].UserInit();
} else {
if (isPromiseAll == "true") {
taskall.push(userList[user].UserInit());
} else {
taskall.push(await userList[user].UserInit());
}
}
}
}
await Promise.all(taskall);
$.log(`======= 🌳果园 =======`)
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.tree());
} else { taskall.push(await user.tree()); }
}
}
await Promise.all(taskall);
taskall = [];
$.log(`======= 🐟鱼厂 =======`)
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.fish());
} else {
taskall.push(await user.fish());
}
}
}
await Promise.all(taskall);
taskall = [];
$.log(`======= 上上签💴 =======`)
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.station());
} else {
taskall.push(await user.station());
}
}
}
await Promise.all(taskall);
taskall = [];
$.log(`======= 0元抽💴 =======`)
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.zeroLottery());
} else {
taskall.push(await user.zeroLottery());
}
}
}
await Promise.all(taskall);
taskall = [];
$.log(`======= 抽盲盒 =======`)
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.buZhou());
} else {
taskall.push(await user.buZhou());
}
}
}
await Promise.all(taskall);
$.log(`======= 潮金币 =======`)
taskall = [];
for (let user of userList) {
if (user.ckStatus) {
if (isPromiseAll == "true") {
taskall.push(user.point());
} else {
taskall.push(await user.point());
}
}
}
await Promise.all(taskall);
}
class Task {
constructor(str) {
this.index = ++userIdx;
this.ck = str.split(strSplitor)[0]; //单账号多变量分隔符
this.ckStatus = true;
this.taskListTree = []
this.doWaterStatus = true
this.taskListFish = []
this.fishFeedStatus = true
this.fishId = ""
this.fishType = ""
this.stationList = [];
this.duToken = str.split(strSplitor)[1];
this.sk = str.split(strSplitor)[2];
this.prizeLocations = []
this.BuZhouRefreshStatus = false
this.chanceCount = 0
this.waitPrizeLocations = []
this.ua = UA
//this.sk = SK
}
async tree() {
await this.Dowater()
await $.wait(2500)
await this.TreeInviteReward()
await $.wait(1500)
await this.Get_Tree_Info()
await $.wait(1500)
await this.TreeInfo()
await $.wait(1500)
await this.SignListTree()
await $.wait(1500)
await this.TaskListTree();
await $.wait(1500)
await this.Droplet_Get_Generate_Droplet()
await $.wait(1500)
await this.Droplet_ExtraInfo()
}
async fish() {
await this.SignListFish()
await $.wait(2500)
await this.TaskListFish()
await $.wait(2500)
await this.UserFinshInfo()
}
async station() {
for (let i of stationShareCodesList) {
await $.wait(1500)
let shareKey = await this.ShareCodesGet(i)
if (shareKey != '') {
let id = shareKey.split("id=")[1].split("&")[0]
let userId = shareKey.split("shareUserId=")[1].split("&")[0]
let status = await this.StationAssist(id, userId)
if (status) {
break;
}
} else {
}
}
await this.StationList()
for (let j of this.stationList) {
await $.wait(2000)
await this.StationEgnageIn(j.id)
}
}
async zeroLottery() {
await this.zeroLotteryWinList()
await this.zeroLotteryList()
for (let j of zeroLotteryShareCodesModeGetList) {
await $.wait(1500)
let shareKey = await this.ShareCodesGet(j)
if (shareKey != '') {
shareKey = decodeURIComponent(shareKey.split("shareKey=")[1].split("&")[0])
let status = await this.zeroLotteryShare(shareKey)
if (status) {
break;
}
} else {
}
}
}
async buZhou() {
await this.BuZhouTaskList()
await $.wait(2000)
await this.BuZhouInfo()
await $.wait(2000)
await this.BuZhouInfo()
}
async point() {
await this.PonitSignIn()
await this.PointTaskList()
}
async DoTask(body) {
try {
let taskStatusResult = {};
let commitBody = {};
let preStatus = false
if (body.taskType == 50) {
taskStatusResult = await this.taskRequest_task("get", `https://app.dewu.com/hacking-task/v1/task/status?taskId=${body.taskId}&taskType=50&sign=94fd23c93d62ae0f75108f94c093b198`)
if (taskStatusResult.code == 200) {
if (taskStatusResult.data.status == 1) {
//$.log(`账号[${this.index}] 开始任务成功🎉`)
commitBody = { "taskId": body.taskId, "taskType": String(body.taskType), "btd": 0, spuId: 0 }
preStatus = true
}
}
}
if (body.taskType == 1) {
if ("classify" in body) {
if (body.classify == 2) {
taskStatusResult = await this.taskRequest_task("post", `https://app.dewu.com/hacking-task/v1/task/pre_commit?sign=b7382f4d908e04356f9646688afe096c`, { taskId: body.taskId, taskType: body.taskType, btn: 0 })
//console.log(taskStatusResult);
if (taskStatusResult.code == 200) {
if (taskStatusResult.data.isOk == true) {
//$.log(`账号[${this.index}] 开始任务成功🎉`)
$.log(`延迟${body.countdownTime + 1}秒浏览${body.taskName}`)
await $.wait((body.countdownTime + 1) * 1000)
commitBody = { "taskId": body.taskId, "taskType": String(body.taskType), "activityType": null, "activityId": null, "taskSetId": null, "venueCode": null, "venueUnitStyle": null, "taskScene": null, "btd": 0 }
preStatus = true
}
} else {
$.log(`❌账号[${this.index}] 开始任务失败[${taskStatusResult.msg}]`);
}
}
} else {
/*taskStatusResult = await this.taskRequest_task("post", `https://app.dewu.com/hacking-task/v1/task/pre_commit?sign=b7382f4d908e04356f9646688afe096c`, { taskId: body.taskId, taskType: body.taskType, btn: 0 })
if (taskStatusResult.code == 200) {
if (taskStatusResult.data.isOk == true) {
//$.log(`账号[${this.index}] 开始任务成功🎉`)
await $.wait(16000)
commitBody = { "taskId": body.taskId, "taskType": body.taskType, "activityType": null, "activityId": null, "taskSetId": null, "venueCode": null, "venueUnitStyle": null, "taskScene": null, "btd": 0 }
preStatus = true
}
} else {
$.log(`❌账号[${this.index}] 开始任务失败[${taskStatusResult.msg}]`);
}*/
}
}
if (body.taskType == 123 || body.taskType == 124) {
commitBody = { "taskType": String(body.taskType) }
preStatus = true
}
//console.log(taskStatusResult)
if (preStatus == true) {
let commitResult = await this.taskRequest_task("post", `https://app.dewu.com/hacking-task/v1/task/commit?sign=826988b593cd8cd75162b6d3b7dade15`, commitBody)
//console.log(commitResult)
if (commitResult.code == 200) {
if (commitResult.data.status == 2) {
$.log(`账号[${this.index}] [${body.taskName}]任务成功🎉`)
return true
} else {
$.log(`账号[${this.index}] [${body.taskName}]任务失败🎉`)
}
} else {
$.log(`账号[${this.index}] [${body.taskName}]任务失败🎉`)
}
} else {
return false
}
} catch (e) {
console.log(e);
}
}
async StationAssist(id, shareUserId) {
let body = { "id": id, "shareUserId": shareUserId }
try {
let result = await this.taskRequest("post", `https://app.dewu.com/api/v1/h5/delicate-sell-interfaces/dsell/station/assist?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
//$.log(`账号[${this.index}] 助力参与作者组队上上签成功🎉`)
return true
} else {
//$.log(`❌账号[${this.index}] 助力参与作者组队上上签失败[${result.msg}]`);
return false
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async zeroLotteryEgnageIn(id) {
let body = { "id": id, "source": "wotab" }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/hacking-zero-lottery/v1/activity/engage-in?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 0元抽签参与成功[${result.data.title}]🎉`)
} else {
$.log(`❌账号[${this.index}] 0元抽签0参与失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async ShareCodesGet(key) {
try {
let result = await this.taskRequest_task("get", `https://app.dewu.com/hacking-keyword/v1/common/keyword/share-info?keyword=${key}`)
if (result.code == 200) {
if (result.data !== null) {
return result.data.activityInfo.enterUrl
} else {
return ''
}
} else {
$.log(`❌账号[${this.index}] 助力参与0元购失败[${result.msg}]🎉`)
return ''
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async zeroLotteryShare(key) {
let body = { "shareKey": key }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/hacking-zero-lottery/v1/activity/report-keyword?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
//$.log(`账号[${this.index}] 助力参与0元购成功🎉`)
return true
} else {
//$.log(`❌账号[${this.index}] 助力参与0元购失败[${result.msg}]🎉`)
return false
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async zeroLotteryWinList() {
let body = { "limit": 10, "lastId": 0 }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/hacking-zero-lottery/v1/activity/engage-in-list`, body)
if (result.code == 200) {
if (result.data?.list) {
for (let i of result.data.list) {
// ...
if (i.win == true) {
$.log(`账号[${this.index}] 恭喜中签[${i.name}]🎉🎉🎉🎉🎉🎉🎉🎉`)
}
}
}
} else {
$.log(`❌账号[${this.index}] 获取0元购列表失败[${result.msg}]🎉`)
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async zeroLotteryList() {
let body = { "source": "wotab" }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/zero-lottery-interfaces/zl/activity/query-today?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
for (let i of result.data.activityList) {
let taskStatus = false
if (i.status == 0) {
if ("taskVo" in i) {
await this.DoTask(i.taskVo)
} else {
await this.zeroLotteryEgnageIn(i.id)
}
}
}
} else {
$.log(`❌账号[${this.index}] 获取0元购列表失败[${result.msg}]🎉`)
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async StationEgnageIn(id) {
let body = { "id": id }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/delicate-sell-interfaces/dsell/station/egnage-in?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 参与上上签成功🎉`)
} else {
$.log(`❌账号[${this.index}] 参与上上签失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async StationList() {
let body = { "student": false, "source": "" }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/delicate-sell-interfaces/dsell/query/ongoing-list?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
for (let i of result.data.records) {
if (i.userPartakeStatus == 10) {
this.stationList.push(i)
}
}
} else {
$.log(`❌账号[${this.index}] 获取上上签列表失败[${result.msg}]🎉`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async BuZhouInfo() {
let body = { "benefitId": 1, "additionPresent": 0, "source": "gamecentertask" }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/mount-buzhou-interfaces/gk/index?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
//console.log(result.data);
$.log(`账号[${this.index}] 盲盒赛季[${result.data.seasonName}] 当前抽奖机会[${result.data.chanceCount}] 🎉`)
if ("prizeLocations" in result.data) {
$.log(`已开盲盒位置[${result.data.prizeLocations}]`)
this.prizeLocations = result.data.prizeLocations
} else {
this.prizeLocations = []
}
this.chanceCount = result.data.chanceCount
//console.log(result.data.hasDraw);
if (this.chanceCount != 0) {
this.waitPrizeLocations = this.findMissingNumbers(this.prizeLocations)
//加一个条件 如果waitPriz...... 小于 chence 则 刷新
if (this.waitPrizeLocations.length == 0 && this.chanceCount > 0) {
await $.wait(2500)
await this.BuZhouRefresh(result.data.seasonId)
}
this.waitPrizeLocations = this.findMissingNumbers(this.prizeLocations)
//如果长度大于等于chence 则不刷新
let max = this.waitPrizeLocations.length >= this.chanceCount ? this.chanceCount : this.waitPrizeLocations.length
for (let i = 0; i < max; i++) {
let prizeLocation = this.waitPrizeLocations[i]
$.log("开始第" + (i + 1) + "次抽奖")
await $.wait(2500)
await this.BuZhouLottery(result.data.seasonId, prizeLocation)
}
await $.wait(2500)
await this.BuZhouRefresh(result.data.seasonId)
}
} else {
$.log(`❌账号[${this.index}] 盲盒获取失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async BuZhouLottery(seasonId, prizeLocation) {
let body = { "benefitId": 1, "seasonId": seasonId, "prizeLocation": prizeLocation, "source": "gamecentertask" }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/mount-buzhou-interfaces/gk/lottery?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 盲盒抽取[${result.data.gkLotteryVo.gkName}]碎片`);
} else {
$.log(`❌账号[${this.index}] 盲盒抽取失败[${result.msg}]`);
//console.log(seasonId, prizeLocation);
}
} catch (e) {
console.log(e);
}
}
async BuZhouRefresh(seasonId) {
let body = { "seasonId": seasonId }
try {
let result = await this.taskRequest_task("post", `https://app.dewu.com/api/v1/h5/mount-buzhou-interfaces/gk/refresh?sign=${this.calculateSign(body)}`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 刷新盲盒成功`);
this.BuZhouRefreshStatus = true;
this.prizeLocations = []
} else {
$.log(`❌账号[${this.index}] 刷新盲盒失败[${result.msg}]`);
//console.log(result);
this.BuZhouRefreshStatus = false;
}
} catch (e) {
console.log(e);
}
}
async BuZhouTaskList() {
let body = { "source": "gamecentertask" }
try {
let result = await this.taskRequest_task("get", `https://app.dewu.com/api/v1/h5/mount-buzhou-interfaces/gk/task-list?source=gamecentertask&sign=${this.calculateSign(body)}`)
if (result.code == 200) {
for (let i of result.data.taskVoList) {
let taskStatus = false
if (i.isComplete == false) {
if (i.taskType == 1) {
if (i.classify == 2) {
//浏览
taskStatus = await this.DoTask(i)
}
}
if (i.taskType == 50) {
await $.wait(2500)
taskStatus = await this.DoTask(i)
//收藏
}
} else if (i.isComplete == true && i.isReceiveReward == false) {
await $.wait(2500)
await this.TaskReceiveBuZhou(i)
}
if (taskStatus == true) {
await $.wait(2500)
await this.TaskReceiveBuZhou(i)
}
}
} else {
$.log(`❌账号[${this.index}] 盲盒任务获取失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskReceivePoint(body) {
try {
let RequestBody = { taskId: body.taskId, taskType: body.taskType }
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-game-center/v1/sign/task_receive?sign=${this.calculateSign(RequestBody)}`, RequestBody)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 领取任务奖励[${result.msg}] --- [${result.data.amount}]金币🎉`)
} else {
//console.log(body.taskId);
$.log(`❌账号[${this.index}] 领取任务奖励失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskReceiveBuZhou(body) {
try {
let RequestBody = { taskId: body.taskId, classify: body.classify }
let result = await this.taskRequest("post", `https://app.dewu.com/api/v1/h5/mount-buzhou-interfaces/gk/task-receive?sign=${this.calculateSign(RequestBody)}`, RequestBody)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 领取任务奖励[${result.msg}] --- [${result.data.count}]次数🎉`)
} else {
//console.log(body.taskId);
$.log(`❌账号[${this.index}] 领取任务奖励失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async FishFeed() {
let body = { "feedTimes": 1, "fishId": this.fishId, "fishType": this.fishType }
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-fish/v1/fish/feed?sign=63a26f09f6d985b73299f92506f6e986`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 喂食🐟成功🎉`)
this.fishFeedStatus = true
} else {
this.fishFeedStatus = false
$.log(`❌账号[${this.index}] 喂食🐟失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async Dowater() {
if (this.droplet > 0) {
$.log(`账号[${this.index}] 可浇水${parseInt(this.droplet / 100)}次,开始浇水`);
if (this.treeMode == 0) {
for (let i = 0; i < parseInt(this.droplet / 100); i++) {
if (this.doWaterStatus) {
await this.DoWaterApi()
//随机延迟random
await $.wait(this.randomNumber(1000, 2000))
}
}
} else if (this.treeMode == 1) {
$.log(`账号[${this.index}] 组队浇水 =>`)
for (let i = 0; i < parseInt(this.droplet / 100); i++) {
if (this.doWaterStatus) {
await this.DoWaterTeamApi(this.treeId)
//随机延迟random
await $.wait(this.randomNumber(1000, 2000))
}
}
await this.TeamInfo()
}
}
}
async DoWaterApi() {
let body = {}
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/tree/watering?sign=fe26befc49444d362c8f17463630bdba`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 浇水成功🎉`)
this.doWaterStatus = true
} else {
this.doWaterStatus = false
$.log(`❌账号[${this.index}] 浇水失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async DoWaterTeamApi(teamTreeId) {
let body = { "teamTreeId": teamTreeId }
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/team/tree/watering?sign=b5ee2c7e8d1aaf214886c438c4f25cd9`, body)
if (result.code == 200) {
$.log(`账号[${this.index}] 浇水成功🎉`)
if (result.data.coupons !== null) {
$.log(`账号[${this.index}] 浇水成功获得${result.data.coupons[0].limitDesc}🎉`)
}
this.doWaterStatus = true
} else {
this.doWaterStatus = false
$.log(`❌账号[${this.index}] 浇水失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TreeInfo() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-tree/v1/user/target/info`)
//console.log(result);
if (result.code == 200) {
$.log(`账号[${this.index}] [${result.data.name}] Lv[${result.data.level}]🎉`)
} else {
$.log(`❌账号[${this.index}] 获取🌳信息失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskListTree() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-tree/v1/task/list`)
//console.log(result);
if (result.code == 200) {
$.log(`账号[${this.index}] 获取任务列表成功 采集/领取 集到[${result.data.taskList.length}]条任务🎉`)
for (let i of result.data.taskList) {
this.taskListTree.push(i)
}
for (let i of this.taskListTree) {
let taskStatus = false
if (i.isComplete == false) {
await $.wait(2500)
if (i.taskType == 1) {
if (i.classify == 2) {
//浏览
taskStatus = await this.DoTask(i)
}
if (i.classify == 1) {
//完成固定次数浇灌 默认5次
}
}
if (i.taskType == 10) {
//固定时间段领取 40g
}
if (i.taskType == 123) {
taskStatus = await this.DoTask(i)
//从桌面组件访问
}
if (i.taskType == 50) {
taskStatus = await this.DoTask(i)
//收藏
}
if (i.taskType == 201) {
//逛95分
}
if (i.taskType == 4) {
//收集一次水滴生产
}
} else if (i.isComplete == true && i.isReceiveReward == false) {
await $.wait(2500)
await this.TaskReceiveTree(i)
}
if (taskStatus) {
await $.wait(2500)
await this.TaskReceiveTree(i)
}
}
} else {
$.log(`❌账号[${this.index}] 获取任务列表成功🎉失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async SignListTree() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-tree/v1/sign/list`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 今日${result.data.status == 1 ? "未签到" : "已签到"}🎉`)
if (result.data.status == 1) {
let SignInResult = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/sign/sign_in`, {})
if (SignInResult.code == 200) {
$.log(`账号[${this.index}] 签到领取水滴[${SignInResult.msg}] --- [${SignInResult.data.Num}]🎉`)
} else {
$.log(`账号[${this.index}] 签到领取水滴[${SignInResult.msg}]`)
}
}
} else {
$.log(`❌账号[${this.index}] 获取签到列表失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async SignListFish() {
try {
let result = await this.taskRequest_task("get", `https://app.dewu.com/hacking-fish/v1/daily_sign/list`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 今日${result.data.status == 1 ? "未签到" : "已签到"}🎉`)
if (result.data.status == 1) {
let SignInResult = await this.taskRequest("post", `https://app.dewu.com/hacking-fish/v1/daily_sign/receive`, {})
if (SignInResult.code == 200) {
$.log(`账号[${this.index}] 签到领取鱼食[${SignInResult.msg}] --- [${SignInResult.data.Num}]🎉`)
} else {
$.log(`账号[${this.index}] 签到领取鱼食[${SignInResult.msg}]`)
}
}
} else {
$.log(`❌账号[${this.index}] 获取签到列表失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async PointInfo() {
try {
let result = await this.taskRequest_task("get", `https://app.dewu.com/hacking-game-center/v1/gold/balance`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 潮金币[${result.data.coinDetailList[0].value}]`);
} else {
$.log(`❌账号[${this.index}] 获取潮金币信息失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async PointTaskList() {
try {
let result = await this.taskRequest_task("get", `https://app.dewu.com/hacking-game-center/v1/sign/task_list`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
for (let i of result.data.list) {
let taskStatus = false
if (i.isComplete == false) {
if (i.taskType == 1) {
i.classify = 2
taskStatus = await this.DoTask(i)
}
if (i.taskType == 50) {
await $.wait(2500)
taskStatus = await this.DoTask(i)
//收藏
}
} else if (i.isComplete == true && i.isReceiveReward == false) {
await $.wait(2500)
await this.TaskReceivePoint(i)
}
if (taskStatus == true) {
await $.wait(2500)
await this.TaskReceivePoint(i)
}
}
} else {
$.log(`❌账号[${this.index}] 获取潮金币任务列表失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async PonitSignIn() {
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-game-center/v1/sign/sign`, {})
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 外部活动潮币签到成功 获得[${result.data.coins}g💧]🎉`)
} else {
$.log(`❌账号[${this.index}] 外部活动潮币签到失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async Droplet_ExtraInfo() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-tree/v1/droplet-extra/info`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 气泡水滴 可领取 --- 💧🎉`)
let receiveResult = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/droplet-extra/receive`, {})
//console.log(JSON.stringify(result));
if (receiveResult.code == 200) {
$.log(`账号[${this.index}] 领取气泡水滴[${receiveResult.msg}] --- [${receiveResult.data.totalDroplet}g]💧🎉`)
} else {
$.log(`❌账号[${this.index}] 领取气泡失败[${receiveResult.msg}]`);
//console.log(result);
}
} else {
$.log(`❌账号[${this.index}] 气泡水滴获取失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async Droplet_Get_Generate_Droplet() {
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/droplet/get_generate_droplet`, {})
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 领取小木桶积攒水滴[${result.msg}] --- [${result.data.droplet}g]💧🎉`)
} else {
$.log(`❌账号[${this.index}] 领取小木桶积攒水滴失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskReceiveFish(body) {
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-fish/v1/task/receive?sign=ee632e4b8e24d2526737bca0b7c0c678`, { taskId: body.taskId, classify: body.classify })
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 领取任务奖励[${result.msg}] --- [${result.data.num}g]💧🎉`)
} else {
$.log(`❌账号[${this.index}] 领取任务奖励失败[${result.msg}]`);
//console.log(body.taskId);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskReceiveTree(body) {
try {
let result = await this.taskRequest("post", `https://app.dewu.com/hacking-tree/v1/task/receive?sign=15c051cc7af50c30318c05b539e434e7`, { taskId: body.taskId, classify: body.classify })
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 领取任务奖励[${result.msg}] --- [${result.data.num}g]💧🎉`)
} else {
//console.log(body.taskId);
$.log(`❌账号[${this.index}] 领取任务奖励失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async Get_Tree_Info() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-tree/v1/tree/get_tree_info`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] [${result.data.treeId}] 成熟进度 --- [${result.data.userWateringDroplet}/${result.data.currentLevelNeedWateringDroplet}g]💧🎉`)
} else {
$.log(`❌账号[${this.index}] 获取🌳成长信息失败[${result.msg}]`);
//console.log(result);
}
} catch (e) {
console.log(e);
}
}
async TaskListFish() {
try {
let result = await this.taskRequest("get", `https://app.dewu.com/hacking-fish/v1/task/list`)
//console.log(JSON.stringify(result));
if (result.code == 200) {
$.log(`账号[${this.index}] 获取任务列表成功 采集/领取 [${result.data.taskList.length}]条任务🎉`)
for (let i of result.data.taskList) {
this.taskListFish.push(i)
}
for (let i of this.taskListFish) {
let taskStatus = false
if (i.isComplete == false) {
await $.wait(2500)
if (i.taskType == 1) {
if (i.classify == 2) {
//浏览
taskStatus = await this.DoTask(i)
}
if (i.classify == 1) {
//完成固定次数浇灌 默认5次
}
}
if (i.taskType == 100001) {
//喂养5次
}
if (i.taskType == 124) {
taskStatus = await this.DoTask(i)
//从桌面组件访问
}
if (i.taskType == 50) {
taskStatus = await this.DoTask(i)
//收藏
}
if (i.taskType == 201) {
//逛95分
}
if (i.taskType == 100002) {
//30g鱼食 每日9点/13点/17点/21点各领一次
}
} else if (i.isComplete == true && i.isReceiveReward == false) {
await $.wait(3000)
await this.TaskReceiveFish(i)
}
if (taskStatus) {
await $.wait(3000)
await this.TaskReceiveFish(i)
}
}
} else {
$.log(`❌账号[${this.index}] 获取任务🐟失败[${result.msg}]`);