资源描述:
《大话2脚本常用命令.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、大话2窗口调整:Dimxy2xy2=Plugin.Window.Foreground()CallPlugin.Window.Min(xy2)Delay500CallPlugin.Window.Restore(xy2)Delay500大话飞行棋Function飞行棋KeyDown18,1KeyPress69,1KeyUp18,1Delay1000Ifform1.物品栏1.Value=1orform1.物品栏2.Value=1orform1.物品栏3.value=1orform1.物品栏4.value=1ThenEndIfDelay1000I
2、fform1.物品栏1.Value=1ThenFindPic0,0,1024,768,"Attachment:物品栏1.bmp",0.9,物品栏1X,物品栏1YIf物品栏1X>0ThenDelay500Call移动点击(物品栏1X-2,物品栏1Y-2)Delay500EndIfIfform1.物品栏2.Value=1ThenFindPic0,0,1024,768,"Attachment:物品栏2.bmp",0.9,物品栏2X,物品栏2YIf物品栏2X>0ThenDelay500Call移动点击(物品栏2X-2,物品栏2Y-2)Dela
3、y500EndIfIfform1.物品栏3.Value=1ThenFindPic0,0,1024,768,"Attachment:物品栏3.bmp",0.9,物品栏3X,物品栏3YIf物品栏1X>0Thencommand:ShowLine
4、453A5CB0B4BCFCBEABC1E9395C514D5363726970745CD7D4B6AFB1B8B7DD5CCBAEC4AB2E5100
5、472
6、5ThenDelay500Call移动点击(物品栏3X-2,物品栏3Y-2)Delay500EndIfIfform1.物品栏4.Value=
7、1ThenFindPic0,0,1024,768,"Attachment:物品栏4.bmp",0.9,物品栏4X,物品栏4YIf物品栏1X>0ThenDelay500Call移动点击(物品栏4X-2,物品栏4Y-2)Delay500EndIfFindPic37,327,346,388,"Attachment:飞行棋.bmp",0.9,飞X,飞YIf飞X>=0ThenDelay500Call移动右击(飞X+3,飞Y+3)Delay500ElseMessageBox"没有飞行棋了,快点去买吧"EndIfDelay500KeyDown18,
8、1KeyPress69,1KeyUp18,1Delay1000送=dm.findpic(142,255,268,305,"送我去.bmp","000000",0.8,0,送X,送Y)If送X>=0ThenDelay300Call移动点击(送X+8,送Y+8)Delay500ElseMessageBox"请在灵兽村做好坐标再启动脚本"EndIfEndFunction完整版Global攻击次数,开始去任务PutAttachment"c:大话西游","dm.dll"PutAttachment"c:大话西游","*.txt"PutAttach
9、ment".plugin","regdll.dll"PutAttachment"c:大话西游","*.bmp"CallPlugin.regdll.reg("c:大话西游dm.dll")Call注册大漠()Sub注册大漠()Setdm=createobject("dm.dmsoft")dm_ret=dm.SetShowErrorMsg(0)ifdm.ver()=""thenRunApp"regsvr32c:大话西游dm.dll/s":Delay500Ifdm.ver()=""ThenMessageBox"创建对象失败,检查系统是
10、否禁用了vbs脚本权限"EndScriptEndIfEndIfEndSubhwndex=dm.EnumWindow(0,0,"WSWINDOW",2+4+8+16)TracePrinthwndexdm.SetPathdm.GetBasePath'定义字库目录dm.SetDict0,"c:大话西游dhxy.txt"dm_ret=dm.SetPath("c:大话西游")dm_ret=dm.SetWindowState(hwndex,1)moshi=dm.bindwindow(hwndex,"normal","normal","norm
11、al",0)TracePrintmoshidm_ret=dm.GetClientSize(hwndex,w,h)yidong=dm.MoveWindow(hwndex,0,0)Call任务检查