卡通农场辅助源码_第1页
卡通农场辅助源码_第2页
卡通农场辅助源码_第3页
卡通农场辅助源码_第4页
卡通农场辅助源码_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

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

文档简介

./本源码适用于按键精灵手机版Dim现在时<>,Advertisement,barnfull,barnlevel,dw1,dw2,aaa,aCall调整屏幕<>Call定位干扰<>Call重新联机<>Call定位种田<>Call主程序<>Sub主程序<>DoIfReadUIConfig<"fans">Then Call粉丝移除<>EndIfFor2Call种植小麦<>Call小麦收割<>Delay300NextCall粮仓<>Ifbarnfull=1ThenTracePrint"判定粮仓满了" Call商店<>EndIfCall粮仓水位<>//读取界面元素名称为"账号"的默认值,如果该元素未设置默认值则读出100IfReadUIConfig<"honey">ThenCall收集<>EndIf//找邻居卖东西IfReadUIConfig<"neighbor">Then//开始找邻居的时间Call读现在时<1>If计时器<30,1,false>ThenGotojumpfindEndIf Delay200//点击次数aaa=0DoUntil计时器<30,1,false>=TrueCall找邻居<>Call邻居小麦<>Delay1000LoopDelay200RemjumpfindEndIfCall商店<>Call重新联机<>FindPic917,443,967,491,"Attachment:定位图.png","000000",0,0.7,dw1,dw2Ifdw1<0Anddw2<0Then Call定位种田<>EndIfLoopEndSubSub调整屏幕<>TouchDown366,563,1Delay200TouchDown799,248,2Delay200TouchMove630,373,1,200Delay500TouchUp2TouchUp1EndSubSub定位种田<>DimcornerX,cornerYDelay200Call读现在时<0>doDelay100Swipe376,250,514,445,300Delay100FindPic0,0,259,142,"Attachment:tree.png","000000",0,0.7,cornerX,cornerYIfcornerX>0AndcornerY>0ThenTracePrint"已定位种田"Delay200TouchDown635,422Delay200TouchMove635,160Delay200TouchUpDelay200TracePrint"调整完毕"ExitDoEndIfIf计时器<10,0,false>ThenTracePrint"指定时间到"Call调整屏幕<>Call定位干扰<>Call重新联机<>EndIfLoopEndSubSub种植小麦<>DimlandX,landY//无云FindPic569,530,651,595,"Attachment:FirstFarmland0.png","000000",0,0.6,landX,landYIflandX<0AndlandY<0Then//阴影FindPic569,530,651,595,"Attachment:FirstFarmland1.png","000000",0,0.6,landX,landYEndIfIflandX>0AndlandY>0ThenTracePrint"开始种植"Call第一田<>Delay500If小麦<>=1ThenTracePrint"准备刷地"Call刷地<>EndIfDelay1000//TXL=now//PlantingNumber=PlantingNumber+1EndIf EndSubSub小麦收割<>Dimland2X,land2Y//无云FindPic580,528,647,584,"Attachment:FirstFarmland2.png","000000",0,0.7,land2X,land2YIfland2X<0Andland2Y<0Then//阴影FindPic580,528,647,584,"Attachment:FirstFarmland3.png","000000",0,0.7,land2X,land2YEndIfIfland2X>0Andland2Y>0ThenTracePrint"开始收割"Call第一田<>Delay500If收割<>=1ThenCall刷地<>EndIfDelay1000EndIf EndSub//点击第一块土地Sub第一田<>Delay200Tap609,564TracePrint"已点击第一田"Delay200EndSubFunction小麦<>DimintX,intYFindPic497,436,573,512,"Attachment:wheat0.png","000000",0,0.7,intX,intYIfintX>0AndintY>0ThenTracePrint"已找到小麦图标"TouchDown537,473,0TracePrint"已点击小麦图标"Delay100小麦=1ElseTracePrint"未找到小麦图标"小麦=-1EndIfEndFunctionFunction收割<>DimintX,intYFindPic465,472,556,552,"Attachment:Sickle.png","000000",0,0.7,intX,intYIfintX>0AndintY>0ThenTouchDown511,492,0TracePrint"已按镰刀"Delay100收割=1ElseTracePrint"未找到镰刀图标"收割=-1EndIfEndFunctionSub刷地<>//种植速度,24是延时//读取界面元素名称为"账号"的默认值,如果该元素未设置默认值则读出100DimfaTracePrint"刷地"fa=ReadUIConfig<"farm">//将小麦移动至第一块田TouchMove606,568,0,200Delay200//刷第一排TouchMove941,395,0,800Delay200Iffa=0ThenTouchUp0 GotofarmlandEndIf//调整至第二排TouchMove905,376,0,200Delay200//刷第二排TouchMove567,545,0,800Iffa=1ThenTouchUp0 Gotofarmland EndIf//调整至第三排TouchMove531,528,0,200//刷第三排TouchMove869,359,0,800Iffa=2ThenTouchUp0 Gotofarmland EndIf//调整至第四排TouchMove832,342,0,200//刷第四排TouchMove496,508,0,800Iffa=3ThenTouchUp0 Gotofarmland EndIf//调整至第五排TouchMove463,496,0,200//刷第五排TouchMove792,324,0,800Iffa=4ThenTouchUp0 Gotofarmland EndIf//调整至第六排TouchMove759,307,0,200//刷第六排TouchMove425,473,0,800Iffa=5ThenTouchUp0 Gotofarmland EndIf//调整至第七排TouchMove389,457,0,200//刷第七排TouchMove721,288,0,800Iffa=6ThenTouchUp0 Gotofarmland EndIf//调整至第八排TouchMove686,272,0,200//刷第八排TouchMove353,438,0,800Iffa=7ThenTouchUp0 Gotofarmland EndIf//调整至第九排TouchMove327,412,0,200//刷第九排TouchMove653,253,0,800Iffa=8ThenTouchUp0 Gotofarmland EndIfRemfarmlandDelay100TouchUpDelay100EndSubSub粮仓<>DimbarnX,barnYAdvertisement=0 FindPic539,126,735,267,"Attachment:full.png","000000",0,0.6,barnX,barnY IfbarnX>0AndbarnY>0ThenTracePrint"粮仓已满" Tap873,199 Delay1000barnfull=1ElseTracePrint"粮仓未满"EndIfCall种植小麦<>Delay100Call定位干扰<>Delay100EndSubSub粮仓水位<>DimbarnlevelX,barnlevelY,barnlevel2X,barnlevel2Y,BarnlevelText,ba,bb barnlevel=5 ba=ReadUIConfig<"barn">SelectCase<ba> Case0 bb=50 Case1 bb=60 Case2 bb=70 Case3 bb=80EndSelectFindColor951,493,963,584,"4FF8FF",0,0.8,barnlevelX,barnlevelYIfbarnlevelX>0AndbarnlevelY>0ThenTracePrint"粮仓水位以找到"BarnlevelText=<584-barnlevelY>*100\87-10 TracePrintBarnlevelTextTracePrintbb/BarnlevelTextbarnlevel=bb/BarnlevelTextElseFindColor951,493,963,584,"4AD5F7",0,0.8,barnlevel2X,barnlevel2YIfbarnlevel2X>0Andbarnlevel2Y>0ThenTracePrint"粮仓水位以找到"BarnlevelText=<584-barnlevel2Y>*100\87-10 TracePrintBarnlevelTextTracePrintbb/BarnlevelTextbarnlevel=bb/BarnlevelTextEndIfEndIfEndSubSub商店<>Call粮仓水位<>Delay500Call开启商店<>Delay500Call金钱收集<>Delay100Ifbarnlevel<=1orbarnfull=1ThenCall商品上架<>EndIfDelay100Call广告<>//--商品架下一页ForReadUIConfig<"shoppage">Call商品架下一页<>Delay500Call金钱收集<>Delay100Ifbarnlevel<=1orbarnfull=1ThenCall商品上架<>EndIfDelay100Call广告<>Nextbarnfull=0//重置粮仓Call关闭商店<>Delay1000FindPic917,443,967,491,"Attachment:定位图.png","000000",0,0.7,dw1,dw2Ifdw1<0Anddw2<0Then Call定位种田<>EndIfEndSub//开启商店Sub开启商店<>Delay200Tap447,551Delay200TracePrint"开启商店"EndSub//关闭商店Sub关闭商店<>Delay200Tap1073,99Delay200TracePrint"关闭商店"EndSub//商品架下一页Sub商品架下一页<>TouchDown932,384Delay300TouchMove340,384Delay500TouchUpEndSub//金钱收集Sub金钱收集<> DimsoldX,soldY,sold2X,sold2YFor10FindPic320,206,987,518,"Attachment:sold.png","000000",0,0.7,soldX,soldYIfsoldX>0AndsoldY>0ThenTracePrint"找到已卖出商品"sold2X=soldXsold2Y=soldY-50Tapsold2X,sold2YDelay300ElseTracePrint<"没有卖出商品">Delay50ExitForEndIfNextEndSub//商品上架Sub商品上架<>DimemptyX,emptyY,empty2X,empty2Y,shopxshopx=ReadUIConfig<"shopnumber">+4ForshopxFindPic320,206,987,518,"Attachment:empty.png","000000",0,0.9,emptyX,emptyYIfemptyX>0AndemptyY>0ThenTracePrint"找到空闲位置"empty2X=emptyX+33Tapempty2X,emptyYTracePrint"点击空闲位置"Delay400Call小麦商品上架<>Advertisement=1ElseTracePrint<"没有空闲位置">ExitForEndIfDelay500NextEndSubSub小麦商品上架<>DimwheatX,wheatY,wheat2X,wheat2Y,soldingX,soldingYTap312,195Delay500FindPic371,159,682,551,"Attachment:wheat.png","000000",0,0.7,wheatX,wheatYIfwheatX>0AndwheatY>0ThenTracePrint"找到小麦"wheat2X=wheatX+33Tapwheat2X,wheatYDelay500FindPic752,205,817,281,"Attachment:solding10.png","000000",0,0.7,soldingX,soldingYIfsoldingX>0AndsoldingY>0ThenTracePrint"作物充足"Call价格调整<>Delay100Tap810,515Delay100ElseTracePrint"作物不足"Tap910,125Delay100EndIfElseTracePrint"未找到小麦可以卖"Tap910,125Delay100EndIfEndSubSub价格调整<> For9Tap735,367Delay50NextEndSub//广告Sub广告<>DimunsoldX,unsoldY,unsold2X,unsold2YIfAdvertisement=0ThenFindPic694,234,750,298,"Attachment:unsold.png","000000",0,0.7,unsoldX,unsoldYIfunsoldX>0AndunsoldY>0ThenTracePrint"找到贩卖中产品"unsold2X=unsoldX+50unsold2Y=unsoldY+50TapunsoldX,unsold2YDelay700Call创建广告<>TracePrint"创建广告"Advertisement=1ElseTracePrint<"没有未售出商品"> EndIfEndIfEndSubSub创建广告<>DimhadadX,hadadYFindColor726-5,344-5,726+5,344+5,"00B145",0,0.8,hadadX,hadadYIfhadadX>0AndhadadY>0ThenTracePrint"可创建广告"Tap640,423Delay700ElseTracePrint"无法创建广告"Tap768,143Delay700EndIfEndSub Sub定位干扰<>DimintX,intYFindColor64-5,648-5,64+5,648+5,"002638",0,0.7,intX,intYIfintX>0AndintY>0ThenTracePrint"有干扰画面"Tap52,332Delay500ElseTracePrint"无干扰画面"EndIfFindColor53-5,650-5,53+5,650+5,"22B613",0,0.8,intX,intYIfintX>0AndintY>0ThenTracePrint"跑到其他人的家"Tap54,614Delay10000Call调整屏幕<>ElseTracePrint"无干扰画面"EndIfFindPic97,594,174,669,"Attachment:home.png","000000",0,0.8,intX,intYIfintX>0AndintY>0ThenTracePrint"跑到其他场景"Tap138,639Delay10000Call调整屏幕<>ElseTracePrint"无干扰画面"EndIfEndSubSub重新联机<>DimreconnectX,reconnectYFindPic593,456,673,521,"Attachment:reconnecting.png","000000",0,0.8,reconnectX,reconnectYIfreconnectX>0AndreconnectY>0ThenTap638,492TracePrint"重新连接"Delay20000 Call调整屏幕<>Call定位种田<>EndIfEndSubSub收集DimintX,intY,Xa,YaFindColor898-5,290-5,898+5,290+5,"336A8F",0,0.8,intX,intYIfintX>0AndintY>0ThenTracePrint"找到蜜蜂树"Delay200Tap898,290Delay2000EndIfFindPic753,136,840,224,"Attachment:honey.png","000000",0,0.8,intX,intYIfintX>0AndintY>0ThenTracePrint"收集蜂蜜"//Xa=intX+20//Ya=intY+10TouchDown774,174,1Delay200TouchMove871,212,1,200Delay200TouchMove948,215,1,200Delay200TouchMove924,272,1,200Delay200TouchMove845,287,1,200Delay200TouchUp1Delay200Tap1000,263ElseTap1000,263Delay1000EndIfEndSubSub找邻居<>DimFindNeighborX,FindNeighborY,FindNeighborColor1,FindNeighborColor2,NeighborA,NeighborB,intX,intY,i//判定点X轴FindNeighborX=array<1040,1068,1098,1129,1099,1119>//判定点Y轴FindNeighborY=array<369,351,369,392,392,371>//判定点颜色FindNeighborColor1=array<"10C797","11C394","2C6DC9","2F6EC3","367CD5","0DBF90">//判定点阴影下颜色FindNeighborColor2=array<"11AE81","13AD82","2C63B4","2F68B4","3470BE","11AF84">Ifaaa>6and 计时器<30,1,false>ThenCall商店<>EndIfDoUntil计时器<30,1,false>=Truei=0Delay200For6TracePrinti+1Delay10FindColorFindNeighborX<i>-2,FindNeighborY<i>-2,FindNeighborX<i>+2,FindNeighborY<i>-2,FindNeighborColor1<i>,0,0.9,intX,intYIfintX>0AndintY>0ThenNeighborA=0ElseNeighborA=1 EndIfFindColorFindNeighborX<i>-2,FindNeighborY<i>-2,FindNeighborX<i>+2,FindNeighborY<i>-2,FindNeighborColor2<i>,0,0.9,intX,intYIfintX>0AndintY>0ThenNeighborB=0ElseNeighborB=1 EndIfIfNeighborA+NeighborB=2Then//点击邻居TapFindNeighborX<i>,FindNeighborY<i>Delay2000//Call宝箱FindPic572,359,681,432,"Attachment:NeighborA.png","000000",0,0.7,intX,intYIfintX>0AndintY>0ThenTracePrint"点到邻居了"NeighborA=0NeighborB=0aaa=aaa+1ExitDoEndIf EndIfi=i+1NextLoopDelay10EndSubSub邻居小麦DimintX,intYFindPic572,359,681,432,"Attachment:NeighborA.png","000000",0,0.7,intX,intYIfintX>0AndintY>0ThenTracePrint"邻居画面"//看是否卖的是小麦FindPic514,246,582,315,"Attachment:NeighborWheat.png","000000",0,0.9,intX,intYIfintX>0AndintY>0ThenTracePrint"邻居收小麦"FindColor591,311,634,345,"3361FF",0,0.8,intX,intYIfintX>0AndintY>0ThenTracePrint"小麦库存不足"//点击稍等片刻Tap628,524Delay1000ElseTracePrint"小麦库存足够,卖出小麦"//点击没问题Tap629,397Delay1000EndIfElse//点击我不卖TracePrint"你收的不是小麦"Tap625,460Delay1000EndIfEndIf EndSubSub粉丝移除<>DimXX,YY,intX,intY,i,XX1,YY1,intA,intBi=0Tap1245,624De

温馨提示

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

评论

0/150

提交评论