天龙脚本第四篇_第1页
天龙脚本第四篇_第2页
天龙脚本第四篇_第3页
天龙脚本第四篇_第4页
天龙脚本第四篇_第5页
已阅读5页,还剩19页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

天龙脚本第四篇——完美跑商,支持所有商线PluginSiMiniOCR.SetDict("songti_9.mdb")Pluginhwnd二Window.GetKeyFocusWnd()Pluginrect二Window.GetClientRect(hwnd)MyArray二Split(rect,'T,-1,1)x1=MyArray(0)y1=MyArray(1)bky=30bkx=4x2=x1+800y2=y1+600UserVarluxian="城市1-西湖西南校尉-西湖-苏州-太湖-嵩山-洛阳-雁南-雁南正东校尉-城市2"跑商路线UserVarjin=94出售商品价格X银UserVaryin=50出售商品价格X铜UserVarjiasu=否是否使用加速技能,可选择“是”或者“否”(仅支持非外功门派,选择是则需要将加速技能放置到F1)dimmapMyArray2=Split(luxian,"-",-1,1)Rem开始Delay500Gosub关闭VBSCalla=InputBox("1.全新开始。"&(Chr(10))&"2.已领取银票。"&(Chr(10))&"3.准备在本城购买商品。"&(Chr(10))&"4.购买完成,准备离开本帮城市。"&(Chr(10))&"5.正在前往对方帮派城市。"&(Chr(13)&Chr(10))&"6.已在对方城市,准备找钱为一卖出商品。"&(Chr(13)&Chr(10))&"7.在对方城市,等待合适价格卖出。"&(Chr(13))&"8.已在对方城市卖出商品,准备购买。"&(Chr(13))&"9.已

在对方城市购买商品,准备出城。"&(Chr(13))&"10.正在返回己方帮派城市。"&(Chr(13))&"11.已返回本帮城市,准备找钱为一。"&(Chr(13))&"12.已找到本帮钱为一,等待合适价格卖出。"&(Chr(13))&"13.交还银票,重新领取。”,"请选择您当前跑商状态:")Ifa=1Goto重新开始ElseIfa=2Goto2ElseIfa=3Goto3ElseIfa=4Goto4ElseIfa=5Goto5Elselfa=6Goto6Elselfa=7Goto7Elselfa=8Goto8Elselfa=9Goto9Elselfa=10Goto10Elselfa=11Goto11Elselfa=12Goto12Elselfa=13Goto13ElseMessageBox未知状态,请重新选择Goto开始EndIfRem重新开始Gosub关闭Gosub找财政官员Rem2Gosub领取银票Rem3Gosub购买商品Rem4Gosub出城Rem5Gosub前往对方帮派Gosub进入对方城市Rem6Gosub找财政官员Rem7Gosub判断价格Gosub卖出Rem8Gosub购买商品Rem9Gosub出城Rem10Gosub返回己方帮派Gosub进入已方城市Rem11Gosub找财政官员Rem12Gosub判断价格Gosub卖出Rem13Gosub交还银票Goto2EndScriptSub找财政官员Rem城市_打开寻路KeyDown18,1KeyPress192,1KeyUp18,1Delay50VBSCallFindPic(x1,y1,x2,y2,"Attachment:\坐标输入框.bmp”,0.9,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8Delay500LeftClick1Delay100SayString"149”Delay100MoveTointx+45,inty+8Delay500LeftClick1Delay100Delay500Rem寻找_钱为一MoveTointx+75,inty+8LeftClick1ElseGoto城市—打开寻路EndIfKeyDown18,1KeyPress86,1Delay5000KeyUp18,1KeyPress123,1MoveTox1+410,y1+300Delay500VBSCallvarshubiao=GetCursorShape(0)Ifvarshubiao=302826352KeyDown18,1KeyPress192,1KeyUp18,1SayString”命令一:找到钱为一目标找到”KeyPress13,1Delay500LeftClick1ElseGoto城市_打开寻路EndIfDelay2000ReturnSub领取银票Rem领银票Delay3000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\领银票.bmp”,0.9,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8LeftClick1SayString〃命令:领取银票已经完成〃KeyPress13,1ElseSayString”命令:领取银票无法完成”KeyPress13,1EndIfKeyDown18,1KeyPress65,1KeyUp18,1Delay3000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\任务包袱.bmp”,0.9,intX,intY)Ifintx>0andinty>0MoveTointx+10,inty+8LeftClick1ElseSayString"出现错误:找不到任务包袱"KeyPress13,1EndIfDelay2000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\银票.bmp”,0.9,intX,intY)Ifintx>0andinty>0SayString”命令:领取银票完成下一步:购买商品〃KeyPress13,1ElseSayString〃命令:找不到银票〃KeyPress13,1EndIfReturnSub购买商品Rem打开店铺Delay1000VBSCallFindPic(x1,y1,x2,y2,"Attachment:、打开店铺.bmp”,0.8,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8LeftClick1KeyPress13,1ElseGosub关闭Gosub找财政官员Goto打开店铺EndIfDelay2000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\店铺.bmp”,0.9,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8LeftClick1ElseSayString”命令:店铺无法完成"KeyPress13,1EndIfDelay2000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\粮食.bmp”,0.8,intX,intY)Ifintx>0andinty>0MoveTointx,inty+8Rem重复购买VBSCallFindPic(x1,y1,x2,y2,"Attachment:、购买完成.bmp”,0.5,intX,intY)Ifintx<0andinty<0LeftClick1Gosub反作弊Delay10VBSCallFindPic(x1,y1,x2,y2,"Attachment:\需要等待.bmp”,0.6,intX2,intY2)Ifintx2>0andinty2>0Goto打开店铺EndIfGoto重复购买ElseGoto购买完成EndIfElseGoto打开店铺EndIfSayString”命令:已经完成购买"KeyPress13,1ReturnSub出城Rem出城_打开寻路MoveTox1+40,y1+40LeftDoubleClick1Delay500KeyDown18,1KeyPress192,1KeyUp18,1Delay1000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\坐标输入框.bmp”,0.9,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8Delay500LeftClick1SayString"100"Delay500MoveTointx+45,inty+8LeftClick1Delay500SayString"156"Rem判断出城MoveTointx+75,inty+8LeftClick1Delay5000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\坐标输入框.bmp”,0.9,intX2,intY2)Ifintx2>0andinty2>0Goto判断出城ElseGoto已出城EndIfElseGoto出城_打开寻路Delay5000Rem已出城SayString”命令:已经成功离开城市"KeyPress13,1ReturnSub前往对方帮派Rem开始判断当前地图Delay500VBSCallFindPic(x1,y1,x2,y2,"Attachment:\进城.bmp”,0.9,intX4,intY4)Ifintx4>0andinty4>0Goto已经到达目的地EndIfVBSCallFindPic(x1,y1,x2,y2,"Attachment:\12.bmp”,0.7,intX,intY)Ifintx>0andinty>0PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+158,intx+95,inty+178)s=Replace(s,〃〃,〃〃)Ifs=〃"PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+25,intx+95,inty+178)IfInStr(s,"阮星竹〃)〉0map="镜湖〃EndIfElseGosub判断地图EndIfk=0ForUBound(MyArray2)k=k+1a=MyArray2(k)Ifa=mapinmap=MyArray2(k)tomap二MyArray2(k+1)Goto找到当前地图ElseMoveTox1,y1KeyDown18,1KeyPress192,1KeyUp18,1Goto开始判断当前地图EndIfRem找到当前地图SayString”命令:当前地图<"&inmap&">,将前往下个地图<"&tomap&">KeyPress13,1Gosub下个地图Goto开始判断当前地图Rem已经到达目的地ReturnSub下个地图Rem判断位置Delay500VBSCallFindPic(x1,y1,x2,y2,"Attachment:\12.bmp”,0.7,intX,intY)Ifintx>0andinty>0PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+158,intx+95,inty+178)s=Replace(s,〃〃,〃〃)Ifs=〃"PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+25,intx+95,inty+178)IfInStr(s,"阮星竹〃)〉0map="镜湖〃EndIfElseGosub判断地图EndIfIfmap=inmapxuny1=inty+158xuny2=inty+178xuny2二xuny2-16Pluginsf二SiMiniOCR.OCR(intx,xuny1,intx+95,xuny2)sf=Replace(sf,"〃,〃〃)IfInStr(sf,tomap)>0Ifjiasu=”是"KeyPress112,1EndIfMoveTointx+100,xuny1+8LeftDoubleClick1Delay5000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\进入镜湖.bmp”,0.9,intX4,intY4)Ifintx4>0andinty4>0MoveTointx4+5,inty4+5LeftClick1EndIfVBSCallFindPic(x1,y1,x2,y2,"Attachment:\进城.bmp”,0.9,intX4,intY4)Ifintx4>0andinty4>0Goto到达城市EndIfGoto判断位置EndIfEndForElseGoto到达城市EndIfElseMoveTox1,y1KeyDown18,1KeyPress192,1KeyUp18,1Goto判断位置EndIfRem到达城市ReturnSub判断地图VBSBeginSelectCasescase〃白堤柳鬼〃map="西湖〃case〃童贯〃map二〃洛阳〃case”金钱豹”map="雁南”case〃阿林〃map二〃草原〃case〃阿史那默谷〃map="辽西〃case〃纥石烈阿疏〃map="长白山”case"大黑熊”map=”黄龙府”case〃韦大叔〃map二〃苏州〃case〃程青霜〃map=〃大理〃case〃打草谷辽兵〃map="雁北〃case"江湖游医"map="嵩山”case〃寇循〃map="太湖〃case〃法河〃map=〃龙泉〃case〃白花蜘蛛〃map="武夷〃case"甘草”map=”梅岭”case〃鳄鱼帮打手〃map二〃南海〃case"凌忆慈"map="琼州”case"曹延惠"map="敦煌”case"大脸"map="剑阁”case"方光智"map=”无量山”case〃白景武〃map=〃南诏〃case"阿雨”map="苗疆”case"阿支”map="石林”case"简丁”map="洱海”case〃古鲁拉〃map="玉溪〃case〃长毛雪怪〃map二〃苍山〃EndSelectVBSEndReturnSub进入对方城市tomap="Attachment:、%MyArray2(UBound(MyArray2))&".bmp”VBSCallFindPic(x1,y1,x2,y2,tomap,0.9,intX4,intY4)Ifintx4>0andinty4>0MoveTointx4+10,inty4+8Delay500LeftClick1ElseSayString”命令:找不到您指定的帮会城市,请检查设置."KeyPress13,1EndIfDelay3000ReturnSub判断价格Rem出售_打开店铺Delay1000VBSCallFindPic(x1,y1,x2,y2,"Attachment:、打开店铺.bmp”,0.7,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8LeftClick1ElseSayString”命令:打开店铺无法完成"KeyPress13,1EndIfDelay2000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\店铺.bmp”,0.7,intX,intY)Ifintx>0andinty>0MoveTointx+15,inty+8LeftClick1ElseSayString”命令:店铺无法完成"KeyPress13,1EndIfDelay2000VBSCallFindPic(x1,y1,x2,y2,"Attachment:\粮食.bmp”,0.8,intX,intY)Delay1000Ifintx>0andinty>0PluginSiMiniOCR.SetFontColor("ffffff")Pluginjiage二SiMiniOCR.OCR(intX,intY,intX+140,intY+45)jiage二Replace(jiage,"”,"-")MyArray3二Split(jiage,〃-〃,-1,1)Ifcint(MyArray3(0))=jinandcint(MyArray3(1))=yinSayString”价格判断:达到设定价格”&jin&"银"&yin&"铜,开始卖出"KeyPress13,1Goto可以卖出EndIfElseSayString”命令:找不到粮食"KeyPress13,1EndIfGoto出售—打开店铺Rem可以卖出ReturnSub卖出Rem卖出_打开包袱VBSCallFindPic(x1,y1,x2,y2,"Attachment:\任务包袱.bmp”,0.5,intX,intY)Ifintx>0andinty>0MoveTointx+10,inty+7LeftClick1Delay1000Rem重复卖出VBSCallFindPic(x1,y1,x2,y2,"Attachment:\粮食2.bmp”,0.7,intX,intY)Ifintx>0andinty>0MoveTointx+10,inty+10RightClick1Delay500Goto重复卖出ElseSayString”未找到商品"KeyPress13,1EndIfElseKeyDown18,1KeyPress65,1KeyUp18,1Delay1000Goto卖出_打开包袱SayString”命令:完成出售,开始买进"KeyPress13,1ReturnSub返回己方帮派Rem返回—开始判断当前地图Delay500VBSCallFindPic(x1,y1,x2,y2,"Attachment:\进城.bmp”,0.9,intX4,intY4)Ifintx4>0andinty4>0Goto返回—已经到达目的地EndIfVBSCallFindPic(x1,y1,x2,y2,"Attachment:\12.bmp”,0.7,intX,intY)Ifintx>0andinty>0PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+158,intx+95,inty+178)s=Replace(s,〃〃,〃〃)Ifs=〃"PluginSiMiniOCR.SetFontColor("ffffff")Plugins=SiMiniOCR.OCR(intx,inty+25,intx+95,inty+178)IfInStr(s,"阮星竹")>0map="镜湖〃EndIfElseGosub判断地图EndIfk=UBound(MyArray2)ForUBound(MyArray2)k=k-1a=MyArray2(k)Ifa=mapinmap=MyArray2(k)tomap二MyArray2(k-1)Goto返回—找到当前地图EndIfEndForElseKeyDown18,1KeyPress192,1KeyUp18,1Goto返回—开始判断当前地图EndIfRem返回—找到当前地图SayString”命令:当前地图<"&inmap&">,将前往下个地图<"&tomap&">”KeyPress13,1Gosub下个地图Goto返回—开始判断当前地图Rem返回_已经到达目的地ReturnSub进入已方城市tomap="Attachment:、%MyArray2(0)&".bmp”VBSCallFindPic(x1,y1,x2,y2,tomap,0.9,intX4,intY4)Ifintx4>0andinty4>0MoveTointx4+10,inty4+8Delay500LeftClick1ElseSayString"命令:找不到您指定的帮会城市,请检查设置."KeyPress13,1EndIfDelay3000ReturnSub交还银票Delay1000VBSCallFindPic(x1,y1,x

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论