function dz(x1,y1,a) --找色點擊判斷函數
xx = getColor(x1, y1);
if xx==a then
touchDown(0, x1, y1);
touchUp(0);
end
mSleep(80);
end
function main()
while true do
dz(310,86,0x73451A);--一般走路
mSleep(80);
end;
while true do
dz(420,290,0xBDB69D);--獲得卡片
mSleep(80);
end;
while true do
dz(175,86,0x813C00);--戰鬥
mSleep(80);
end;
while true do
dz(384,95,0x470E11);--略過
mSleep(80);
end;
while true do
dz(567,71,0x7C7011);--黃勾確定
mSleep(80);
end;
while true do
dz(443,313,0x464B0A);--取消
mSleep(80);
end;
while true do
dz(450,470,0x070D16);--使用黃藍
mSleep(80);
end;
end作者: braxus 時間: 2014-8-4 12:18
不是沒爬文 不是沒研究
--一般走路
if getColor(310,86) == 0x73451A then
mSleep(200);
touchDown(1, 310,86)
mSleep(50);
touchUp(1)
else
mSleep(250);
end
--獲得卡片
if getColor(420,290) == 0xBDB69D then
mSleep(200);
touchDown(2, 420,290);
mSleep(50);
touchUp(2);
else
mSleep(250);
end
--戰鬥
if getColor(175,86) == 0x813C00 then
mSleep(200);
touchDown(3, 175,86);
mSleep(50);
touchUp(3);
else
mSleep(250);
end
--略過
if getColor(384,95) == 0x470E11 then
mSleep(200);
touchDown(4, 384,95);
mSleep(50);
touchUp(4);
else
mSleep(250);
end
--黃勾確定
if getColor(567,71) == 0x7C7011 then
mSleep(200);
touchDown(5, 567,71);
mSleep(50);
touchUp(5);
else
mSleep(250);
end
mSleep(80);
--取消
if getColor(443,313) == 0x464B0A then
mSleep(200);
touchDown(6, 443,313);
mSleep(50);
touchUp(6);
else
mSleep(250);
end
--使用黃藍
if getColor(450,470) == 0x070D16 then
mSleep(200);
touchDown(7, 450,470);
touchUp(7);
else
mSleep(250);
end
function click(x, y) -- 點擊函數
touchDown(0, x, y);
mSleep(100);
touchUp(0);
end
function run_check(check_list)
for i = 1,#check_list do
x1 = check_list[i]["c_x"];
y1 = check_list[i]["c_y"];
a = check_list[i]["c_c"];
x = getColor(x1, y1);
if x==a then
click(x1,y1);
break
end
end
mSleep(300);
run_check(check_list);
end