-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.lua
1268 lines (976 loc) · 26.8 KB
/
main.lua
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
require("TSLib")
local sz = require("sz")--写 showUI 前必须插入这一句
local socket = require ("szocket")
local json = sz.json--写 showUI 前必须插入这一句
--适配定义
local w,h = getScreenSize()
local sdw,sdh= 1536,2048
local pointFile
if w==750 and h ==1334 then
pointFile= require("6-6s-7-8")
elseif w==1536 and h ==2048 then
pointFile= require("ipad")
else
dialog("未适配的机型"..w..","..h)
return
end
math.randomseed(tostring(os.time()):reverse():sub(1, 6))
local messagePath = "/var/mobile/Media/TouchSprite/res/messageStrs.txt"
local initMessage = "斗鱼互换斗鱼,一拳魂10 一轮结束 来老板,太鼓斗鱼换勾协助"
if not isFileExist(messagePath) then
writeFileString(messagePath,initMessage,"w")
end
-----------------------------读取massageTables-------------------------------
local messageStrs = readFileString(messagePath)
function string.split(str, delimiter)
if str==nil or str=='' or delimiter==nil then
return nil
end
local result = {}
for match in (str..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match)
end
return result
end
function coverRegin(s)
local tab = string.split(s,",")
local reginstr= ""
for _,v in pairs(tab) do
local pointTab = string.split(v,"|")
local pstr = ""
for k,j in pairs(pointTab) do
if k==1 then
pstr= pstr .. math.ceil(j*rx)
elseif k==2 then
pstr= pstr .. "|" .. math.ceil(j*ry) .. "|"
elseif k==3 then
pstr=pstr .. j
end
end
if reginstr ~= "" then
reginstr= reginstr .. "," .. pstr
else
reginstr= pstr
end
end
return reginstr
end
function converTab(tab)
local t = {}
if #tab == 7 and type(tab[2]) == "string" and type(tab[1]) == "number" then
for k,v in pairs(tab) do
if k==1 or k==3 then
table.insert(t,v)
elseif k==2 then
table.insert(t,coverRegin(v))
elseif k==4 or k==6 then
table.insert(t,math.ceil(v*rx))
elseif k==5 or k==7 then
table.insert(t,math.ceil(v*ry))
end
end
return t
end
for k,v in pairs(tab) do
local _type = type(v)
if _type~= "table" then
if (k == 1) and _type == "number" then
if v<3000 then
t[k]=math.ceil(v*rx)
else
t[k]=v
end
elseif (k == 2) and _type == "number" then
if v<3000 then
t[k]=math.ceil(v*ry)
else
t[k]=v
end
else
t[k]=v
end
end
if _type== "table" then
t[k]=converTab(v)
end
end
return t
end
local randomList={"qdf","w34","eese","rff","tgg","y","u","idb","o","p","a","s","d","f","g","h","j","k","lnn","z","ty","bn","v6","bn","n5","vb","1","2","hjk","4","hg","6","7","85","9","0"}
local pointList=pointFile.pointList
local activityList=pointFile.activityList
local stepStream=pointFile.stepStream
local eventListener={
}
local enum = {
["activyStatus_bonus"]="bonus",
["activyStatus_fight"]="fight",
["activyStatus_standby"]="standby",
["activyStatus_fuben"]="fuben",
["activyStatus_tupo"]="tupo",
["activyStatus_map"]="map",
["activyStatus_index"]="index",
["activyStatus_prepareOfGroup"]="prepareOfGroup",
["activyStatus_inviteWin"]="inviteWin",
["activyStatus_yulingWin"]="yulingWin",
["activyStatus_chiWin"]="chiWin",
["runTask_gouliang"]="gouliang",
["runTask_yuhun"]="yuhun",
["runTask_buy"]="buy",
}
local globalVariable ={
["tupoIndex"]=0,
["task"]={
["model"]=-1,
["currentTaskIndex"]=1,
["taskList"]={},
},
["message"]={
["channelIndex"]=1,
},
["addContext"]="",
["activyStatus"]=enum["activyStatus_index"],
["debug"]=true,
["continuousOfFubenStatus"]=0,
}
local messageTable = {
}
local sleep= function(max,min)
if min==nil then
min=50
end
mSleep(math.random(min,max))
end
local debugToast = function(arg)
if globalVariable.debug then
toast(arg)
end
end
function animation(pos1,pos2,spend)
local tid = math.random(50,100)
if spend==nil then
spend=pointList["heroChange"]["littleConfig"]["spend"]
end
local zx = pos2[1] - pos1[1]
local zy = pos2[2] - pos1[2]
local tx = 0
if zx>0 then
tx = spend-5
else
tx = -spend+5
end
local ty = 0
if zy>0 then
ty = spend
else
ty = -spend
end
local cx,cy = pos1[1],pos1[2]
local xtest, ytest = false,false
touchDown(tid,pos1[1], pos1[2])
repeat
if not xtest then
cx = cx+tx
end
if not ytest then
cy = cy+ty
end
sleep(15,10)
touchMove(tid,cx+math.random(1,2),cy+math.random(1,2))
if tx >0 and cx>=pos2[1] then
xtest = true
end
if tx <0 and cx<=pos2[1]then
xtest = true
end
if ty >0 and cy>=pos2[2] then
ytest = true
end
if ty <0 and cy<=pos2[2] then
ytest = true
end
until(xtest and ytest)
touchUp(tid,cx, cy)
end
MyTable = {
["style"] = "default",
["width"] = h,
["height"] = w,
["config"] = "save_01.dat",
["rettype"] = "table",
["timer"] = 99,
["orient"] = 2,
["pagetype"] = "multi",
["title"] = "YYS配置",
["cancelname"] = "取消",
["okname"] = "开始",
pages =
{
{
{
["type"] = "Label",
["text"] = "全局设置",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "Label",
["text"] = "模式选择",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "ComboBox",
["list"] = "狗粮模式,通用战斗模式,购买达摩,结界抢坑,自动挂机突破,任务模式,活动模式",
["select"] = "1",
["source"] = "test",
["id"] = "model"
},
{
["type"] = "Label",
["text"] = "自动邀请",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "autoInvite",
["type"] = "CheckBoxGroup",
["list"] = "我是队长",
["select"] = "0",
},
{
["id"] = "exitFubenOfseeBoss",
["type"] = "CheckBoxGroup",
["list"] = "看到超鬼王,停止/退出",
["select"] = "0",
},
{
["id"] = "selectedWood",
["type"] = "CheckBoxGroup",
["list"] = "选中丑女的木头人",
["select"] = "0",
},
{
["type"] = "Label",
["text"] = "自动准备",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "autoPrepare",
["type"] = "CheckBoxGroup",
["list"] = "是否开启自动准备",
["select"] = "0",
},
{
["type"] = "Label",
["text"] = "目标选择",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "autoTarget",
["type"] = "CheckBoxGroup",
["list"] = "是否开启目标选择",
["select"] = "0",
},
{
["width"] = 500,
["id"] = "targetDelay",
["type"] = "Edit",
["prompt"] = "战斗目标选择频率",
["text"] = "3",
["kbtype"] = "number",
},
{
["id"] = "selectTarget",
["type"] = "RadioGroup",
["list"] = "左(前排),中(前排),右(前排),左(后排),中(BOSS),右(后排),空白1,空白3(mid),御魂(右)",
["select"] = "2",
},
},
{
{
["type"] = "Label",
["text"] = "聊天辅助",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "sendad",
["type"] = "CheckBoxGroup",
["list"] = "发广告",
["select"] = "0",
},
{
["type"] = "Label",
["text"] = "内容选择",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "ComboBox",
["list"] = messageStrs,
["select"] = "1",
["source"] = "test",
["id"] = "adContent"
},
{
["id"] = "ADrate",
["type"] = "Edit",
["prompt"] = "广告发布频率",
["text"] = "3",
["kbtype"] = "default",
},
{
["id"] = "addAD",
["type"] = "Edit",
["prompt"] = "新增广告",
["text"] = "3",
["kbtype"] = "default",
},
},
{
{
["type"] = "Label",
["text"] = "狗粮设置",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
},
{
{
["type"] = "Label",
["text"] = "活动活动",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "Label",
["text"] = "内容选择",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "activityType",
["type"] = "ComboBox",
["list"] = "离岛-金币",
["select"] = "0",
["data"] = "离岛-金币",
["source"] = "test"
},
{
["width"] = 500,
["id"] = "taskTimesOfActivity",
["type"] = "Edit",
["prompt"] = "循环次数",
["text"] = "3",
["kbtype"] = "number",
},
},
{
{
["id"] = "autoTupo",
["type"] = "CheckBoxGroup",
["list"] = "是否自动挂机突破",
["select"] = "",
["size"] = 50,
},
{
["type"] = "Label",
["text"] = "勋章购买设置",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "Label",
["text"] = "购买物品",
["size"] = 20,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "ComboBox",
["list"] = "草纸,经验达摩",
["select"] = "1",
["source"] = "test",
["id"] = "buyGoods",
}
},
{
{
["type"] = "Label",
["text"] = "任务模式配置",
["size"] = 30,
["align"] = "left",
["color"] = "0,0,0",
},
{
["type"] = "Label",
["text"] = "内容选择",
["size"] = 15,
["align"] = "left",
["color"] = "0,0,0",
},
{
["id"] = "fubenType",
["type"] = "ComboBox",
["list"] = "御魂,御灵,痴",
["select"] = "0",
["data"] = "魂10#龙,狗,黑豹,凤凰#痴",
["source"] = "test"
},
{
["id"] = "fubenId",
["type"] = "ComboBox",
["select"] = "0",
["dataSource"] = "test"
},
{
["width"] = 500,
["id"] = "circleOfTask",
["type"] = "Edit",
["prompt"] = "循环次数",
["text"] = "3",
["kbtype"] = "number",
},
},
}
}
local registor =function(event,func,delay)
eventListener[event]={}
eventListener[event].func = func
if delay==nil then
delay=-1
end
eventListener[event].delay = delay
end
local touchPos=function(pos,offset)
local pos1=nil
if offset==nil then
pos1 = {pos[1]+math.random(30),pos[2]+math.random(31)}
else
pos1 = {pos[1]+math.random(offset),pos[2]+math.random(offset)}
end
touchDown(pos1[1],pos1[2])
touchUp(pos1[1],pos1[2])
mSleep(10+math.random(90));
end
function isColor(x,y,c,s) --封装函数,函数名 isColor
local fl,abs = math.floor,math.abs
s = fl(0xff*(100-s)*0.01)
local r,g,b = fl(c/0x10000),fl(c%0x10000/0x100),fl(c%0x100)
local rr,gg,bb = getColorRGB(x,y)
if abs(r-rr)<s and abs(g-gg)<s and abs(b-bb)<s then
return true
end
end
local mutilColorInRegionCover = function(tab)
local xp,yp = findMultiColorInRegionFuzzy(tab[1], tab[2], tab[3], tab[4], tab[5],tab[6], tab[7])
if xp ==-1 and yp==-1 then
return nil
end
return xp,yp
end
local searchLevel1 = function(timeout)
local beginTime = os.time()
local spend = pointList["heroChange"]["littleConfig"]["spend"]
local offset = pointList["heroChange"]["littleConfig"]["offset"]
repeat
keepScreen(true)
local x,y = mutilColorInRegionCover(pointList.heroChange.search.screenView)
::found::
keepScreen(false)
if x~=nil then
return x,y
end
if os.time() - beginTime > timeout then
return -1,-1
end
animation({pointList.heroChange.search.endd[1],pointList.heroChange.search.endd[2]+math.random(-15,15)},{pointList.heroChange.search.begin[1],pointList.heroChange.search.begin[2]+math.random(-15,15)},8)
sleep(200,100)
until (false)
end
local executeTask = function()
local task = globalVariable.task.taskList[1]
toast("当前处于map,准备进入副本,任务剩余次数为" .. task.remain)
if task.remain>0 then
sleep(800,500)
local pos = task.target[#task.target]
touchPos(pos)
task.remain=task.remain-1
sleep(5000,4000)
else
log("任务已执行完毕!")
end
end
local init = function(tab)
eventListener={}
local model = tab["model"]
globalVariable.task.model=tonumber(model)
--******************事件注册*********************************
local autoPrepare = tab["autoPrepare"]
local exitFubenOfseeBoss = tab["exitFubenOfseeBoss"]
local selectedWood = tab["selectedWood"]
if selectedWood == "0" then
registor("selectedWoodEvent",function(arg)
if multiColor(pointList.woodPeople.woodExists) then
if not multiColor(pointList.woodPeople.selectedFlag) then
touchPos({pointList.woodPeople.woodExists[1][1]+200,pointList.woodPeople.woodExists[1][2]})
end
end
end,3)
end
if autoPrepare == "0" then
registor("standardEvent",function(arg)
if not multiColor(pointList["preparedStatus"]) then
touchPos(pointList["standard"]);
globalVariable.activyStatus = enum.activyStatus_fight
end
end)
end
if tab["autoInvite"] == "0" then
registor("captainEvent",function()
local flag=false
repeat
sleep(500,100)
if exitFubenOfseeBoss == "0" then
if multiColor(pointList["discoverBoss"]) then
local serialList ={
{ 1150, 1689, 0x100f0d},
{ 883, 836, 0xf3b25e},
}
sleep(500,100)
touchPos(serialList[1])
sleep(1000,500)
touchPos(serialList[2])
return
end
end
local serialList =pointList.doEntryOfcouple
if multiColor(serialList) then
touchPos(serialList[1])
flag=true
globalVariable.activyStatus = enum.activyStatus_fight
sleep(200,100)
end
until (flag)
end,2);
else
registor("captainEvent",function()
if multiColor(pointList["pointerOfcaptainExit"]) then
local serialList =pointList.doExitOfcouple
touchPos(serialList[1])
sleep(1000,500)
touchPos(serialList[2])
end
end,10);
end
registor("taskIdentifyEvent",function()
touchPos(pointList["taskIdentify"][2]);
end);
registor("acceptGroupEvent",function(arg)
touchPos(pointList["acceptGroup"][4])
end,3);
if tab["addAD"] ~= nil then
local _match = string.find(messageStrs,tab["addAD"])
if _match == nil then
messageStrs=messageStrs .. "," .. tab["addAD"]
writeFileString(messagePath,messageStrs,"w")
luaExit()
end
end
------------------发广告开关--------------------------
if tab["sendad"] == "0" then
local adContent = tab["adContent"]
local adrate = tonumber(tab["ADrate"])
messageTable = string.split(messageStrs,",")
globalVariable["adContext"] = messageTable[tonumber(adContent)+1]
registor("sendAdEvent",function(arg)
end,adrate);
end
--狗粮模式
if model == "0" then
--******************司机退出 退出副本*********************************
registor("isGroupEvent",function(arg)
touchPos(pointList["break"]["great"]);
mSleep(600);
touchPos(pointList.confirm.y);
end,5);
registor("everyLoopExecute",function(arg)
if globalVariable.activyStatus==enum.activyStatus_fuben then
globalVariable.continuousOfFubenStatus=globalVariable.continuousOfFubenStatus+1
else
globalVariable.continuousOfFubenStatus=0
end
if globalVariable.continuousOfFubenStatus==15 then
touchPos(pointList["break"]["great"]);
mSleep(600);
touchPos(pointList.confirm.y);
globalVariable.continuousOfFubenStatus=0
end
end,-1);
registor("autoChangeExpGoodsEvent",function(arg)
end);
end
if tab["autoTarget"] == "0" then
local targetIndex = tonumber(tab["selectTarget"])+1
local delay = tonumber(tab["targetDelay"])
registor("autoTargetEvent",function(arg)
if "table" == type(pointList["target"][targetIndex][1]) then
local plist = pointList["target"][targetIndex]
touchPos(plist[math.random(1,#plist)])
else
touchPos(pointList["target"][targetIndex])
end
end,delay);
end
--御魂模式
if model =="1" then
end
-- --购买模式模式
-- if model =="2" then
-- local buyGoods = tab["buyGoods"]
-- local pos =nil
-- if buyGoods == "0" then
-- pos = pointList["buyExp"][1]
-- else
-- pos = pointList["buyExp"][2]
-- end
-- registor("buyExpEvent",function(arg)
-- touchPos(pos)
-- mSleep(300)
-- touchPos(pointList["buyExp"][3])
-- mSleep(300)
-- touchPos(pointList["buyExp"][4])
-- end,2);
-- end
--抢坑模式
if model =="3" then
waitBase =10
local index = tonumber(tab["feedIndex"])
local _pos = pointList["feeded"]["heroListIndexPoint"][1]
local offset = pointList["feeded"]["heroListIndexPoint"]["offset"]
local pos = {_pos[1],_pos[2]-index*offset}
registor("feedStatusEvent",function(arg)
while(true) do
if multiColor(pointList["feeded"]["status"]) then
touchPos(pointList["feeded"]["status"][3])
mSleep(550)
touchPos(pos)
mSleep(400)
touchPos(pointList["feeded"]["y"])
end
end
end);
end
--结界挂机模式
if model =="4" then
local is_status = tab["autoTupo"]
if is_status == "0" then
local _pos = pointList["tupoDetail"][1]
local offsetx = pointList["tupoDetail"]["offsetx"]
local offsety = pointList["tupoDetail"]["offsety"]
local attackOffset = pointList["tupoDetail"]["attackOffset"]
registor("autoTupoEvent",function(arg)
local index = arg[1]
local pos = nil
if index ==0 then
pos = {_pos[1],_pos[2],_pos[3]}
elseif index==1 then
pos = {_pos[1],_pos[2]-offsety,_pos[3]}
elseif index==2 then
pos = {_pos[1],_pos[2]-2*offsety,_pos[3]}
elseif index==3 then
pos = {_pos[1]+offsetx,_pos[2],_pos[3]}
elseif index==4 then
pos = {_pos[1]+offsetx,_pos[2]-offsety,_pos[3]}
elseif index==5 then
pos = {_pos[1]+offsetx,_pos[2]-2*offsety,_pos[3]}
elseif index==6 then
pos = {_pos[1]+2*offsetx,_pos[2],_pos[3]}
elseif index==7 then
pos = {_pos[1]+2*offsetx,_pos[2]-offsety,_pos[3]}
elseif index==8 then
pos = {_pos[1]+2*offsetx,_pos[2]-2*offsety,_pos[3]}
end
if isColor(pos[1],pos[2],pos[3],90) then
touchPos(pos)
mSleep(500)
nLog(pos[1]+attackOffset[1] .. ":" .. pos[2]-attackOffset[2])
touchPos({pos[1]+attackOffset[1],pos[2]-attackOffset[2]})
end
end);
end
end
--任务模式
if model =="5" then
eventListener["acceptGroupEvent"]=nil
local fubenType = tonumber(tab["fubenType"])
local fubenId = tonumber(tab["fubenId"] )
local circleOfTask = tonumber(tab["circleOfTask"])
-------御魂副本
if fubenType == 0 then
end
-------御灵副本
if fubenType == 1 then
local target = stepStream["yuling"][fubenId+1]
local task = {["target"]=target,["remain"]=circleOfTask}
table.insert(globalVariable.task.taskList,task)
log("*****************任务模式已开启********************")
registor("taskModelEvent",function(arg)
end);
end
-------痴副本
if fubenType == 2 then
local target = stepStream["chi"]
local task = {["target"]=target,["remain"]=circleOfTask}
table.insert(globalVariable.task.taskList,task)
log("*****************任务模式已开启********************")
registor("taskModelEvent",function(arg)
end);
end
end
--活动模式
if model =="6" then
eventListener["acceptGroupEvent"]=nil
local activityType = tonumber(tab["activityType"])
local activityId = tonumber(tab["activityId"] )
local taskTimesOfActivity = tonumber(tab["taskTimesOfActivity"])
local scene = activityList[activityType+1]["scene"]
pointList["activityModel"]=scene
local target = activityList[activityType+1]["entrance"]
local task = {["target"]=target,["remain"]=taskTimesOfActivity}
table.insert(globalVariable.task.taskList,task)
log("*****************任务模式已开启********************")
end
end
local MyJsonString = json.encode(MyTable)
retTable = {showUI(MyJsonString)};
if retTable[1] then
init(retTable[2])
end
local winStatus = 0
local calcCount = 0
waitBase = 500
repeat
local beginTime = socket.gettime()
local x, y;