接下来是代码关于思路就是,使角色跑动,通过图片判断是否成功,具体角色初始面对哪里我之后补图
然后使用时微调角色跑动时间就是keydownXX下面一句话。DelayXXXX
其中FindPic意思是寻找图片。请按照自己游戏分辨率修改1600X900这里,然后通过按键抓抓功能截图保存到桌面,让按键使用
还有就是由于楼主一直使用旧版按键精灵9,新的2014版本用不惯,所以尽量下载旧版按键使用,以免新版不支持某些语句
接下来是图,忘记了,好像现在没有自动对话插件了,自己在按键里加一下鼠标移动到对话选项并且按下鼠标左键吧,不会加再加我YY,我会给你们写好,然后自己复制进去。
Rem a
Delay 5000
//放弃后重新跑位
KeyDown "D", 1
Delay 2700
KeyUp "D", 1
Delay 1000
KeyDown "W", 1
Delay 3450
KeyUp "W", 1
Delay 1000
KeyDown "D", 1
Delay 3500
KeyUp "D", 1
Delay 1000
KeyDown "W", 1
Delay 500
KeyUp "W", 1
Delay 1000
KeyPress "Num .", 1
//重新对话开始任务
Delay 1000
KeyDown "S", 1
Delay 1000
KeyUp "S", 1
Delay 1000
KeyDown "A", 1
Delay 3500
KeyUp "A", 1
Delay 1000
KeyDown "S", 1
Delay 6900
KeyUp "S", 1
Delay 1000
KeyDown "A", 1
Delay 2700
KeyUp "A", 1
Delay 1000
//到位待机,等待NPC就位
KeyDown 17, 1
KeyPress 113, 1
KeyUp 17, 1
i1=1
While i1=1
FindPic 0,0,1600,900,"C:\Users\Tomato\Desktop\21.bmp",0.7,intX,intY
If intX > 0 And intY > 0 Then
i1 = 0
End If
Wend
KeyPress "1", 1
Delay 500
KeyPress "4", 1
Delay 500
KeyDown 17, 1
KeyPress 113, 1
KeyUp 17, 1
//任务失败,放弃重新接取
i2=1
While i2=1
FindPic 0,0,1600,900,"C:\Users\Tomato\Desktop\22.bmp",0.7,intX,intY
If intX > 0 And intY > 0 Then
i2 = 0
End If
Wend
KeyPress "U", 1
Delay 500
MoveTo 122, 199
Delay 500
LeftClick 1
Delay 500
MoveTo 465, 477
Delay 500
LeftClick 1
Delay 500
MoveTo 734, 294
Delay 500
LeftClick 1
Delay 500
MoveTo 752, 194
LeftClick 1
Delay 500
KeyPress "Esc", 1
//已放弃
Goto a