卡通农场辅助源码

上传人:gbs****77 文档编号:10315480 上传时间:2020-04-11 格式:DOCX 页数:19 大小:27.45KB
返回 下载 相关 举报
卡通农场辅助源码_第1页
第1页 / 共19页
卡通农场辅助源码_第2页
第2页 / 共19页
卡通农场辅助源码_第3页
第3页 / 共19页
点击查看更多>>
资源描述
本源码适用于按键精灵手机版Dim 现在时(),Advertisement,barnfull,barnlevel,dw1,dw2,aaa,aCall 调整屏幕()Call 定位干扰()Call 重新联机()Call 定位种田()Call 主程序()Sub 主程序()DoIf ReadUIConfig(fans) Then Call 粉丝移除()End IfFor 2Call 种植小麦()Call 小麦收割()Delay 300NextCall 粮仓()If barnfull = 1 Then TracePrint 判定粮仓满了Call 商店()End IfCall 粮仓水位()/读取界面元素名称为账号的默认值,如果该元素未设置默认值则读出100If ReadUIConfig(honey) ThenCall 收集()End If/-找邻居卖东西 If ReadUIConfig(neighbor) Then /-开始找邻居的时间 Call 读现在时(1) If 计时器(30, 1, false) Then Goto jumpfind End If Delay 200 /-点击次数 aaa=0 Do Until 计时器(30, 1, false) =True Call 找邻居() Call 邻居小麦() Delay 1000 Loop Delay 200 Rem jumpfind End IfCall 商店()Call 重新联机()FindPic 917, 443, 967, 491, Attachment:定位图.png, 000000, 0, 0.7, dw1, dw2 If dw1 0 And dw2 0 And cornerY 0 Then TracePrint 已定位种田 Delay 200 TouchDown 635, 422 Delay 200 TouchMove 635, 160 Delay 200 TouchUp Delay 200 TracePrint 调整完毕 Exit Do End If If 计时器(10, 0, false) Then TracePrint 指定时间到 Call 调整屏幕() Call 定位干扰() Call 重新联机() End If LoopEnd SubSub 种植小麦() Dim landX,landY /-无云- FindPic 569,530,651,595,Attachment:First Farmland0.png,000000,0,0.6,landX,landY If landX 0 And landY 0 And landY 0 Then TracePrint 开始种植 Call 第一田() Delay 500 If 小麦() = 1 Then TracePrint 准备刷地 Call 刷地() End If Delay 1000 /TXL = now /PlantingNumber=PlantingNumber+1 End IfEnd SubSub 小麦收割() Dim land2X,land2Y /-无云- FindPic 580,528,647,584,Attachment:First Farmland2.png,000000,0,0.7,land2X,land2Y If land2X 0 And land2Y 0 And land2Y 0 Then TracePrint 开始收割 Call 第一田() Delay 500 If 收割() = 1 Then Call 刷地() End If Delay 1000 End IfEnd Sub/-点击第一块土地Sub 第一田() Delay 200 Tap 609,564 TracePrint 已点击第一田 Delay 200End SubFunction 小麦()Dim intX,intY FindPic 497,436,573,512,Attachment:wheat0.png,000000,0,0.7,intX,intY If intX 0 And intY 0 Then TracePrint 已找到小麦图标 TouchDown 537,473,0 TracePrint 已点击小麦图标 Delay 100 小麦 = 1 Else TracePrint 未找到小麦图标 小麦=-1 End IfEnd FunctionFunction 收割() Dim intX,intY FindPic 465,472,556,552,Attachment:Sickle.png,000000,0,0.7,intX,intY If intX 0 And intY 0 Then TouchDown 511,492,0 TracePrint 已按镰刀 Delay 100 收割 = 1 Else TracePrint 未找到镰刀图标 收割=-1 End IfEnd FunctionSub 刷地() /种植速度,24是延时 /读取界面元素名称为账号的默认值,如果该元素未设置默认值则读出100 Dim fa TracePrint 刷地 fa=ReadUIConfig(farm) /将小麦移动至第一块田 TouchMove 606,568, 0, 200 Delay 200 /刷第一排 TouchMove 941,395, 0, 800 Delay 200 If fa = 0 Then TouchUp 0 Goto farmland End If /调整至第二排 TouchMove 905, 376, 0, 200 Delay 200 /刷第二排 TouchMove 567, 545, 0, 800 If fa = 1 Then TouchUp 0 Goto farmland End If /调整至第三排 TouchMove 531, 528, 0, 200 /刷第三排 TouchMove 869, 359, 0, 800 If fa = 2 Then TouchUp 0 Goto farmland End If /调整至第四排 TouchMove 832, 342, 0, 200 /刷第四排 TouchMove 496, 508, 0, 800 If fa = 3 Then TouchUp 0 Goto farmland End If /调整至第五排 TouchMove 463, 496, 0, 200 /刷第五排 TouchMove 792, 324, 0, 800 If fa = 4 Then TouchUp 0 Goto farmland End If /调整至第六排 TouchMove 759,307, 0, 200 /刷第六排 TouchMove 425, 473, 0, 800 If fa = 5 Then TouchUp 0 Goto farmland End If /调整至第七排 TouchMove 389,457, 0, 200 /刷第七排 TouchMove 721, 288, 0, 800 If fa = 6 Then TouchUp 0 Goto farmland End If /调整至第八排 TouchMove 686,272, 0, 200 /刷第八排 TouchMove 353, 438, 0, 800 If fa = 7 Then TouchUp 0 Goto farmland End If /调整至第九排 TouchMove 327,412, 0, 200 /刷第九排 TouchMove 653, 253, 0, 800 If fa = 8 Then TouchUp 0 Goto farmland End If Rem farmland Delay 100 TouchUp Delay 100 End SubSub 粮仓()Dim barnX,barnY Advertisement = 0FindPic 539,126, 735,267, Attachment:full.png, 000000, 0, 0.6, barnX, barnY If barnX 0 And barnY 0 Then TracePrint 粮仓已满 Tap 873,199 Delay 1000 barnfull = 1 Else TracePrint 粮仓未满 End If Call 种植小麦() Delay 100 Call 定位干扰() Delay 100 End SubSub 粮仓水位() Dim barnlevelX, barnlevelY,barnlevel2X,barnlevel2Y,BarnlevelText,ba,bbbarnlevel = 5 ba = ReadUIConfig(barn) Select Case (ba) Case 0 bb = 50 Case 1 bb = 60 Case 2 bb = 70 Case 3 bb = 80 End Select FindColor 951,493, 963,584, 4FF8FF, 0, 0.8, barnlevelX, barnlevelY If barnlevelX 0 And barnlevelY 0 Then TracePrint 粮仓水位以找到 BarnlevelText = (584 - barnlevelY) * 100 87 - 10 TracePrint BarnlevelText TracePrint bb / BarnlevelText barnlevel =bb / BarnlevelText Else FindColor 951,493, 963,584, 4AD5F7, 0, 0.8,barnlevel2X,barnlevel2Y If barnlevel2X 0 And barnlevel2Y 0 Then TracePrint 粮仓水位以找到 BarnlevelText = (584 - barnlevel2Y) * 100 87 - 10 TracePrint BarnlevelText TracePrint bb / BarnlevelText barnlevel = bb / BarnlevelText End If End If End SubSub 商店() Call 粮仓水位() Delay 500 Call 开启商店() Delay 500 Call 金钱收集() Delay 100 If barnlevel = 1 or barnfull =1 Then Call 商品上架() End If Delay 100 Call 广告() /-商品架下一页 For ReadUIConfig(shoppage) Call 商品架下一页() Delay 500 Call 金钱收集() Delay 100 If barnlevel =1 or barnfull =1 Then Call 商品上架() End If Delay 100 Call 广告() Next barnfull = 0 /重置粮仓 Call 关闭商店() Delay 1000 FindPic 917, 443, 967, 491, Attachment:定位图.png, 000000, 0, 0.7, dw1, dw2 If dw1 0 And dw2 0 And soldY 0 Then TracePrint 找到已卖出商品 sold2X = soldX sold2Y = soldY-50 Tap sold2X, sold2Y Delay 300 Else TracePrint (没有卖出商品) Delay 50 Exit For End If NextEnd Sub/-商品上架-Sub 商品上架() Dim emptyX, emptyY,empty2X, empty2Y,shopx shopx=ReadUIConfig(shopnumber)+4 For shopx FindPic 320,206, 987,518, Attachment:empty.png,000000,0, 0.9, emptyX, emptyY If emptyX 0 And emptyY 0 Then TracePrint 找到空闲位置 empty2X = emptyX + 33 Tap empty2X, emptyY TracePrint 点击空闲位置 Delay 400 Call 小麦商品上架() Advertisement = 1 Else TracePrint (没有空闲位置) Exit For End If Delay 500 NextEnd SubSub 小麦商品上架() Dim wheatX, wheatY,wheat2X, wheat2Y,soldingX, soldingY Tap 312,195 Delay 500 FindPic 371,159, 682,551, Attachment:wheat.png, 000000,0,0.7, wheatX, wheatY If wheatX 0 And wheatY 0 Then TracePrint 找到小麦 wheat2X = wheatX+ 33 Tap wheat2X, wheatY Delay 500 FindPic 752,205, 817,281, Attachment:solding10.png,000000,0, 0.7, soldingX, soldingY If soldingX 0 And soldingY 0 Then TracePrint 作物充足 Call 价格调整() Delay 100 Tap 810,515 Delay 100 Else TracePrint 作物不足 Tap 910,125 Delay 100 End If Else TracePrint 未找到小麦可以卖 Tap 910,125 Delay 100 End IfEnd SubSub 价格调整() For 9 Tap 735, 367 Delay 50 NextEnd Sub/-广告-Sub 广告() Dim unsoldX, unsoldY,unsold2X, unsold2Y If Advertisement = 0 Then FindPic 694,234, 750,298, Attachment:unsold.png,000000,0, 0.7, unsoldX, unsoldY If unsoldX 0 And unsoldY 0 Then TracePrint 找到贩卖中产品 unsold2X = unsoldX +50 unsold2Y = unsoldY +50 Tap unsoldX, unsold2Y Delay 700 Call 创建广告() TracePrint 创建广告 Advertisement = 1 Else TracePrint (没有未售出商品) End If End IfEnd SubSub 创建广告() Dim hadadX, hadadY FindColor 726-5,344-5,726+5,344+5, 00B145,0, 0.8, hadadX, hadadY If hadadX 0 And hadadY 0 Then TracePrint 可创建广告 Tap 640,423 Delay 700 Else TracePrint 无法创建广告 Tap 768,143 Delay 700 End IfEnd SubSub 定位干扰() Dim intX,intY FindColor 64-5,648-5,64+5,648+5,002638,0,0.7,intX,intY If intX 0 And intY 0 Then TracePrint 有干扰画面 Tap 52,332 Delay 500 Else TracePrint 无干扰画面 End If FindColor 53-5,650-5,53+5,650+5,22B613,0,0.8,intX,intY If intX 0 And intY 0 Then TracePrint 跑到其他人的家 Tap 54,614 Delay 10000 Call 调整屏幕() Else TracePrint 无干扰画面 End If FindPic 97,594,174,669,Attachment:home.png,000000,0,0.8,intX,intY If intX 0 And intY 0 Then TracePrint 跑到其他场景 Tap 138,639 Delay 10000 Call 调整屏幕() Else TracePrint 无干扰画面 End If End SubSub 重新联机() Dim reconnectX,reconnectY FindPic 593,456,673,521,Attachment:reconnecting.png,000000,0,0.8,reconnectX,reconnectY If reconnectX 0 And reconnectY 0 Then Tap 638,492 TracePrint 重新连接 Delay 20000 Call 调整屏幕() Call 定位种田() End IfEnd SubSub 收集 Dim intX,intY,Xa, Ya FindColor 898-5,290-5,898+5,290+5,336A8F,0,0.8,intX,intY If intX 0 And intY 0 Then TracePrint 找到蜜蜂树 Delay 200 Tap 898,290 Delay 2000 End If FindPic 753,136, 840,224, Attachment:honey.png,000000,0, 0.8, intX, intY If intX 0 And intY 0 Then TracePrint 收集蜂蜜 /Xa = intX + 20 /Ya = intY +10 TouchDown 774, 174,1 Delay 200 TouchMove 871, 212, 1,200 Delay 200 TouchMove 948, 215, 1,200 Delay 200 TouchMove 924, 272, 1,200 Delay 200 TouchMove 845, 287, 1,200 Delay 200 TouchUp 1 Delay 200 Tap 1000,263 Else Tap 1000,263 Delay 1000 End IfEnd SubSub 找邻居() Dim FindNeighborX,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) If aaa 6 and 计时器(30,1,false) Then Call 商店() End If Do Until 计时器(30,1,false)=True i = 0 Delay 200 For 6 TracePrint i+1 Delay 10 FindColor FindNeighborX(i)-2,FindNeighborY(i)-2,FindNeighborX(i)+2,FindNeighborY(i)-2,FindNeighborColor1(i),0,0.9,intX,intY If intX 0 And intY 0 Then NeighborA = 0 Else NeighborA = 1 End If FindColor FindNeighborX(i)-2,FindNeighborY(i)-2,FindNeighborX(i)+2,FindNeighborY(i)-2,FindNeighborColor2(i),0,0.9,intX,intY If intX 0 And intY 0 Then NeighborB = 0 Else NeighborB = 1 End If If NeighborA + NeighborB = 2 Then /-点击邻居 Tap FindNeighborX(i), FindNeighborY(i) Delay 2000 /Call 宝箱 FindPic 572,359,681,432,Attachment:NeighborA.png,000000,0,0.7,intX,intY If intX 0 And intY 0 Then TracePrint 点到邻居了 NeighborA = 0 NeighborB = 0 aaa=aaa+1 Exit Do End If End If i=i+1 Next Loop Delay 10End SubSub 邻居小麦 Dim intX,intY FindPic 572,359,681,432,Attachment:NeighborA.png,000000,0,0.7,intX,intY If intX 0 And intY 0 Then TracePrint 邻居画面 /-看是否卖的是小麦 FindPic 514,246,582,315,Attachment:Neighbor Wheat.png,000000,0,0.9,intX,intY If intX 0 And intY 0 Then TracePrint 邻居收小麦 FindColor 591,311,634,345,3361FF,0,0.8,intX,intY If intX 0 And intY 0 Then TracePrint 小麦库存不足 /-点击稍等片刻 Tap 628,524 Delay 1000 Else TracePrint 小麦库存足够,卖出小麦 /-点击没问题 Tap 629,397 Delay 1000 End If Else /-点击我不卖 TracePrint 你收的不是小麦 Tap 625,460 Delay 1000 End If End IfEnd SubSub 粉丝移除() Dim XX, YY,intX,intY,i,XX1, YY1,intA,intB i=0 Tap 1245, 624 Delay 500 Tap 1129, 498 Delay 2000 Do Until i3 Do FindPic 607,540 , 1193,662 ,Attachment:fans.png,000000,0,0.6, intX, intY If intX 0 And intY 0 Then TouchDown intX + 25, intY + 10 Delay 1500 FindColor intX, intY - 5, intX + 50, intY + 5, 0000C8,0,0.6, XX, YY If XX 0 and YY 0 Then TouchUp TracePrint 已选择粉丝 Delay 1500 Else Delay 1000 End If Else TracePrint 未选择粉丝 Delay 1000 Exit Do End If Loop Do FindPic 633,539,1256,622, Attachment:red.png, 000000, 0, 0.8, intA, intB If intA 0 And intB 0 Then Tap intA, intB TracePrint intA, intB TracePrint 已点击粉丝 Delay 1000 FindPic 516,139 ,741,264 ,Attachment:fansremove.png,000000,0,0.7, XX1,YY1 If XX1 0 and YY1 0 Then Tap 518,449 Delay 2000 Else Delay 2000 End If Else TracePrint 未点击粉丝 Delay 2000 Exit Do End If Loop i=i+1 Loop Tap 1246, 498 Delay 1000End SubSub 读现在时(ID)现在时(ID)= TickCount()End SubFunction 计时器(指定时差,ID,重置)计时器=False Dim 相差时相差时 = (TickCount() - 现在时(ID) / 1000If 相差时 = 指定时差 Then 计时器 = trueIf 重置 Then Call 读现在时 (ID)End IfEnd If End Function
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 解决方案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!