按键精灵软件制作DNF刷图脚本
的有关信息介绍如下:作为脚本爱好者,菜鸟级的我练手写了个DNF自动刷图脚本,用的是大漠插件。
大概思路如下:
PutAttachment"C:\test_game","*.*"
CallPlugin.RegDll.Reg("C:\test_game\dm.dll")
setdm=createobject("dm.dmsoft")
dm_ret=dm.SetPath("c:\test_game")
setws=createobject("Wscript.Shell")
ws.run"regsvr32c:\test_game\dm.dll/s"//注册大漠到系统
ver=dm.Ver()
Iflen(ver)=0Then
MessageBox"创建对象失败,检查系统是否禁用了vbs脚本权限"
EndScript
EndIf
hwnd=dm.GetForegroundWindow()
dm.MoveWindowhwnd,0,0
dm.SetDict1,"DNF字库.txt"
Dim第一次
第一次=0
Delay500
dm_ret=dm.BindWindow(hwnd,"normal","normal","normal",0)
Delay200
Ifdm_ret=0Then
MessageBox"绑定“失败”"
ExitScript
EndIf
UserVar行数=1"你的仓库在第几行"
UserVar名字="仓库""你仓库的名字"
x=420
y=124+(行数-1)*37
xx=500
yy=124+行数*37
info=dm.FetchWord(x,y,xx,yy,"ddc593",名字)
Iflen(info)>0Then
dm.SetPath"c:\test_game"
dm.AddDict0,info
dm.SaveDict0,"test.txt"
Else
MsgBox"不符合条件"
EndIf
dm.keypress27
Delay300
dm.keypress66
Delay300
dm.moveto595,91
dm.leftdown
Delay50
dm.leftup
Delay50
Do
dm_ret=dm.FindStr(411,122,507,494,名字,"ddc593",1.0,intX,intY)
IfintX>=0andintY>=0Then
dm.MoveTointX,intY
dm.LeftClick
Delay200
dm.MoveTointX+5,intY+30
dm.LeftClick
Delay100
For5
dm.keypress8
Delay100
Next
dm.keypress49
Delay100
dm.keypress13
Delay100
dm.keypress13
Delay100
Exitdo
Else
dm.keypress113
Delay10
EndIf
Loop