function main()
math.randomseed(tostring(os.time()):sub(5):reverse()); -- 随机种子
x, y = screen.findImage("/var/touchelf/a.png");--这里是描述中的检测到图片
if x ~= -1 and y ~= -1 then
act = math.random(1, 2); --这里是随机
if act == 1 then
fight1()
elseif act == 2 then
fight2()
end
end
end
function fight1()
--自动打怪1
end
function fight2()
--自动打怪2
end
问 找到某个颜色的点如何随机运行两个命令其中一个?