forked from chudongjingling/open_code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path热血传奇源码V3.2.lua
2193 lines (2081 loc) · 63.9 KB
/
热血传奇源码V3.2.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
function zhuchengxu()
ret,dengji,shezhi1,putongrenwu,wuxianrenwu,rwhuanshishijian,rwwuxianshenyuanshijian,rwwuxianshenyuanjiange,rwyanhuotumoshijian,rwyanhuotumoditu,rwyanhuotumocengshu,piliangfenjiejiange,huanxianxueliang,huichengxueliang=shezhi()
if ret==1 then
dengji=tonumber(dengji)
rwhuanshishijian=tonumber(rwhuanshishijian)
rwwuxianshenyuanshijian=tonumber(rwwuxianshenyuanshijian)
rwwuxianshenyuanjiange=tonumber(rwwuxianshenyuanjiange)
rwyanhuotumoshijian=tonumber(rwyanhuotumoshijian)
yanhuoditu=tonumber(rwyanhuotumoditu)
yanhuocengshu=tonumber(rwyanhuotumocengshu)
huichengxueliang=tonumber(huichengxueliang)
huanxianxueliang=tonumber(huanxianxueliang)
piliangfenjiejiange=tonumber(piliangfenjiejiange)
else
dengji=0
piliangfenjiejiange=99999
rwwuxianshenyuanjiange=18
huichengxueliang=60
huanxianxueliang=40
end
if string.find("@"..putongrenwu.."@","@0@") then
putongrenwu="0"
rwrichang=1
rwcanbai=1
rwchumo=1
rwxiangmodongku=1
rwjiaozhudating=1
else
if string.find("@"..putongrenwu.."@","@1@") then
putongrenwu="2@3@4@5@6@7@8@9@10@11@12@13@14@15@16@17@18"
rwrichang="0"
rwcanbai="0"
rwchumo="0"
rwxiangmodongku="0"
rwjiaozhudating="0"
end
if string.find("@"..putongrenwu.."@","@6@") then
rwrichang="0"
end
if string.find("@"..putongrenwu.."@","@4@") then
rwcanbai="0"
end
if string.find("@"..putongrenwu.."@","@9@") then
rwchumo="0"
end
if string.find("@"..putongrenwu.."@","@15@") then
rwxiangmodongku="0"
end
if string.find("@"..putongrenwu.."@","@16@") then
rwjiaozhudating="0"
end
end
pdyidongbaocun()
piliangfenjieshijian=os.time()
if yanhuoditu==0 then
yanhuoditu=2
end
if yanhuocengshu==0 then
yanhuocengshu=math.random(1,5)
end
zaixian=1
zaixiansj=1
xueliang=100
yanhuoyingguaijiange=60
yanhuoyinguai=os.time()-999
if dengji==0 then
pddengji()
dialog("您的等级是"..dengji.."以上", 2);
end
if not(string.find("@"..putongrenwu.."@","@0@")) then
if string.find("@"..putongrenwu.."@","@2@") then
dialog("开始整理背包", 2);mSleep(1000)
zhenglizhuangbei()
dialog("整理背包结束", 2)
end
if rwcanbai=="0" then
dialog("开始参拜龙卫", 2);mSleep(1000)
if dengji>21 then
canbailongwei()
else
dialog("等级未达到22级",2);
end
dialog("参拜龙卫完成", 2)
end
if string.find("@"..putongrenwu.."@","@5@") then
dialog("石阁试炼", 2);mSleep(1000)
if dengji>6 then
shigeshilian()
else
dialog("等级未达到7级",2);
end
dialog("石阁试炼完成", 2)
end
if rwrichang=="0" then
dialog("开始日常任务", 2);mSleep(1000)
if dengji>17 then
richangrenwu()
else
dialog("等级未达到18级",2);
end
richangrenwu()
dialog("日常任务完成", 2)
end
if string.find("@"..putongrenwu.."@","@7@") then
dialog("开始主线任务", 2);mSleep(1000)
zhuxianrenwu()
dialog("主线任务完成", 2)
end
if string.find("@"..putongrenwu.."@","@8@") then
dialog("开始行会任务", 2);mSleep(1000)
hanghuirenwu()
dialog("行会任务完成", 2)
end
if rwchumo=="0" then
dialog("开始除魔任务", 2);mSleep(1000)
if dengji>19 then
chumo()
else
dialog("等级未达到20级",2);
end
dialog("除魔任务完成",2)
end
if string.find("@"..putongrenwu.."@","@10@") then
dialog("开始皇城任务", 2);mSleep(1000)
if dengji>28 then
huangcheng()
else
dialog("等级未达到29级",2);
end
dialog("皇城任务完成",2)
end
if string.find("@"..putongrenwu.."@","@11@") then
dialog("支线任务-待修改优化,将在最后运行", 2);mSleep(1000)
end
if string.find("@"..putongrenwu.."@","@12@") then
dialog("开始挖矿", 2);mSleep(1000)
if dengji>19 then
wakuang()
else
dialog("等级未达到20级,不建议去挖矿",2);
end
dialog("挖矿完成", 2)
end
if string.find("@"..putongrenwu.."@","@13@") then
dialog("开始竟技", 2);mSleep(1000)
if dengji>24 then
jingji()
else
dialog("等级未达到25级",2);
end
dialog("竟技完成",2)
end
if string.find("@"..putongrenwu.."@","@14@") then
dialog("开始活动深渊",2);mSleep(1000)
if dengji>10 then
huodongshenyuan()
else
dialog("等级未达到11级",2);
end
dialog("活动深渊任务完成",2)
end
if rwxiangmodongku=="0" then
anquan()
dialog("开始降魔洞窟", 2);mSleep(1000)
if dengji>49 then
t110=os.time()
while rwxiangmodongku=="0" do
xiangmodongku()
mSleep(1000)
xunhuan(36000,t110,"110")
end
else
dialog("等级未达到50级",2);
end
dialog("降魔洞窟完成", 2)
end
if rwjiaozhudating=="0" then
anquan()
dialog("开始教主大厅", 2);mSleep(1000)
if dengji>30 then
t111=os.time()
while rwjiaozhudating=="0" do
jiaozhudating()
mSleep(1000)
xunhuan(36000,t111,"111")
end
else
dialog("等级未达到31级",2);
end
dialog("教主大厅完成", 2)
end
if string.find("@"..putongrenwu.."@","@17@") then
dialog("开始活动中心", 2);mSleep(1000)
dialog("程序修改中敬请期待", 2)
dialog("活动中心完成", 2)
end
if string.find("@"..putongrenwu.."@","@18@") then
dialog("领取奖励",2);mSleep(1000)
lingjiangli()
dialog("领取奖励结束",2)
end
if string.find("@"..putongrenwu.."@","@3@") then
dialog("开始整理装备",2);mSleep(1000)
zhenglizhuangbei()
dialog("整理装备结束",2)
end
if string.find("@"..putongrenwu.."@","@11@") then
dialog("开始支线任务-待修改优化", 2);mSleep(1000)
if dengji>20 then
zhixianrenwu()
else
dialog("等级未达到21级",2);
end
dialog("支线任务完成", 2)
end
end
if not(string.find("@"..wuxianrenwu.."@","@0@")) then
if string.find("@"..wuxianrenwu.."@","@1@") then
dialog("开始环式任务-待修改优化",2);mSleep(1000)
huanshi()
dialog("环式任务结束", 2)
end
if string.find("@"..wuxianrenwu.."@","@2@") then
dialog("开始焰火屠魔-待修改优化",2);mSleep(1000)
if dengji>36 then
yanhuotumo()
else
dialog("等级未达到37级",2);
end
dialog("焰火屠魔结束",2)
end
if string.find("@"..wuxianrenwu.."@","@3@") then
dialog("开始无限深渊",2);mSleep(1000)
wuxianshenyuan()
dialog("无限深渊结束",2)
end
end
end
function shezhi()
local sz = require("sz")
local json = sz.json
local w,h = getScreenSize();
MyTable = {
["style"] = "default",
["width"] = w,
["height"] = h,
["config"] = "save_348.dat",
["timer"] = 60,
views = {
{
["type"] = "Label",
["text"] = "热血传奇自动任务QQ群336298138,提供免费脚本更新\n使用过程中如果发现错误请截屏发送QQ群\n目前脚本只支持iPhone5/5C/5S/4/4S,其他设备脚本制作中\n运行前请确认已登录游戏\n横屏home键在右边\n使用圈圈的请拉到右下角\n如果点确认后无任何动作请重启触动精灵或重启机器\n发现错误中止可随时再运行,副本内也可\n\n 你的等级是几级,填写0则自动判断",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "请输入您的等级,填写0则自动判断",
["text"] = "0",
},
{
["type"] = "CheckBoxGroup",
["list"] = "使用小飞鞋,使用技能一,使用技能二,使用技能三,日常除魔等任务中插入降魔和教主的匹配",
["select"] = "0@4",
},
{
["type"] = "Label",
["text"] = "___________普通任务___________",
["size"] = 22,
["align"] = "left",
["color"] = "255,0,0",
},
{
["type"] = "CheckBoxGroup",
["list"] = "不想做普通任务,做所有普通任务,任务前整理背包,任务后整理背包,参拜龙卫,石阁试炼,日常任务,主线任务,行会任务,除魔任务,皇城任务,支线任务,挖矿任务,竟技任务,活动深渊,除魔洞窟,教主大厅,活动中心,领取奖励",
["select"] = "4@5@6@7@8@9@10@12@13@14@15@16@18",
},
{
["type"] = "Label",
["text"] = "___________无限任务___________",
["size"] = 22,
["align"] = "left",
["color"] = "255,0,0",
},
{
["type"] = "CheckBoxGroup",
["list"] = "不做无限任务,无限环式任务,无限焰火屠魔,无限活动深渊",
["select"] = "0",
},
{
["type"] = "Label",
["text"] = "下行请输入环式任务运行时间,例如30分钟填1800",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "无限环式任务",
["text"] = "1800",
},
{
["type"] = "Label",
["text"] = "下行请输入无限深渊运行时间,例如60分钟填3600",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "无限深渊",
["text"] = "3600",
},
{
["type"] = "Label",
["text"] = "下行请输入无限深渊时间,几秒进出副本一次",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "几秒进出副本一次",
["text"] = "18",
},
{
["type"] = "Label",
["text"] = "下行请输入焰火屠魔运行时间,例如120分钟填7200",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "焰火屠魔",
["text"] = "7200",
},
{
["type"] = "RadioGroup",
["list"] = "焰火屠魔地图选择:默认Lv20,一心一意Lv10,心心相印Lv20,飞火流星Lv30,浪漫星雨Lv40,绮梦幻想Lv50",
["select"] = "0",
},
{
["type"] = "RadioGroup",
["list"] = "焰火屠魔层数选择:默认随机,一层,二层,三层,四层,五层",
["select"] = "0",
},
{
["type"] = "Label",
["text"] = "___________其他设置___________",
["size"] = 22,
["align"] = "left",
["color"] = "255,0,0",
},
{
["type"] = "Label",
["text"] = "下行输入批量分解白蓝装备间隔时间,99999秒不定时分解",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "批量分解白蓝装备间隔时间,99999秒不定时分解",
["text"] = "99999",
},
{
["type"] = "Label",
["text"] = "下行输入血量低于百分多少换线,填0不换线",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "换线血量",
["text"] = "60",
},
{
["type"] = "Label",
["text"] = "下行输入血量低于百分多少回城,填0不回城",
["size"] = 12,
["align"] = "left",
["color"] = "0,0,255",
},
{
["type"] = "Edit",
["prompt"] = "回城血量",
["text"] = "40",
},
isArray = true
}
}
local MyJsonString = json.encode(MyTable);
return showUI(MyJsonString);
end
function isColor(x,y,c,s)
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
function touch(x,y)
touchDown(1,x,y);mSleep(50);touchUp(1,x,y);mSleep(50)
end
function touchm(x,y,x1,y1)
touchDown(1,x,y);mSleep(50);touchMove(1, x1, y1);mSleep(500);touchUp(1,x1, y1);mSleep(50)
end
function baojing()
vibrator();
end
function pdshebei()
width, height = getScreenSize();
if width == 320 and height == 480 then
shebei=1
elseif width == 640 and height == 960 then
shebei=2
ir=0
im=0
iq=0
yq=0
elseif width == 640 and height == 1136 then
shebei=3
ir=176
im=88
iq=104
yq=-1
elseif width == 750 and height == 1334 then
shebei=4
ir=176
im=88
iq=104
yq=-1
elseif width == 1242 and height == 2208 then
shebei=5
elseif width == 768 and height == 1024 then
shebei=6
elseif width == 1536 and height == 2048 then
shebei=7
end
if shebei~=2 and shebei~=3 then
dialog("该脚本可能无法在您的设备上使用,目前脚本只支持iPhone5/5C/5S/4/4S,其他设备脚本制作中。。。敬请期待", 300)
end
end
function pdfanzhuan()
mSleep(1000)
if isColor(470+im,23,0x5282ff,85) and isColor(485+im,22,0xb50808,85) and isColor(487+im,24,0xd63018,85) and isColor(469+im,24,0x4a79ff,85) then
dialog("请翻转屏幕180度\n保持home键在右边\n准备好后按确认", 999)
end
end
function xunhuan(c,t,s)
if os.time()-t>c*2 then
baojing()
dialog("程序出错,错误代码:"..s,99999)
dialog("将以下知道的发送QQ群336298138\n错误代码:"..s.."\n有没有手动操作\n在做什么任务\n按确认后截屏\n以方便作者改进,谢谢",60);mSleep(1000)
end
pdlixian()
if lixian==1 then
return true
end
end
function xunhuan2(c,t,s)
if os.time()-t>c then
baojing()
dialog("程序出错,超出循环时间",99999)
dialog("将以下知道的发送QQ群336298138\n错误代码"..s.."\n有没有手动操作\n在做什么任务\n按确认后截屏\n以方便作者改进,谢谢",60);mSleep(1000)
end
end
function pddengji()
if dengji==0 then
dengji=1
kongzhifangxiang()
dakaihuodongrili()
mSleep(500);
if dengji<22 then
if isColor(769+im,280,0xdeb284,85) and isColor(790+im,287,0xc69a6b,85) and isColor(817+im,283,0xbd8e5a,85) then
dengji=22
end
end
if dengji<20 then
if isColor(764+im,537,0xd6ae7b,85) and isColor(772+im,540,0xe7ba8c,85) and isColor(788+im,540,0xc69e6b,85) then
dengji=20
end
end
if dengji<18 then
if isColor(576+im,280,0xefc794,85) and isColor(594+im,282,0xbd9263,85) and isColor(619+im,280,0xd6a273,85) then
dengji=18
end
end
if dengji<16 then
if isColor(576+im,537,0xe7c38c,85) and isColor(592+im,550,0xdeb284,85) and isColor(614+im,549,0xdeb284,85) then
dengji=16
end
end
if dengji<11 then
if isColor(373+im,536,0xe7c394,85) and isColor(398+im,539,0xefc394,85) and isColor(417+im,542,0xefc394,85) then
dengji=11
end
end
if dengji<7 then
if isColor(376+im,279,0xdeb284,85) and isColor(411+im,281,0xcea273,85) and isColor(430+im,286,0xb5865a,85) then
dengji=7
end
end
if isColor(638+im,220,0x42ba7b,85) and isColor(656+im,210,0x31a663,85) and isColor(662+im,214,0x42c77b,85) then
rwrichang=1
end
if isColor(795+im,324,0xcec7b5,85) and isColor(796+im,337,0xbdb2a5,85) and isColor(796+im,331,0xbdbaa5,85) then
rwcanbai=1
end
if isColor(841+im,464,0x39a26b,85) and isColor(859+im,472,0x4ac37b,85) and isColor(847+im,474,0x4ac784,85) then
rwchumo=1
end
touchm(510+im,560,510+im,120);mSleep(50);
touchm(510+im,560,510+im,120);mSleep(800);
if dengji<37 then
if isColor(571+im,267,0xe7be8c,85) and isColor(599+im,268,0xdeb284,85) and isColor(614+im,273,0xc69a6b,85) then
dengji=37
end
end
if dengji<35 then
if isColor(385+im,265,0xd6ae7b,85) and isColor(413+im,265,0xdeb684,85) and isColor(430+im,264,0xe7be8c,85) then
dengji=35
end
end
if dengji<50 then
if isColor(572+im,530,0xdeba8c,85) and isColor(582+im,532,0xe7be8c,85) and isColor(614+im,542,0x843c08,85) then
dengji=50
end
end
if isColor(657+im,453,0x31aa63,85) and isColor(657+im,458,0x42c384,85) and isColor(659+im,455,0x292818,85) then
rwxiangmodongku=1
end
end
huidaozhengchanghuamian(0)
if dengji<20 then
if isColor(10,13,0xbdb6ad,85) and isColor(9,24,0xefe3de,85) and isColor(18,19,0xcebeb5,85) and isColor(24,14,0xd6cbc6,85) and isColor(23,24,0xcebeb5,85) then
dengji=20
end
elseif dengji<18 then
if isColor(9,15,0x9c928c,85) and isColor(20,18,0xc6beb5,85) and isColor(19,15,0xd6cfc6,85) and isColor(19,24,0xb5a6a5,85) and isColor(25,21,0xc6beb5,85) and isColor(12,23,0xcec3bd,85) then
dengji=18
end
elseif dengji<3 then
if isColor(13,13,0x948684,85) and isColor(19,15,0xcec7bd,85) and isColor(16,18,0xb5aea5,85) and isColor(19,21,0xbdb2a5,85) and isColor(15,24,0xb5a69c,85) then
dengji=3
end
end
end
function pdditu()
ditu=0
if pdtouxiang() and pdyouxishequ() then
ditu=1
elseif pdfuben() then
ditu=2
elseif isColor(653+im,32,0xffe7c6,85) and isColor(694+im,30,0xf7e3c6,85) and isColor(926+im,29,0x842421,85) then
ditu=3
elseif isColor(780+im,31,0xffe7c6,85) and isColor(805+im,30,0xffe7ce,85) and isColor(925+im,28,0x8c2c29,85) then
ditu=4
end
return ditu
end
function pdfuben()
if isColor(34,147,0xf7e7bd,85) and isColor(31,153,0xdecb9c,85) and isColor(37,160,0x7b4521,85) then
return true
elseif isColor(861+ir,105,0xf7be21,85) and isColor(898+ir,103,0xdeb639,85) and isColor(926+ir,102,0xffcf29,85) and isColor(956+ir,107,0xa5926b,85) and isColor(947+ir,122,0x211410,85) then
return true
elseif isColor(818+ir,45,0x3986de,85) and isColor(829+ir,50,0x397dce,85) and isColor(839+ir,55,0x318ae7,85) and isColor(853+ir,57,0x3186de,85) and isColor(942+ir,81,0xdecb7b,85) then
return true
end
end
function pdtouxiang()
if isColor(96,40,0x9c4510,85) and isColor(114,48,0x312010,85) and isColor(135,49,0x735d31,85)then
return true
end
end
function pdyouxishequ()
if isColor(894+ir,110,0xef9a31,85) and isColor(902+ir,114,0xf7cf5a,85) and isColor(908+ir,128,0xad6500,85)then
return true
end
end
function pdzhidongzhandou(zhandou)
local zhidongzhandou=0
if isColor(880+ir,319,0xefdf7b,85) and isColor(924+ir,317,0xf7df63,85) and isColor(923+ir,336,0xad5931,85) then
zhidongzhandou=1
if zhandou==2 then
touch(880,319)
dialog("取消自动战斗1",1);mSleep(500)
end
end
if isColor(883+ir,248,0xd6b25a,85) and isColor(892+ir,247,0x7b5931,85) and isColor(920+ir,247,0xa5864a,85) then
zhidongzhandou=1
if zhandou==2 then
touch(883+ir,248)
dialog("取消自动战斗2",1);mSleep(500)
end
end
if isColor(885+ir,253,0xce8242,85) and isColor(910+ir,249,0xc69a4a,85) and isColor(919+ir,249,0xbd964a,85) and isColor(915+ir,274,0xdeb663,85) then
zhidongzhandou=0
if zhandou==1 then
touch(885+ir,253)
dialog("开启自动战斗1",1);mSleep(500)
end
end
if isColor(885+ir,321,0xcec363,85) and isColor(911+ir,320,0xb58e4a,85) and isColor(894+ir,328,0xd69242,85) and isColor(884+ir,350,0xd6b663,85) then
zhidongzhandou=0
if zhandou==1 then
touch(885+ir,321)
dialog("开启自动战斗2",1);mSleep(500)
end
end
if isColor(1057-176+ir,314,0xefe7ef,85) and isColor(1096-176+ir,349,0xdeba63,85) and isColor(1087-176+ir,327,0xa56d39,85) and isColor(1071-176+ir,350,0xbd9a52,85) then
zhidongzhandou=0
if zhandou==1 then
touch(885+ir,321)
dialog("开启自动战斗3",1);mSleep(500)
end
end
if zhidongzhandou==1 then
if string.find("@"..shezhi1.."@","@1@") then
touch(850+ir,423);mSleep(200)
end
if string.find("@"..shezhi1.."@","@2@") then
touch(797+ir,477);mSleep(200)
end
if string.find("@"..shezhi1.."@","@3@") then
touch(769+ir,555);mSleep(200)
end
return true
end
end
function pdzhidongxunlu()
if isColor(337+im,164,0x391c18,85) and isColor(341+im,164,0xbd926b,85) and isColor(341+im,169,0x63654a,85) then
if string.find("@"..shezhi1.."@","@0@") then
touch(340+im,170);
dialog("使用小飞鞋",1);mSleep(500)
end
return true
else
end
end
function kongzhifangxiang()
if pdzhidongxunlu() then
suijifangxiang()
else
end
end
function suijifangxiang()
touchm(150,500,50+math.random(50,150),400+math.random(50,150))
end
function pdyidong()
s=0
if isColor(3,108,dian1,85) then
s=s+1
end
if isColor(3,36,dian2,85) then
s=s+1
end
if isColor(274,29,dian3,85) then
s=s+1
end
if isColor(625+ir,7,dian4,85) then
s=s+1
end
if isColor(941+ir,86,dian5,85) then
s=s+1
end
if isColor(946+ir,199,dian6,85) then
s=s+1
end
if isColor(949+ir,309,dian7,85) then
s=s+1
end
if s>6 then
if os.time()-yidongshijian>60 then
suijifangxiang()
dialog("长时间未动作,将随机走动防卡住",1);mSleep(500)
end
else
pdyidongbaocun()
return true
end
end
function pdyidongbaocun()
yidongshijian=os.time()
dian1=getColor(3,108)
dian2=getColor(3,36)
dian3=getColor(274,29)
dian4=getColor(625+ir,7)
dian5=getColor(941+ir,86)
dian6=getColor(946+ir,199)
dian7=getColor(949+ir,309)
end
function dakaihuodongrili()
t112=os.time()
while not(isColor(435+im,28,0xefc794,85) and isColor(470+im,29,0xefc794,85) and isColor(484+im,33,0xefc794,85)) do
huidaozhengchanghuamian(0)
touch(660+ir,130);mSleep(2000);
xunhuan(2500,t112,"112")
end
end
function huidaozhengchanghuamian(yidong)
jiancha()
if yidong==1 then
pdzhidongzhandou(2)
kongzhifangxiang()
elseif yidong==2 then
pdzhidongzhandou(2)
elseif yidong==3 then
kongzhifangxiang()
end
if isColor(853+ir,303,0xe7b24a,85) and isColor(889+ir,388,0xffeb6b,85) and isColor(903+ir,386,0x8c6108,85) then
touch(480+im,580)
end
if isColor(120,132,0xefd342,85) and isColor(131,131,0xd6be31,85) and isColor(150,146,0xd69629,85) then
touch(50,140)
end
mSleep(500)
if os.time()- piliangfenjieshijian>piliangfenjiejiange then
piliangfenjiezhuangbei()
piliangfenjieshijian=os.time()
huidaozhengchanghuamian(0)
end
end
function anquan()
huidaozhengchanghuamian(1)
if isColor(827+ir,57,0x31a663,85) and isColor(866+ir,52,0x31b26b,85) and isColor(845+ir,55,0x31b26b,85) then
else
huicheng()
end
end
function jiancha()
pdditu()
if isColor(461+im,66,0xefcfb5,85) and isColor(471+im,71,0xefd3ad,85) and isColor(496+im,74,0xefd3b5,85) then
touch(870+im,80);
dialog("关闭任务对话框",1);mSleep(500)
end
jiancha1()
jiancha2()
jiancha3()
jiancha4()
end
function jiancha1()
pdjiequrenwu()
if ditu==1 then
zhidongzhudui()
end
if isColor(550+im,529,0xf7be7b,85) and isColor(598+im,528,0xf7ba73,85) and isColor(882+im,101,0x842421,85) then
touch(560+im,520);mSleep(1000)
dialog("每日签到领奖",1);mSleep(500)
end
if isColor(550+im,529,0xf7be7b,85) and isColor(598+im,528,0xf7ba73,85) and isColor(882+im,101,0x842421,85) then
touch(880+im,100)
dialog("每日签到关闭XX",1);mSleep(500)
end
if isColor(491+im,316,0xdeba5a,85) and isColor(481+im,367,0x212010,85) and isColor(474+im,9,0x736d6b,85) then
touch(490+im,320)
dialog("关闭左边聊天框",1);mSleep(500)
end
if isColor(311-88+im,360,0x00ff00,85) and isColor(802-88+im,141,0x7b2421,85) and isColor(810-88+im,150,0x732421,85) then
touch(240+im,340);mSleep(500);
dialog("跳转地图",1);mSleep(500)
end
if isColor(718+im,137,0xe7be8c,85) and isColor(723+im,141,0xceb69c,85) and isColor(726+im,144,0xdeaa6b,85) then
touch(720+im,140)
dialog("关闭NPC对话框", 1);mSleep(500)
end
if isColor(66+im,330,0x847952,85) and isColor(892+im,286,0x847952,85) and isColor(908+im,84,0x732421,85) then
touch(920+im,80)
dialog("关闭活动中心",1);mSleep(500)
end
if isColor(516+im,298,0xd6cfbd,85) and isColor(526+im,308,0xdecfbd,85) and isColor(539+im,310,0xd6cbbd,85) then
touch(570+im,410)
dialog("提示是否进入挂机,取消",1);mSleep(500)
end
if isColor(464+im,27,0xf7c794,85) and isColor(498+im,27,0xefc794,85) and isColor(925+im,29,0x7b2021,85) then
touch(930+im,30)
dialog("充值页面关闭XX",1);mSleep(500)
end
if isColor(497+im,445,0xefc794,85) and isColor(514+im,447,0xefc794,85) and isColor(233+im,294,0x080408,85) and isColor(238+im,202,0xe7be8c,85) then
touch(480+im,450)
dialog("挂机结束",1);mSleep(500)
end
if isColor(441+im,210,0xe7be94,85) and isColor(472+im,212,0xefc794,85) and isColor(484+im,218,0xefc794,85) and isColor(506+im,213,0xe7c394,85) and isColor(369+im,193,0x393c31,85) then
touch(570+im,410)
dialog("取消组队邀请",1);mSleep(500)
end
if isColor(444+im,146,0xdebe94,85) and isColor(461+im,150,0xefc79c,85) and isColor(471+im,154,0xefcb9c,85) and isColor(493+im,158,0xe7be94,85) and isColor(463+im,154,0x5a595a,85) then
touch(785+im,145)
dialog("目标选择框关闭XX",1);mSleep(500)
end
if isColor(931+im,24,0xf7d7bd,85) and isColor(934+im,26,0xdecbb5,85) and isColor(935+im,28,0xc6aa84,85) then
touch(930+im,30)
dialog("背包XX关闭",1);mSleep(500)
end
if isColor(438+im,39,0xefc794,85) and isColor(491+im,33,0xefc38c,85) and isColor(491+im,41,0xefc38c,85) and isColor(924+im,27,0x732829,85) then
touch(930+im,30)
end
if isColor(931+im,23,0xefd3b5,85) and isColor(933+im,26,0xdec7ad,85) and isColor(936+im,28,0xc69e73,85) then
touch(930+im,30)
dialog("关闭XX",1);mSleep(500)
end
if isColor(796+im,32,0xf7e3c6,85) and isColor(801+im,33,0xf7e3c6,85) and isColor(829+im,37,0xe7d7b5,85) then
touch(930+im,30)
dialog("除魔对话框关闭XX",1);mSleep(500)
end
if isColor(660+im,321,0xefe7de,85) and isColor(641+im,320,0xefe3de,85) and isColor(609+im,518,0xefc794,85) then
touch(890+im,93);mSleep(1000);
zhixian=9
end
if isColor(549,517,0xe7be8c,85) and isColor(609,519,0xefc394,85) and isColor(884,91,0x8c2829,85) then
touch(890+im,93);mSleep(1000);
end
if ditu==3 or ditu==4 then
touch(930+im,30)
dialog("关闭当前地图或世界地图的XX",1);mSleep(500)
end
if isColor(433+im,147,0xcecbbd,85) and isColor(448+im,158,0xe7dfd6,85) and isColor(482+im,154,0xefe3d6,85) and isColor(520+im,154,0xe7d7ce,85) then
end
pdtiaoguoyindao()
pdtiaoguojuqing()
end
function zhidongzhudui()
if isColor(236+im,167,0xefc794,85) and isColor(263+im,171,0xceae84,85) and isColor(263+im,183,0xc6aa7b,85) and isColor(237+im,181,0x423c39,85) then
if isColor(754-88+im,421,0xf7f3f7,85) and isColor(754-88+im,423,0xe7e3de,85) and isColor(754-88+im,425,0xe7dfde,85) and isColor(760-88+im,428,0xe7e7e7,85) and isColor(761-88+im,430,0xefefe7,85) then
touch(460+im,490)
elseif isColor(759-88+im,421,0xeff7f7,85) and isColor(759-88+im,423,0xd6dbde,85) and isColor(759-88+im,425,0xdedfde,85) and isColor(759-88+im,427,0xdedfde,85) and isColor(759-88+im,430,0xfffbf7,85) and isColor(759-88+im,433,0xdedfde,85) then
if rwxiangmodongku~="0" and rwjiaozhudating=="0" then
touch(460+im,490)
end
else
touch(785+im,118)
end
end
end
function pdtiaoguojuqing()
if isColor(870+ir,21,0xf7cf29,85) and isColor(931+ir,18,0xf7d731,85) and isColor(945+ir,29,0x312c29,85) and isColor(827+ir,31,0xc68a21,85) then
touch(872+ir,26)
dialog("跳过剧情",1);mSleep(500)
end
end
function pdtiaoguoyindao()
if isColor(422+im,24,0x7b5d21,85) and isColor(461+im,27,0x8c6521,85) and isColor(491+im,24,0xb58e31,85) then
touch(480+im,30)
dialog("跳过引导",1);mSleep(500)
end
end
function pdrenwuwancheng()
if isColor(695+im,342,0xefcb94,85) and isColor(745+im,342,0xefc794,85) and isColor(796+im,136,0x842821,85) then
touch(706+im,350)
dialog("任务完成",1);mSleep(500)
end
end
function pdjiequrenwu()
if isColor(695+im,342,0xefcb94,85) and isColor(695+im,348,0xefc794,85) and isColor(796+im,136,0x842821,85) then
touch(706+im,350)
dialog("接取任务,完成任务",1);mSleep(500)
end
if isColor(695+im,378,0xefc794,85) and isColor(695+im,383,0xefc38c,85) and isColor(795+im,136,0x842429,85) then
touch(700+im,380)
dialog("接取任务,完成任务,日常",1);mSleep(500)
end
end
function jiancha2()
if isColor(529+im,411,0xe7c384,85) and isColor(606+im,414,0xefc38c,85) and isColor(464+im,214,0xefc794,85) and isColor(665+im,456,0x393431,85) then
touch(570+im,410)
dialog("新称号",1);mSleep(500)
end
if isColor(661+ir,494,0xefc794,85) and isColor(667+ir,489,0xefc394,85) and isColor(701+ir,351,0x843021,85) then
touch(646+ir,494);mSleep(1500)
touch(646+ir,494)
dialog("领取礼包",1);mSleep(500)
end
if isColor(399+ir,240,0xffffff,85) and isColor(441+ir,258,0xffffff,85) and isColor(513+ir,262,0xffffff,85) and isColor(551+ir,260,0xffffff,85) and isColor(460+ir,406,0xffffff,85) and isColor(496+ir,390,0x000000,85) then
touch(400+ir,475)
dialog("低电池电量",1);mSleep(500)
end
if isColor(372+im,197,0xe7be5a,85) and isColor(377+im,197,0x181800,85) and isColor(385+im,197,0xf7cb5a,85) and isColor(431+im,196,0xf7ef9c,85) then
touch(646+im,494)
dialog("礼包框",1);mSleep(500)
end
pdlijizhuangbei()
end
function pdlijizhuangbei()
if isColor(558+ir,442,0xdebe8c,85) and isColor(566+ir,453,0xefc794,85) and isColor(585+ir,440,0x847d6b,85) then
touch(637+ir,492)
dialog("立即装备",1);mSleep(500)
end
end
function jiancha3()
pdxueliang()
pdsiwang()
pdyidong()
if pdlixian() then
end
end
function pdsiwang()
if ditu==1 then
if isColor(558+im,264,0xffef00,85) and isColor(593+im,373,0xe7c394,85) and isColor(618+im,379,0xe7be8c,85) then
playAudio("../lua/qicheshenyin.wav");mSleep(3000);
dialog("死亡1", 2);mSleep(1000)
touch(600+im,380)
return true
end
elseif ditu==2 then
if isColor(558+im,264,0xffef00,85) and isColor(436+im,381,0xefc794,85) and isColor(464+im,381,0xefc794,85) and isColor(483+im,382,0xefc794,85) and isColor(530+im,381,0xadaa9c,85) then
playAudio("../lua/qicheshenyin.wav");mSleep(3000);
dialog("死亡2", 2);mSleep(1000)
touch(600+im,380)
return true
end
if isColor(338+im,272,0xcec3b5,85) and isColor(340+im,279,0xd6cbb5,85) and isColor(364+im,280,0xc6baa5,85) and isColor(373+im,278,0xd6cbb5,85) and isColor(365+im,408,0xefc384,85) then
playAudio("../lua/qicheshenyin.wav");mSleep(3000);
dialog("死亡3", 2);mSleep(1000)
return true
end
end
end
function pdxueliang()
if isColor(476+im,538,0xe7e3ce,85) and isColor(483+im,538,0xe7d7c6,85) then
if isColor(472+im,540,0x420c08,85) then
xueliang=90
elseif isColor(472+im,550,0xad1018,85) then
xueliang=80
elseif isColor(472+im,560,0xa52021,85) then
xueliang=70
elseif isColor(472+im,570,0xa51010,85) then
xueliang=60
elseif isColor(472+im,580,0x940000,85) then
xueliang=50
elseif isColor(472+im,590,0xa50000,85) then
xueliang=40
elseif isColor(472+im,600,0xc61810,85) then
xueliang=30
elseif isColor(472+im,610,0xde3821,85) then
xueliang=20
elseif isColor(472+im,620,0x9c1808,85) then
xueliang=10
elseif isColor(471+im,625,0x212018,85) then
xueliang=1
end
end
if ditu==2 then
if xueliang<huanxianxueliang then
touchDown(1,150,500);
mSleep(50);touchMove(1,100,500);mSleep(1000)
mSleep(50);touchMove(1,100,550);mSleep(1000)
mSleep(50);touchMove(1,150,550);mSleep(1000)
mSleep(50);touchMove(1,200,550);mSleep(1000)
mSleep(50);touchMove(1,200,500);mSleep(1000)
mSleep(50);touchMove(1,200,450);mSleep(1000)
mSleep(50);touchMove(1,150,450);mSleep(1000)
mSleep(50);touchMove(1,100,450);mSleep(1000)
touchUp(1,100,450);mSleep(50)
dialog("警告:血量低于百分"..xueliang..",离怪",1);mSleep(500)
end
elseif ditu==1 then
if xueliang<huichengxueliang then
huicheng()
dialog("低血量警告,回城",1);mSleep(500)
elseif xueliang<huanxianxueliang then
huanxian()