FFOM_脚本源代码
Posted hanxuanwong
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了FFOM_脚本源代码相关的知识,希望对你有一定的参考价值。
///界面
界面1: { 功能: { 下拉框: { 注释:"初始选项是可选属性,默认值为0。模版中设置了三个选项,您可以根据需要增加或减少,注意各选项之间用逗号分隔。", 名称:"下拉框", 点击响应:"函数名1", 选项: [ "开藏宝图(13:25)", "开藏宝图(12:35)", "秒装备(720*1280)", "挂家谱", "钓鱼", ], 初始选项:0 }, }, }
///代码
Dim Choice = ReadUIConfig("下拉框", Choice) If Choice = 0 Then Call 藏宝图() ElseIf Choice = 1 Then Call 藏宝图2() ElseIf Choice = 2 Then Call 秒杀() ElseIf Choice = 3 Then Call 挂家谱() ElseIf Choice = 4 Then Call 钓鱼() end if EndScript Function 寻找图片(intX, intY) If intX > 0 And intY > 0 Then //初始化随机数 Randomize //30以内的随机数 Dim a = int(rnd() * 10) Dim b = int(rnd() * 10) Tap intX + a, intY + b End If Delay 1000 End Function Function 寻找图片2(intX,intY) If intX > 0 And intY > 0 Then //初始化随机数 Randomize //30以内的随机数 dim a = int(rnd() * 10) dim b = int(rnd() * 10) Tap intX + a, intY + b Delay 100 Tap intX + a, intY + b End If Delay 1000 End Function Sub 秒杀() Dim Num = 49 While Num <= 50 And Num > 0 Tap 78, 904 Delay 100 Tap 79, 1072 Delay 100 //书、装备 Tap 251, 908 //Delay 100 Tap 251, 908 Tap 251, 908 Wend End Sub sub 藏宝图() Dim intX,intY //识别“背包”图片 FindPic 0, 0, 2000, 2000, "Attachment:背包图标01.png", "101010", 0, 0.7, intX, intY If intX = -1 And intY = -1 Then FindPic 0, 0, 2000, 2000, "Attachment:背包图标02.png", "101010", 0, 0.9, intX, intY End If Dim 背包图片 = 寻找图片(intX, intY) //识别“藏宝图”图片 FindPic 0, 0, 2000, 2000, "Attachment:藏宝图.png", "101010", 0, 0.7, intX, intY dim 藏宝图图片 = 寻找图片2(intX, intY) //赋Num值作为循环判断条件 Dim Num = 50 While Num <= 50 And Num > 0 //延时15s Delay 15000 //识别“使用藏宝图”图片 FindPic 0, 0, 2000, 2000, "Attachment:藏宝图-使用.png", "101010", 0, 0.7, intX, intY Dim 使用藏宝图 = 寻找图片(intX, intY) //Num = Num - 1 //寻找“洞窟识别”图片 FindPic 0, 0, 2000, 2000, "Attachment:洞窟识别.png|洞窟识别04.png|洞窟识别05.png|离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.7, intX, intY TracePrint intX,intY //判断是否存在“洞窟识别”图片 If intX > -1 And intY > -1 Then TracePrint "进入洞窟" Delay 80000 //寻找“离开洞窟”图片 FindPic 0, 0, 2000, 2000, "Attachment:离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.7, intX, intY Dim 离开洞窟 = 寻找图片(intX, intY) Delay 1000 //寻找“离开确定-洞窟”图片 FindPic 0, 0, 2000, 2000, "Attachment:离开确定-洞窟02.png", "101010", 0, 0.7, intX, intY Dim 确定离开洞窟 = 寻找图片(intX + 20, intY + 20) TracePrint "离开洞窟" Delay 1500 //结束“洞窟识别”图片判断 End If //延时3S Delay 3000 Wend end sub sub 藏宝图2() Dim intX,intY //识别“背包”图片 FindPic 0, 0, 2000, 2000, "Attachment:背包图标01.png", "101010", 0, 0.7, intX, intY If intX = -1 And intY = -1 Then FindPic 0, 0, 2000, 2000, "Attachment:背包图标02.png", "101010", 0, 0.9, intX, intY End If Dim 背包图片 = 寻找图片(intX, intY) //识别“藏宝图”图片 FindPic 0, 0, 2000, 2000, "Attachment:藏宝图.png", "101010", 0, 0.7, intX, intY dim 藏宝图图片 = 寻找图片2(intX, intY) //赋Num值作为循环判断条件 Dim Num = 99 While Num <= 99 And Num > 0 //延时15s Delay 15000 //识别“使用藏宝图”图片 FindPic 0, 0, 2000, 2000, "Attachment:藏宝图-使用.png", "101010", 0, 0.7, intX, intY Dim 使用藏宝图 = 寻找图片(intX, intY) Num = Num - 1 //寻找“洞窟识别”图片 FindPic 0, 0, 2000, 2000, "Attachment:洞窟识别.png|洞窟识别04.png|洞窟识别05.png|离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.7, intX, intY TracePrint intX,intY //判断是否存在“洞窟识别”图片 If intX > -1 And intY > -1 Then TracePrint "进入洞窟" Delay 130000 //寻找“离开洞窟”图片 FindPic 0, 0, 2000, 2000, "Attachment:离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.7, intX, intY Dim 离开洞窟 = 寻找图片(intX, intY) Delay 1000 //寻找“离开确定-洞窟”图片 FindPic 0, 0, 2000, 2000, "Attachment:离开确定-洞窟02.png", "101010", 0, 0.7, intX, intY Dim 确定离开洞窟 = 寻找图片(intX + 20, intY + 20) TracePrint "离开洞窟" Delay 1500 //结束“洞窟识别”图片判断 End If //延时3S Delay 3000 Wend end sub Sub 嘻唰唰() dim Num = 4 While Num <= 4 and Num > 0 Delay 2000 Dim intX,intY FindPic 0, 0, 2000, 2000, "Attachment:离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.7, intX, intY If intX = - 1 And intY = - 1 Then Randomize //初始化随机数 dim A1 = int(rnd() * 20) //经验喜刷刷 Tap A1 + 311, A1 + 1040 Delay 2000 Tap A1 + 249, A1 + 1057 Num = Num - 1 Delay 60000 //防自动寻路失败 Tap A1 + 509, A1 + 70 Else Delay 60000 dim Num2 = 1000 Do While Num2 <= 1000 FindPic 0, 0, 2000, 2000, "Attachment:离开洞窟01.png|离开洞窟02.png|离开洞窟03.png", "101010", 0, 0.5, intX, intY If intX > 0 And intY >0 Then //C = 防锁屏(intX, intY) Randomize //初始化随机数 dim A2 = Int(Rnd() * 20) Tap A2 + 130, A2 + 1153 Num2 = Num2 - 1 Delay 60000 Else Delay 40000 Exit Do End If Loop End If Wend End Sub Sub 钓鱼() Dim Num = 49 While Num <= 50 And Num > 0 Tap 514,1065 Delay 300 Tap 209,753 Delay 300 Tap 122,1163 Delay 12000 Wend End Sub Sub 挂家谱() Dim Num=9 While num = 9 Delay 2000 Tap 122,520//家谱 Delay 2000 Tap 373,1219//结拜 Delay 2000 Tap 86,242//召集成员 Delay 2000 Tap 627,1175//关闭窗口 Delay 2000 Tap 335,88//召唤跟随 Delay 2000 Tap 332,165//取消跟随 Delay 5000 Tap 121, 1162//平A Delay 180000//三分钟 Tap 121, 1162//平A Delay 180000//三分钟 Tap 121, 1162//平A Delay 180000//三分钟 Tap 121, 1162//平A Delay 180000//三分钟 Tap 121, 1162//平A Delay 180000//三分钟 Wend End Sub
以上是关于FFOM_脚本源代码的主要内容,如果未能解决你的问题,请参考以下文章
;~ 小部分AutoHotkey源代码片段测试模板2019年10月9日.ahk