Skip to content

Commit

Permalink
add PVP mode 自動戰鬥判斷
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardHan committed Feb 17, 2016
1 parent 89da403 commit 1d95467
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 20 deletions.
Binary file not shown.
61 changes: 41 additions & 20 deletions 工程目录/LineRangerAutoFightingv2XX/main.script
Expand Up @@ -263,15 +263,17 @@ function isFightButtonShow() --2015-08-16 by Jay
end

function isFightingViewColor()
if isColor(1207,70,0x351407) or isColor(1207,70,0x351407) then
-- 正常關卡 1207,70,0x351407
-- PVP 1208,125,0x351407
if isColor(1207,70,0x351407) or isColor(1208,125,0x351407) then
return true;
else
sleep(300);
if isColor(1207,70,0x351407) or isColor(1207,70,0x351407) then
if isColor(1207,70,0x351407) or isColor(1208,125,0x351407) then
return true;
else
sleep(300);
if isColor(1207,70,0x351407) or isColor(1207,70,0x351407) then
if isColor(1207,70,0x351407) or isColor(1208,125,0x351407) then
return true;
else
return false;
Expand All @@ -280,6 +282,23 @@ function isFightingViewColor()
end
end

function isPVPViewColor()
if isColor(1208,125,0x351407) then
return true;
else
sleep(100);
if isColor(1208,125,0x351407) then
return true;
else
if isColor(1208,125,0x351407) then
return true;
else
return false;
end
end
end
end

function isLevelEightColor()
if isColor(1120,632,0x000000) and isColor(1138,632,0x000000) and isColor(1137,648,0x000000) and isColor(1138,642,0x000000) then
return true;
Expand Down Expand Up @@ -395,23 +414,25 @@ function switchTeam()
end

--todo
function clickLINEAutoButton()
if(UI_type == "無盡模式") then
sleep(500);
touchClick(1229,196); -- 無盡
if autoX2Mode then
sleep(150);
touchClick(1229,196);
end
else
sleep(500);
touchClick(1211,148); -- 其他關卡
if autoX2Mode then --add 20160109 Jay
sleep(150);
touchClick(1211,148);
end

end
function clickLINEAutoButton()
-- PVP mode didnt have auto button
if not isPVPViewColor() then
if(UI_type == "無盡模式") then
sleep(500);
touchClick(1229,196); -- 無盡
if autoX2Mode then
sleep(150);
touchClick(1229,196);
end
else
sleep(500);
touchClick(1211,148); -- 其他關卡
if autoX2Mode then --add 20160109 Jay
sleep(150);
touchClick(1211,148);
end
end
end
end

--todo
Expand Down
Binary file modified 工程目录/LineRangerAutoFightingv2XX/main.script.m
Binary file not shown.

0 comments on commit 1d95467

Please sign in to comment.