1、来自按键精灵的DNF刷第一图源码 被虐疯了才憋出一个可以解恨的DNF刷图源码,源码内包含了换角色、 改键、 区域移动 、地图选择、 出售、 封装识别 。18个地图的一图 (其他地图可以自己修改下就可以刷全部图的一图) 主要是给新手学习的, 老鸟别喷 。附件在下面 ,做了很久了, 随着游戏更新现在不一定能正常使用可以自己修改下: PutAttachment ".\plugin" ,"*.dll" UserVar dtxz=DropList{"洛兰(1)":"0"|"洛兰深处(2)":"1"|"幽暗密林(3)":"2"|"雷鸣废墟(5)":"3"|"冰霜幽暗密林(8)":"4"|"烈焰格拉
2、卡(12)":"5"|"龙人之塔(16)":"6"|"人偶玄关(18)":"7"|"石巨人塔(20)":"8"|"黑暗玄廊(22)":"9"|"城主宫殿(25)":"10"|"神殿外围(27)":"11"|"树精丛林(28)":"12"|"炼狱(29)":"13"|"极昼(30)":"14"|"第一脊椎(32)":"15"|"第二脊椎(34)":"16"|"天帷禁地(36)":"17"|"()":"5"|"()":"5"|"()":"5"|"()":"5"|"()":"5"|"()":"5"|"()":"5"|"()":"5"}=0 "地图选择" UserVar bjfs=DropList{
3、"机箱":"0"|"音响":"1"}=0 "报警方式" UserVar jsgh=DropList{"更换":"0"|"不换":"1"}=0 "角色更换" UserVar jssl=1 "角色数量" UserVar jhks=1 "几号开始" UserVar jtj1=0 "进图按键" UserVar jtj2=0 "进图按键" UserVar jtj3=0 "进图按键" UserVar ctj1=0 "出图按键" UserVar ctj2=0 "出图按键" UserVar jqaj=0 "捡取按键" UserVar csaj=0 "出售按键" Hwnd = Plugin
4、Window.Find(0, "地下城与勇士") Call Plugin.Window.Move(Hwnd, 0, 0) Delay 1000 Rem 主程序 Call 选择角色() Call 疲劳改键() Call 移动区域() Call 地图选择() Goto 主程序 Sub 选择角色() If jsgh=0 Then IfColor 210,440,"6B949C",0 Then jsx=117 jsy=137 If jhks<5 Then
5、 For jhks-1 jsx=jsx+130 Next Else For jhks-5 jsx=jsx+130 Next jsy=jsy+185 End If jhks=jhks+1 MoveTo jsx, jsy LeftClick 1
6、 Delay 1000 MoveTo 322, 448 LeftClick 1 Else If jhks>jssl Then Call 报警提醒() End If For 3 IfColor 316,271,"484849",0 Then Else MoveTo 39, 434
7、 LeftClick 1 Delay 300 KeyPress "Esc", 1 Delay 1000 End If Next MoveTo 316, 344 LeftClick 3 For 30 IfColor 210,440,"6B949C",0 Then
8、 Goto 主程序 Else Delay 1000 End If Next Call 报警提醒() End If End If End Sub Sub 疲劳改键() For 30 IfColor 40,400,"608A9D",0 Then For 3 IfColor 278,4
9、37,"F78C00",0 Then Goto 疲劳改键 Else MoveTo 39, 434 LeftClick 1 Delay 300 KeyPress "Esc", 1 Delay 1000 End If Next If
10、 jsgh=1 Then Call 报警提醒() End If Goto 主程序 Else Delay 1000 End If Next Call 报警提醒() Rem 疲劳改键 For 3 IfColor 316,271,"484849",0 Then Else KeyPress "Esc", 1 Delay 1000
11、 End If Next MoveTo 315, 317 LeftClick 3 Delay 1000 MoveTo 407, 163 LeftClick 1 Delay 300 KeyPress "W", 1 Delay 300 KeyPress "A", 1 Delay 300 KeyPress "S", 1 Delay 300 KeyPress "D", 1 Delay 300 MoveTo 372, 401
12、 LeftClick 1 Delay 1000 LeftClick 1 Delay 1000 For 3 IfColor 566,38,"8DEDFF",0 Then Else MoveTo 344, 188 LeftClick 1 Delay 1000 MoveTo 404, 240 LeftClick 1 Delay 1000 End If
13、 Next MoveTo 163, 401 LeftClick 1 Delay 300 Call 出售物品() End Sub Sub 移动区域() KeyDown "S", 1 Delay 8000 KeyUp "S", 1 Delay 300 If dtxz<2 Then MoveTo 400, 360 RightClick 1 Delay 1000 KeyDown "D", 1 zyj=1
14、 End If If dtxz>1 And dtxz<6 Then KeyDown "S", 1 Delay 300 KeyDown "A", 1 Delay 3500 KeyUp "S", 1 zyj=0 End If If dtxz>5 And dtxz<11 Then KeyDown "D", 1 zyj=1 End If If dtxz>10 And dtxz<18 Then
15、 MoveTo 20, 90 RightClick 1 Delay 5000 MoveTo 280, 380 RightClick 1 Delay 1000 KeyDown "D", 1 zyj=1 End If For 50 IfColor 573,428,"8DC5DD",0 Then Goto 移动区域 Else Delay 1000 En
16、d If Next Call 报警提醒() Rem 移动区域 If zyj=0 Then KeyUp "A", 1 Else KeyUp "D", 1 End If Delay 300 End Sub Sub 地图选择() If dtxz=0 Then dtx=147 dty=389 End If If dtxz=1 Then dtx=309 dty=384 End If
17、 If dtxz=2 Then dtx=147 dty=389 End If If dtxz=3 Then dtx=472 dty=352 End If If dtxz=4 Then dtx=123 dty=305 End If If dtxz=5 Then dtx=340 dty=188 End If If dtxz=6 Then dtx=130
18、 dty=376 End If If dtxz=7 Then dtx=295 dty=391 End If If dtxz=8 Then dtx=441 dty=331 End If If dtxz=9 Then dtx=504 dty=256 End If If dtxz=10 Then dtx=366 dty=181 End If I
19、f dtxz=11 Then dtx=192 dty=227 End If If dtxz=12 Then dtx=340 dty=188 End If If dtxz=13 Then dtx=494 dty=192 End If If dtxz=14 Then dtx=518 dty=269 End If If dtxz=15 Then dtx=472
20、 dty=352 End If If dtxz=16 Then dtx=309 dty=384 End If If dtxz=17 Then dtx=147 dty=389 End If cswp=0 Rem 地图选择 If zyj=0 Then KeyDown "D", 1 Delay 500 KeyUp "D", 1 KeyDown "A", 1
21、 Else KeyDown "A", 1 Delay 500 KeyUp "A", 1 KeyDown "D", 1 End If For 30 IfColor 573,428,"8DC5DD",0 Then If zyj=0 Then KeyUp "A", 1 Else KeyUp "D", 1 End If D
22、elay 300 For 10 IfColor 573,428,"8DC5DD",0 Then KeyPress "D", 3 Delay 300 MoveTo dtx, dty LeftClick 1 Delay 1000 Else Call 地图内部
23、) Goto 地图选择 End If Next Delay 30000 Goto 主程序 Else Delay 1000 End If Next Call 报警提醒() End Sub Sub 地图内部() For 30 IfColor 40,400,"608A9D",0 Then KeyPress "
24、Esc", 3 Delay 300 KeyPress jtj1, 1 Delay 300 KeyPress jtj2, 1 Delay 300 KeyPress jtj3, 1 Delay 300 For 50 IfColor 582,49,"263C44",0 Then IfColor 582,88,"10212
25、9",0 Then IfColor 562,68,"102931",0 Then IfColor 602,68,"102131",0 Then For 5 KeyPress "X", 1 Delay 300 Ne
26、xt Else Goto 地图内部 End If Else Goto 地图内部 End If Else Goto 地图内部 E
27、nd If Else Goto 地图内部 End If Next Goto 地图内部 Else Delay 1000 End If Next Call 报警提醒() Rem 地图内部 KeyPress ctj1, 1 Delay 300 KeyPress ctj2, 1 Delay 300 cs
28、wp=cswp+1 If jqaj>0 Then For 10 KeyPress jqaj, 1 Delay 300 Next End If If csaj>0 Then If cswp>10 Then For 3 IfColor 566,38,"8DEDFF",0 Then Else KeyPress "I", 1
29、 Delay 1000 End If Next KeyPress csaj, 1 Delay 300 Call 出售物品() cswp=0 End If End If For 3 IfColor 316,271,"484849",0 Then Else KeyPress "Esc", 1
30、 Delay 1000 End If Next MoveTo 316, 396 LeftClick 3 Delay 5000 End Sub Sub 出售物品() MoveTo 547, 353 LeftClick 1 Delay 300 MoveTo 356, 207 LeftClick 3 Delay 1000 zby=234 For 2 zbx=347 For 7 MoveTo
31、 zbx, zby Delay 500 FindPic 325,0,640,480,"Attachment:\金币.bmp",1,ux,uy If ux > 0 And uy > 0 Then FindPic 325,0,640,480,"Attachment:\封装.bmp",1,ux,uy If ux > 0 And uy > 0 Then Else FindPic 32
32、5,0,640,480,"Attachment:\无法.bmp",1,ux,uy If ux > 0 And uy > 0 Then Else LeftClick 1 Delay 500 LeftClick 1 Delay 500 End If
33、 End If Else FindPic 325,0,640,480,"Attachment:\无法.bmp",1,ux,uy If ux > 0 And uy > 0 Then Else Goto 出售物品 End If End If zbx=zbx+30 Next zby=zby+30 N
34、ext Rem 出售物品 MoveTo 403, 207 LeftClick 3 Delay 1000 FindPic 0,0,640,480,"Attachment:\魔盒.bmp",0.9,ux,uy If ux > 0 And uy > 0 Then MoveTo ux+6, uy+12 LeftClick 1 Delay 500 LeftClick 1 Delay 500 LeftClick 1 End If
35、 Delay 300 KeyPress "Esc", 1 Delay 300 End Sub Sub 报警提醒() Rem 报警提醒 If bjfs=0 Then For 2 Beep Delay 1000 Next End if If bjfs=1 Then Path = Plugin.Sys.GetDir(0) Path=Path & "\W.wav" Call Plugin.Media.Play(Path) Delay 2000 End if Goto 报警提醒 End Sub






