[按键精灵] 纯文本查看 复制代码
/*
作者:紫猫学员-1027 QQ822641801
游戏:龙之谷
功能:直线跑图
*/
/****************定义数组********************/
Dim 怪条1=Array (0,0,0,0,"233DFF","-1|10|233DFF,0|17|233DFF,0|32|233DFF,0|42|233DFF,1|52|233DFF,3|3|213785,3|37|293F93,3|63|1D3480")
Dim Boos=Array (655,551,710,638,"ADECDE","-2|17|359FC2,6|-6|84DBEA,13|34|C9F1FE,-6|-8|394F75,-12|4|576D96")
Dim 三D=Array (556,87,579,119,"FFFFFF","0|5|FFFFFF,-4|6|FFFFFF,-7|5|F9F9FA,-13|6|FFFFFF,-14|2|FFFFFF")
Dim 主城=Array (610,103,680,231,"2FCEED","20|4|DC6100,51|0|523535,22|91|5CE9F9,43|101|452D2D")
Dim 跳过 = Array (653,1166,694,1268,"00C6E6","4|-67|00C3E3,-10|-70|00C2E2,8|-23|00C6E5,-18|-53|000000,10|0|000000")
Dim 在副本中=Array (631,76,686,126,"00FF27","-6|0|26CA00,-18|2|FFC800,-24|1|FF9D00,-30|2|4680A5,3|-10|4B91CB")
Dim 新手副本=Array (100, 54,92, 53,83, 54,58, 54)
/****************任务********************/
Dim 主线任务=Array (201,11,547,82,"47D469","5|0|47DA6B,-6|0|45C96A,0|21|48DA6A,4|21|47CC68,-4|22|48D76A,-5|-14|48E26C,7|-15|47D86A")
Dim 主线任务1=Array (201,11,547,82,"8EFFB1","-5|1|8AFFAC,-11|1|87FFA6,2|-14|98FFBC,-10|-14|98FFBC,-1|21|7EFF9F,-5|21|81FFA4,-3|14|82FFA3")
Dim NPC对话=Array (1,817,223,1024,"26222F","-5|-51|26222F,170|-33|262330,166|100|26232F,191|12|6392BA,192|-13|A4DBF5")
/****************进入副本********************/
Dim 入场=Array (76,775,177,879,"133196","-5|-10|E6ECF6,-16|-16|3F4050,-41|-23|122074,-52|-7|254474,-50|-42|244576")
Dim 第一个=Array (467,371,519,436,"125681","2|14|13507E,-16|2|3A293A,-8|-22|251425,-8|28|18071C,-3|23|4A5357,1|-22|475050")
Dim 第一个1=Array (467,371,519,436,"1FA7F8","109|-7|1AE0FF,-15|2|776087,-10|-24|5C5171,-3|18|8FA0A3,4|-25|8A9B9B")
/****************副本********************/
Dim 阴影森林=Array (697,1154,716,1230,"719AA6","10|4|9AD1E3,7|7|8EC1D1,7|21|A3DEF1,3|39|9FD7E9,10|43|A6E1F4,8|57|A7E5F7,5|57|A8E7F9,8|64|ABE9FD,5|64|ADEBFF")
Dim 阴影森林XY=Array (79,116,107,104)
Dim xy=Array (102,32,114,47,114,53,59,63)
/*********************************************/
// TracePrint FindColorS (第一个,1)
//打怪
// EndScript
// /*********************************************/
//打怪
//EndScript
Dim 当前应用包名
当前应用包名 = sys.GetFront()
TracePrint 当前应用包名
Dim addr = "0x0"
Dim tb1 = {"lv":16}
Dim tb2 = {"lv":79,"offset":8}
Dim tb3 = {"lv":353067044,"offset":8}
Dim tb = {tb1, tb2,tb3}
Dim tb11 = {"lv":8}
Dim tb21 = {"lv":257,"offset":20}
Dim tb31 = {"lv":10,"offset":116}
Dim tb12 = {tb11, tb21, tb31}
Do
Dim B2 = Sys.MemorySearch(当前应用包名, True,addr, tb12, "i32",0,1)
Dim A = Sys.MemorySearch(当前应用包名, True,addr, tb, "i32",0,5)
Dim B = Sys.MemorySearch(当前应用包名, True,addr, tb, "i32",0,5)
If B2 <> null and A <> null and b <> null Then
Exit Do
End If
Delay 300
Loop
Dim 等级1地址 = 地址相加(B2(0), 192)
Dim DJ=Sys.MemoryRead(当前应用包名,等级1地址, "i32") '等级
Dim 坐标地址X = 地址相加(A(0),-8)
Dim 坐标地址Y = 地址相加(B(0), -76)
Dim 线程ID = Thread.Start (坐标,当前应用包名,坐标地址X,坐标地址Y)
//TracePrint 判断卡屏()
//EndScript
Do
Select Case DJ
Case "1"
TracePrint "你输入的是0或者1"
If FindColorS(主城, 0) = True Then
主线
Else
跑图(新手副本)
End If
Case Else
TracePrint "请输入0到4这五个数字!"
End Select
Delay 100
Loop
Sub 主线()
Do
If 判断卡屏() = True Then
If FindColorS(主线任务, 1) = True or FindColorS(主线任务1, 1) = True Then
ElseIf FindColorS(NPC对话, 1) = True Then
ElseIf FindColorS(第一个, 1) = True or FindColorS(第一个1, 1) = True Then
ElseIf FindColorS(入场, 1) = True Then
ElseIf FindColorS(跳过, 1) = True Then
ElseIf FindColorS(在副本中, 1) = True Then
副本
Else
Tap 94,871
End If
End If
Loop
End Sub
Sub 副本()
If FindColorS (三D,1)=True
Tap 633, 33
End If
If FindColorS(阴影森林, 0) = True Then
跑图(阴影森林XY)
End If
End Sub
Sub 跑图(ArrMode)
Dim Arr()=ArrMode
Dim mode=((UBound (Arr)+1)/2)-1
TracePrint "坐标一共有:",mode
TracePrint Arr(0),Arr(1)
Dim a=0,intX, intY
Do
Dim 序号 = FindColor(582,1158,656,1223, "000099", 0, 0.85, intX, intY)
Delay 100
If 序号 > -1 or FindColorS(Boos, 0) = True Then
打怪
ElseIf FindColorS(NPC对话, 1) = True or FindColorS(跳过, 1) = True Then
ElseIf FindColorS(主城, 0) = True Then
Exit Sub
ElseIf a = 0 Then
If mode >= 0 Then
If XL(Arr(0),Arr(1)) = True Then
a=1
End If
End If
ElseIf a = 1 Then
If Mode >= 1 Then
If XL(Arr(2),Arr(3)) = True Then
a = 2
End If
End If
ElseIf a = 2 Then
If Mode >= 2 Then
If XL(Arr(4),Arr(5)) = True Then
a=3
End If
End If
ElseIf a = 3 Then
If mode >= 3 Then
If XL(Arr(6),Arr(7)) = True Then
a=4
End If
End If
ElseIf a = 4 Then
If mode >= 4 Then
If XL(Arr(8),Arr(9)) = True Then
a=5
End If
End If
ElseIf a = 5 Then
If mode >= 5 Then
If XL(Arr(10),Arr(11)) = True Then
a=6
End If
End If
End If
Delay 500
TracePrint "a的值: ",a
Loop
End Sub
Function 判断卡屏()
判断卡屏=False
Dim x,y,ab
Do
x = Thread.GetShareVar("Pmx")
y = Thread.GetShareVar("PmY")
TracePrint x,y
Delay 1000
a=x:b=y
If x = a and y = b Then
判断卡屏=True
End If
Loop Until a <> null
End Function
Sub 打怪()
TracePrint "打怪"
Dim 颜色数量
Dim xy_arr={{35,852,88,902},{32,965,79,1011},{131,973,174,1016},{221,1014,267,1059},{265,1106,307,1150},{269,1206,307,1249}}
Dim JN_arr={61, 874,54,990,159,991,251,1034,259,1130,291,1210}
Dim intX, intY, 序号
Do
序号 = FindColor(582,1158,656,1223, "000099", 0, 0.85, intX, intY)
TracePrint "有没有怪",序号
If 序号 > -1 Then
For i = 0 To 5
颜色数量 = GetColorNum(xy_arr(i,0), xy_arr(i,1),xy_arr(i,2),xy_arr(i,3), "F1F1F9|FFFFFF", 0.9)
If 颜色数量 > 100 Then
For a=0 to 11 Step 1
Tap JN_arr(a), JN_arr(a + 1)
Next
Else
Delay 1000
Tap 155,1122
End If
Next
Else
Exit Sub
End If
Loop
End Sub
Sub 坐标(当前应用包名,坐标地址X,坐标地址Y)
Do
dim PmX =CLng (Sys.MemoryRead(当前应用包名,坐标地址X, "f32"))
dim PmY =Clng (Sys.MemoryRead(当前应用包名,坐标地址Y, "f32"))
Thread.SetShareVar "PmY", PmY
Thread.SetShareVar "PmX", PmX
// TracePrint PmX,PmY
Delay 50
Loop
End Sub