传奇sf挂机脚本

2021-11-10 02:28:37  阅读 210 次 评论 29 条

传奇sf挂机脚本

好像现在外挂都过不了登陆器,包括找罗楠拿的收费挂也不行,只好自己写一个挂机脚本。

说明

按键精灵+大漠插件制作,职业:战士、道士,挂机位置尸魔洞一层,打开小地图为全图,分辨率为800×600。自动打怪、自动捡取、自动买药、自动修装备。测试6个小时正常挂机,初学写出来的感觉应该还能优化。不过写出来后也没兴致再玩游戏了。。。毕竟还要吃饭呢。

脚本

"c:\","*.*"".\",""("c:\\")//注册大漠//设置大漠路径以及字库名=createobject("dm.dmsoft")dm.SetPath("d:")dm_ret=dm.SetDict(0,"lanhuo.txt")//绑定窗口和模式hwnd=dm.GetMousePointWindow()dm_ret=dm.BindWindow(hwnd,"dx2","windows","windows",0)//初始化跑图路径,和人物点Dimnn,myx,myymyx=390myy=230nn=1Rem打怪dm_ret=dm.FindStr(230,58,575,331,"宝箱","ffffff-000000",1.0,intX,intY)IfintX=0andintY=0ThenTracePrint"打宝箱"intX":"intYdm.MoveTointX+1,intY+32Delay20dm.LeftClickDelay2000dm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100EndIfdm_ret=dm.FindMultiColor(321,124,462,213,"ff0000","0|1|9c0000,0|2|100808,0|3|-111111,0|3|-100808,0|6|-101010",1.0,0,intX,intY)IfintX=0andintY=0ThenTracePrint"打恶灵"intX":"intYdm.MoveTointX+15,intY+45dm.LeftClickdm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100Goto打怪EndIfRem捡东西//判断身边是否有怪,有怪就先打怪,没怪就捡东西dm_ret=dm.FindMultiColor(321,124,462,213,"ff0000","0|1|9c0000,0|2|100808,0|3|-111111,0|3|-100808",1.0,0,intX,intY)Ifdm_ret=1ThenGoto打怪EndIf//捡神开头的物品dm_ret=dm.FindStrFast(0,0,800,438,"神","ff0000-000000|ffffff-000000|88ddee-000000",1.0,intX,intY)IfintX=0andintY=0ThenTracePrint"捡神"intX":"intYintX=intX+25intY=intY+13IfintXmyxandintYmyyThenCall走左上角()ElseIfintXmyxandintYmyyThenCall走左下角()ElseIfintXmyxandintYmyyThenCall走右上角()ElseIfintXmyxandintYmyyThenCall走右下角()ElseIfintX=myxandintYmyyThenCall走下()ElseIfintX=myxandintYmyyThenCall走上()ElseIfintXmyxandintY=myyThenCall走右()ElseIfintXmyxandintY=myyThenCall走左()EndIfDelay1000Goto捡东西EndIf//捡金或强开头的物品dm_ret=dm.FindStrFast(0,0,800,438,"金|强","ff0000-000000|ffffff-000000|88ddee-000000",1.0,intX,intY)IfintX=0andintY=0ThenTracePrint"捡金或强"intX":"intYintX=intX+13intY=intY+18IfintXmyxandintYmyyThenCall走左上角()ElseIfintXmyxandintYmyyThenCall走左下角()ElseIfintXmyxandintYmyyThenCall走右上角()ElseIfintXmyxandintYmyyThenCall走右下角()ElseIfintX=myxandintYmyyThenCall走下()ElseIfintX=myxandintYmyyThenCall走上()ElseIfintXmyxandintY=myyThenCall走右()ElseIfintXmyxandintY=myyThenCall走左()EndIfDelay1000Goto捡东西EndIfRem买东西Delay500hong=dm.Ocr(304,425,318,440,"ffffff-000000",1.0)lan=dm.Ocr(346,423,366,439,"ffffff-000000",1.0)TracePrint"红:"hongTracePrint"蓝:"lanIfhong=0ThenTracePrint"买红药"dm.MoveTo766,566Delay2000dm.LeftClickdm.MoveTo166,22Delay2000dm.LeftClickdm.MoveTo574,83Delay2000dm.LeftClickdm.MoveTo50,205Delay2000dm.LeftClickdm.KeyPress48dm.MoveTo88,266Delay2000dm.LeftClickdm.MoveTo344,318Delay2000dm.LeftClickdm.MoveTo692,400//打开背包Delay2000dm.LeftClickDelay2000//解开红药dm_ret=dm.FindMultiColor(0,0,800,600,"7b3118","1|0|6b3118,2|0|6b3118,3|0|7b3118,4|0|942918",1.0,0,intX,intY)IfintX=0andintY=0Thendm.MoveTointX,intYDelay2000dm.RightClickDelay2000EndIf//使用修复水dm_ret=dm.FindMultiColor(0,0,800,600,"d6c6ad","1|0|bda57b,2|0|efc68c,3|0|f7f7de,4|0|b5a594",1.0,0,intX,intY)IfintX=0andintY=0Thendm.MoveTointX,intYDelay2000dm.RightClickDelay2000EndIfdm.KeyPress120Delay2000dm.KeyPress27Delay2000EndIfIflan=0ThenTracePrint"买蓝药"dm.MoveTo766,566Delay2000dm.LeftClickdm.MoveTo166,22Delay2000dm.LeftClickdm.MoveTo574,147Delay2000dm.LeftClickdm.MoveTo50,205Delay2000dm.LeftClickdm.KeyPress48dm.MoveTo88,266Delay2000dm.LeftClickdm.MoveTo344,318Delay2000dm.LeftClickdm.MoveTo692,400//打开背包Delay2000dm.LeftClickDelay2000//解开蓝药dm_ret=dm.FindMultiColor(0,0,800,600,"104284","1|0|291884,2|0|291884,3|0|215aa5,4|0|738cff",1.0,0,intX,intY)IfintX=0andintY=0Thendm.MoveTointX,intYDelay2000dm.RightClickDelay2000EndIf//使用修复水dm_ret=dm.FindMultiColor(0,0,800,600,"d6c6ad","1|0|bda57b,2|0|efc68c,3|0|f7f7de,4|0|b5a594",1.0,0,intX,intY)IfintX=0andintY=0Thendm.MoveTointX,intYDelay2000dm.RightClickDelay2000EndIfdm.KeyPress120Delay2000dm.KeyPress27EndIfRem找怪dm_ret=dm.FindStr(80,39,744,355,"恶|灵","ffffff-000000",1.0,intX,intY)IfintX=0andintY=0ThenTracePrint"屏幕范围找恶灵:"intX":"intYdm.MoveTointX+25,intY+5dm.LeftClickdm.MoveToEx100,100,100,100Delay200dm.MoveToEx100,100,100,100Delay200dm.MoveToEx100,100,100,100Goto打怪EndIfdm_ret=dm.FindStr(80,39,744,355,"宝|箱","ffffff-000000",1.0,intX,intY)IfintX=0andintY=0ThenTracePrint"屏幕范围找宝箱:"intX":"intYdm.MoveTointX+4,intY+51dm.LeftClickdm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100Delay200dm.MoveToEx390,230,100,100Goto打怪EndIfdm_ret=dm.FindMultiColor(672,0,800,128,"ff0000","0|1|ff0000,0|2|ff0000,0|3|ff0000,1|1|ff0000",1.0,0,intX,intY)IfintX=0andintY=0ThenTracePrint"小地图找怪:"intX":"intYi=1For5dm.MoveTointX+i,intY+idm.RightClicki=i+1Delay100NextGoto打怪EndIfRem寻路zuobiao=dm.Ocr(68,583,129,599,"ffffff-000000",1.0)zuobiaox=mid(zuobiao,1,instr(zuobiao,":")-1)zuobiaoy=mid(zuobiao,instr(zuobiao,":")+1,3)TracePrint"跑图中,当前坐标:"zuobiaox":"zuobiaoyIf170zuobiaox164and128zuobiaoy120Thennn=2ElseIf165zuobiaox150and30zuobiaoy20Thennn=3ElseIf28zuobiaox18and80zuobiaoy70Thennn=4ElseIf65zuobiaox55and180zuobiaoy170Thennn=1EndIfSelectcasennCase1Delay200dm.MoveTo770,100Delay200dm.RightClickGoto打怪Case2Delay200dm.MoveTo760,20Delay200dm.RightClickGoto打怪Case3Delay200dm.MoveTo630,60Delay200dm.RightClickGoto打怪Case4Delay200dm.MoveTo666,140Delay200dm.RightClickGoto打怪EndSelect//随机走路的子程序,打算用于多线程判断是不是卡住了,后来发现用不到。Sub随机走()RandomizeTmpRnd=Int(rnd*8+1)TracePrint"随机走路:"TmpRndSelectCaseTmpRndCase1Call走左()Case2Call走右()Case3Call走上()Case4Call走下()Case5Call走左上角()Case6Call走右上角()Case7Call走左下角()Case8Call走右下角()EndSelectEndSubSub走左()dm.MoveTomyx-90,myydm.LeftClickEndSubSub走右()dm.MoveTomyx+90,myydm.LeftClickEndSubSub走上()dm.MoveTomyx,myy-90dm.LeftClickEndSubSub走下()dm.MoveTomyx,myy+90dm.LeftClickEndSubSub走左上角()dm.MoveTomyx-90,myy-90dm.LeftClickEndSubSub走右上角()dm.MoveTomyx+90,myy-90dm.LeftClickEndSubSub走左下角()dm.MoveTomyx-90,myy+90dm.LeftClickEndSubSub走右下角()dm.MoveTomyx+90,myy+90dm.LeftClickEndSubSubOnScriptExit()dm_ret=dm.UnBindWindow()EndSub

大漠插件

大漠插件(免费版)

提取码:s4mi

字库

211441BF9A00207F8927FF248490FF0$神$0.0.56$1204349A50426FC30A7F2C219474A0130$恶$0.0.48$11003126A9542A895E2A2542A95F44008$灵$0.0.45$****24A48CFC9212624A490C00$宝$0.0.50$122498A17FB284485FF2AA556AA9553F8$箱$0.0.64$126310A****$2$0.0.16$8411FE0040$1$0.0.11$88011E2C0600$7$0.0.11$****86E0$3$0.0.15$87E****E0$0$0.0.18$80C0281947F8050$4$0.0.18$****07C0$9$0.0.18$86E****E0$8$0.0.19$83E****E0$6$0.0.18$8FA****E0$5$0.0.19$8840$:$0.0.2$****94911FD****200$金$0.0.45$127E****E0$6$0.0.19$8F2****E0$5$0.0.18$****F8050$4$0.0.16$8C010027C700800$7$0.0.13$****87E0$9$0.0.19$84F0921E7800079E92524FF949E941E0$强$0.0.63$12

©著作权归作者所有,转载或内容合作请联系作者

本文地址:http://sbxxw.com/post/9612.html
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!

发表评论


表情

评论列表