标题: 不到60行的天天爱消除脚本,轻松200万+,源码发放。
作者: 天玄者 @Ta
时间: 2013-08-24
x_qd,y_qd=40,630 --60,780 --55,980;
jl=68;
quyu={1,198,473,670};
rotateScreen(0);
function main()
repeat
local xt,yt=0,0;
for i=0,6 do
for j=0,6 do
xt=x_qd+jl*j;
yt=y_qd-jl*i;
r,g,b=getColorRGB(xt,yt)
if i<6 and bjcolor(xt,yt-jl,r,g,b,10)==false then--上
if bjcolor(xt-jl,yt-jl,r,g,b,10) and (bjcolor(xt+jl,yt-jl,r,g,b,10) or bjcolor(xt-2*jl,yt-jl,r,g,b,10)) or bjcolor(xt+jl,yt-jl,r,g,b,10) and bjcolor(xt+2*jl,yt-jl,r,g,b,10) or bjcolor(xt,yt-2*jl,r,g,b,10) and bjcolor(xt,yt-3*jl,r,g,b,10) then
click(xt,yt);
click(xt,yt-jl);
end
end
if i>0 and bjcolor(xt,yt+jl,r,g,b,10)==false then--下
if bjcolor(xt-jl,yt+jl,r,g,b,10) and (bjcolor(xt+jl,yt+jl,r,g,b,10) or bjcolor(xt-2*jl,yt+jl,r,g,b,10)) or bjcolor(xt+jl,yt+jl,r,g,b,10) and bjcolor(xt+2*jl,yt+jl,r,g,b,10) or bjcolor(xt,yt+2*jl,r,g,b,10) and bjcolor(xt,yt+3*jl,r,g,b,10) then
click(xt,yt);
click(xt,yt+jl);
end
end
if j>0 and bjcolor(xt-jl,yt,r,g,b,10)==false then--左
if bjcolor(xt-jl,yt+jl,r,g,b,10) and (bjcolor(xt-jl,yt+2*jl,r,g,b,10) or bjcolor(xt-jl,yt-jl,r,g,b,10)) or bjcolor(xt-jl,yt-jl,r,g,b,10) and bjcolor(xt-jl,yt-2*jl,r,g,b,10) or bjcolor(xt-2*jl,yt,r,g,b,10) and bjcolor(xt-3*jl,yt,r,g,b,10) then
click(xt,yt);
click(xt-jl,yt);
end
end
if j<6 and bjcolor(xt+jl,yt,r,g,b,10)==false then--右
if bjcolor(xt+jl,yt+jl,r,g,b,10) and (bjcolor(xt+jl,yt+2*jl,r,g,b,10) or bjcolor(xt+jl,yt-jl,r,g,b,10)) or bjcolor(xt+jl,yt-jl,r,g,b,10) and bjcolor(xt+jl,yt-2*jl,r,g,b,10) or bjcolor(xt+2*jl,yt,r,g,b,10) and bjcolor(xt+3*jl,yt,r,g,b,10) then
click(xt,yt);
click(xt+jl,yt);
end
end
end
end
until false
end
function bjcolor(x2,y2,r,g,b,wc)
wc=wc or 0;
if x2<quyu[1] or x2>quyu[3] or y2<quyu[2] or y2>quyu[4] then
return false
end
local r1,g1,b1=getColorRGB(x2,y2);
if (r<=r1+wc and r>=r1-wc) and (g<=g1+wc and g>=g1-wc) and (b<=b1+wc and b>=b1-wc) then
return true
else
return false
end
end
function click(x,y)
touchDown(0, x, y);
mSleep(50);
touchUp(0);
end
参数只需要修改前4行就可以适应其它屏幕。
求改540*960分辨率
[隐藏样式|查看源码]