按键精灵脚本源码 梦幻西游自动打怪

脚本附件:ditu.bmp, zhandou.bmp, dajia.bmp, xuetiao.bmp, chiyao.bmp, djxn.bmp

运行环境:分辨率:1280×768 色深:32位 操作系统:Microsoft Windows XP 按键精灵版本:9.30.11233

//由于是刚开始学的,所以代码繁乱 不简洁请见谅啦    //谁看不爽可以帮我修改下的~~~~(>_<)~~~ 偶会感激不尽   //仅供娱乐= =~!交流  部分代码网络上载的    // 使用注意 由于是测试脚本所以:   // 本脚本只给人加血 请把加血用药放在背包第一个位置,   //一定要大量的存储血药如 红碗 什么的 用完没有提示并且脚本   //会不断的重复点背包第一个位置 造成死循环   //切不要吧行囊打开 不要遮住梦幻窗口 由于本脚本纯绿色的非读写内存..所以你懂得   //下面是注释   // 找到最顶层的窗口 并移动至0.0位置   Hwnd = Plugin.Window.Foreground()   sRect = Plugin.Window.GetClientRect(Hwnd)   Dim MyArray   MyArray=Split(sRect,"|")   Ux=CLng(MyArray(0))   Uy=CLng(MyArray(1))   Call Plugin.Window.Move(Hwnd, 0, 0)   //隐藏 梦幻西游聊天窗口    Hwndck = Plugin.Window.Find(0, "梦幻西游 聊天窗口")   Call Plugin.Window.Hide(Hwndck)   //进行循环找怪操作   Rem aa   Call 找怪()   Goto aa   Sub 找怪()   //打开地图 并且随机在地图内移动鼠标 (可能部分地图会出现越出地图的情况)并点击   //如果出现怪物 则会切换到战斗       KeyPress "Tab", 1       Delay 200       Rem zhaoguai       FindPic 0,0,1024,768,"Attachment:\ditu.bmp",0.9,ditux,dituy       If ditux > 0 And dituy > 0 Then           Randomize           rx = Int((ditux+150 - ditux+95 + 1) * Rnd + ditux+95)           Randomize           ry = Int((dituy + 200 - dituy + 26 + 1) * Rnd + dituy + 26)           Call 鼠标移动(rx, ry)           Delay 200           LeftClick 1           Delay 2000           FindPic 0,0,1024,768,"Attachment:\zhandou.bmp",0.9,zdx,zdy           If zdx > 0 And zdy > 0 Then                Call 战斗()           Else                Goto zhaoguai           End If       Else            KeyPress "Tab", 1           Delay 200           Goto zhaoguai       End If   End Sub   //此代码为防止鼠标飘逸 具体不多说了   Sub 鼠标移动(w,z)       dim n,h,zx,zy,zzx,zzy       htt=0       n=1       h=0       zx=w       zy=z       If zx<50 or zx>540 Then           If zx<50 Then               zzx=zx+40           End if           If zx>540 Then               zzx=zx-40           End if       Else           zzx=zx       End if       If zy<50 or zy>400 Then           If zy<50 Then               zzy=zy+40           End if           If zy>400 Then               zzy=zy-40           End if       Else           zzy=zy       End if       MoveTo zzx, zzy       Delay 100       Rem py       GetCursorPos x, y       mz=0       FindCenterColor x-110,y-110,x+110,y+110,"78F4F0",x1,y1       If x1>0 and y1>0 Then           a=zx-x1+20           b=zy-y1+10           Goto OK       End if       XY = Plugin.Color.FindMutiColor(x-110,y-110,x+110,y+110, "78A4B0", "-2|4|C0C8D8,-3|5|C0C8D8,-4|6|C0C8D8,-5|7|C0C4D0,-9|9|98C0C8", 1)       sbwz = Split(XY, "|")       x1 = Clng(sbwz(0))-18: y1 = Clng(sbwz(1))-9       If x1>0 and y1>0 Then           a=zx-x1           b=zy-y1           Goto OK       End if       XY=Plugin.Color.FindMutiColor(x-110,y-110,x+110,y+110,"D0AC30","1|0|D0AC30,2|0|D0AC30,3|0|D0AC30,4|0|D0AC30,2|1|D0AC30,2|2|D0AC30,2|3|D0AC30,2|4|D0AC30,2|5|D0AC30,2|6|D0AC30,2|7|D0AC30,2|8|D0AC30,2|9|D0AC30,2|10|D0AC30,2|11|D0AC30,2|12|D0AC30,2|13|D0AC30,2|14|D0AC30,2|15|D0AC30,2|16|D0AC30,2|17|D0AC30,2|18|D0AC30,2|19|D0AC30,2|20|D0AC30,0|21|D0AC30,1|21|D0AC30,2|21|D0AC30,3|21|D0AC30,4|21|D0AC30",1)   1 2 Next      sbwz=Split(XY,"|")       x1=Clng(sbwz(0))+2: y1=Clng(sbwz(1))+11       If x1>0 and y1>0 Then           a=zx-x1           b=zy-y1           Goto OK       End if       mz=1       MoveTo zzx ,zzy       Delay 150       Rem OK       If htt=10 Then           Goto NO       End if       If h=6 Then           MoveTo 300 ,300           Delay 500           htt=htt+1           h=0           Goto py       End if       If mz=1 Then           h=h+1           Goto py       Else           If Abs(a)>n or Abs(b)>n Then               MoveR a,b               Delay 100               h=h+1               Goto py           End if       End if       Rem NO   End Sub   //战斗子程序 会自动按且仅会按alt+a进行攻击 可以替换代码使用法术攻击   //战斗完毕后会判断人物血量 少于大约75%的时候自动打开背包使用背包的   //第一个位置的加血要(只会使用第一个位置的加血药 如果用完会导致脚本死循环 请暂停)   Sub 战斗()       Rem dajia       //寻找是否存在怪物的代码 请别按出最右边的人物菜单       FindPic 0,0,1024,768,"Attachment:\dajia.bmp",0.9,djx,djy       If djx > 0 And djy > 0 Then        //如果找到 则按alt+a            KeyDown 18, 1           KeyPress 65, 1           KeyUp 18, 1           Delay 500           KeyDown 18, 1           KeyPress 65, 1           KeyUp 18, 1         //回到是否存在怪物的判断上           Goto dajia       End If       Delay 500       //如果怪物被打败 则会判断人物血量       FindPic 0,0,1024,768,"Attachment:\zhandou.bmp",0.9,zdx,zdy       If zdx > 0 And zdy > 0 Then            Goto dajia       Else            Rem aaaa                      FindPic 0,0,1024,768,"Attachment:\xuetiao.bmp",0.9,cxx,cxy           If cxx > 0 And cxy > 0 Then                gc=GetPixelColor(cxx+45,cxy)               If gc = "8084A8" Then                //进行加血操作                   Call 鼠标移动(cxx-350,cxy+110)                   FindPic 0,0,1024,768,"Attachment:\djxn.bmp",0.9,djx,djy                   If djx > 0 And djy > 0 Then                       call 鼠标移动(djx+59,djy+103)                       Delay 500                       RightClick 1                       Delay 2000                       KeyDown 18, 1                       KeyPress 69, 1                       KeyUp 18, 1                       Delay 1000                       //循环判断人物血量                       Goto aaaa                   Else                        KeyDown 18, 1                       KeyPress 69, 1                       KeyUp 18, 1                       Delay 2000                       Goto aaaa                   End If               End If           End if       End If   End Sub
相关文件下载地址
©下载资源版权归作者所有;本站所有资源均来源于网络,仅供学习使用,请支持正版!

按键精灵脚本源码 梦幻西游自动打怪》有0个想法

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注