为了账号安全,请及时绑定邮箱和手机立即绑定

lua或c怎么用数组写下列函数

lua或c怎么用数组写下列函数

慕村225694 2019-04-11 06:02:57
x_mhz4s ,y_mhz4s = findColorInRegionFuzzy(0xFFFFFF, 90, 469,712 , 469,712 ); x_mhz4s2,y_mhz4s2 = findColorInRegionFuzzy(0xFFFFFF, 90, 469,725 , 469,725 ); x_mhz4s3,y_mhz4s3 = findColorInRegionFuzzy(0xA5AAA5, 80, 470,713 , 470,713 ); x_mhz4s4,y_mhz4s4 = findColorInRegionFuzzy(0xA5AAA5, 80, 470,723 , 470,723 ); x_mhz4s5,y_mhz4s5 = findColorInRegionFuzzy(0xA5A6A5, 80, 470,725 , 470,725 ) ------------------------------------findColorInRegionFuzzy为找单点色函数--------------------------------if x_mhz4s~= -1 and x_mhz4s2 ~= -1 and x_mhz4s3 ~=-1 and x_mhz4s4 and x_mhz4s5 ~=-1 thenclick( 419,728 ) --mSleep(1500) --等待1500毫秒endend
查看完整描述

1 回答

?
qq_笑_17

TA贡献1818条经验 获得超7个赞

data=( 0xFFFFFF,90,469,712 , 469,712 ,
0xFFFFFF, 90, 469,725 , 469,725,
0xA5AAA5, 80, 470,713 , 470,713 ,
0xA5AAA5, 80, 470,723 , 470,723 ,
0xA5A6A5, 80, 470,725 , 470,725 }
--你要的数组

function bingyuan3()

local long=#data --数组的长度

for i=1,long-5,6 do
x = (findColorInRegionFuzzy(data[i],data[i+1],
data[i+2],data[i+3],data[i+4],data[i+5])) ~=1 and x
end

if x then
click( 419,728 )
mSleep(1500) --等待1500毫秒
end
end




查看完整回答
反对 回复 2019-04-12
  • 1 回答
  • 0 关注
  • 650 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信