微信跳一跳外挂,半自动,全机型,精准跳跃

//郑重声明, 此代码绝对安全
//个人认为较为好用,个人手机坚果Pro,个人认为几乎兼容所有Android,运行良好,部分不足等期末考试之后再弥补
//本人大一菜鸟一枚,若有不足,恳请各位多多赐教!

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
//设置悬浮窗(准心)
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

//设定对悬浮窗触摸动作的响应,sta变量是一个悬浮窗状态的标记,起标记状态作用
window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    //假如没有处于微信跳一跳界面,则跳过下面的步骤
    //在这里提示一下,有的时候微信跳一跳的activity是
    //com.tencent.mm.plugin.appbrand.ui.AppBrandUI1
   // 请大家留心
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    //假如已经动过准心了,并且已经找到了棋子,则跳跃
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
   //将状态归零
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数,这里注释掉了,个人感觉没用,若有需要可以取消注释
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

最后由 PowerShellA 编辑

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@12223345微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

  • 列表

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@qq-c78e35d64910f9abb7fda5feaa116c4e微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
{
log("Can't Spot Piece, Exit.");
exit(0);
}

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
if(is_piece && piece_start_x < 0)
{
piece_start_x = x;
}
if(!is_piece && piece_start_x >= 0)
{
piece_end_x = x;
break;
}
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
px: piece_x, py: piece_y
}
}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
{
log("Wait For WeChat");
sleep(1000);
continue;
}

im = captureScreen();
// 获取棋子和的位置
piece = find_piece(im);
log(piece.px+"  "+piece.py);
if( piece.x!=0 && piece.y !=0 && sta==1 )
{
    deltaX=abs(boardX - piece.px);
    deltaY=abs(boardY - piece.py);
    toast("jump");
    log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
    log("Jump");
    jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
}
else
{
    log("Wait For User");
   continue;
}
sta=0;
piece.x=0;
piece.y=0;
sleep(950);

}
}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@12223345微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@yyyy微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@12223345微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

  • 列表

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

@yyyy微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@12223345微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

  • 列表

@powershella微信跳一跳外挂,半自动,全机型,精准跳跃 中说:

//唇印是瞄准准心,系数可调
//设置分辨率
setScreenMetrics(1080,1920);

// 长按的时间系数根据实际情况调节
var press_coefficient = 1.392;

const under_game_score_y = 300;
const press_x = 163;
const press_y = 1822;
// 棋子的宽度,比截图中量到的稍微大一点比较安全,可能要调节
const piece_body_width = 80 ;
//棋子最顶部到棋子底部中点的距离
const piece_dist_from_top_to_base = 188;
//棋子大致颜色
const piece_color = "#3d3752";
var w = device.width;
var h = device.height;

//记录按键被按下时的触摸坐标
var xx = 0, yy = 0, boardX, boardY, sta=0;
//记录按键被按下时的悬浮窗位置
var windowX, windowY;
//记录按键被按下的时间以便判断长按等动作
var downTime;
var window = floaty.window( <frame>
<button id="action" text="唇印放在这里" w="120" h="60" bg="#1f995566"/>
</frame>
);
//使这些函数调用更方便
const red = colors.red;
const green = colors.green;
const blue = colors.blue;
const max = Math.max;
const abs = Math.abs;

window.action.setOnTouchListener(function(view, event)
{
switch(event.getAction())
{
case event.ACTION_DOWN:
xx = event.getRawX();
yy = event.getRawY();
windowX = window.getX();
windowY = window.getY();
downTime = new Date().getTime();
sta=0;
return true;
case event.ACTION_MOVE:
window.setPosition(windowX + (event.getRawX() - xx), windowY + (event.getRawY() - yy));
sta=0;
return true;
case event.ACTION_UP:
boardX=window.getX()+60;
boardY=window.getY()+30;
sta=1;
return true;
}
return true;
});

prepare();
main();

function jump(boardX , piecex ,distance)
{
var fir=1.1, finaltime;
if(boardX <= piecex)
{
fir=0.74;
}
var press_time = distance * press_coefficient;
press_time = Math.max(200, press_time);
finaltime = parseInt(press_time) * fir;
press(press_x, press_y, parseInt(finaltime));
log("FinalTime="+parseInt(finaltime));
fir=1.1;
}

function find_piece(im)
{
//使用内置找色函数找出棋子最顶部的位置
var piece_top = findColor(im, piece_color, { region: [0, 300, 1080, 1580], threshold: 4 });

if(!piece_top)
    {  
        log("Can't Spot Piece, Exit.");
        exit(0);
    }

var piece_start_x = -1;
var piece_end_x = -1;
//遍历该行找出棋子顶部中点位置
for(var x = 0; x < w; x++)
{
    var is_piece = images.detectsColor(im, piece_color, x, piece_top.y);
    if(is_piece && piece_start_x < 0)
    {
        piece_start_x = x;
    }
    if(!is_piece && piece_start_x >= 0)
    {
        piece_end_x = x;
        break;
    }
}
//棋子顶部中点位置
var piece_top_center_x = (piece_start_x + piece_end_x) / 2;

var piece_x = piece_top_center_x;
var piece_y = piece_top.y + piece_dist_from_top_to_base;
return {
         px: piece_x, py: piece_y
       }

}

function main()
{
toast("请打开游戏,并在5秒内点击开始按钮");
log("MainStarted.....................");
waitForActivity("com.tencent.mm.plugin.appbrand.ui.AppBrandUI");
sleep(5000);

var deltaX,deltaY,im,piece;
while(1)
{
    if(currentActivity() != "com.tencent.mm.plugin.appbrand.ui.AppBrandUI")
    {
        log("Wait For WeChat");
        sleep(1000);
        continue;
    }  

    im = captureScreen();
    // 获取棋子和的位置
    piece = find_piece(im);
    log(piece.px+"  "+piece.py);
    if( piece.x!=0 && piece.y !=0 && sta==1 )
    {
        deltaX=abs(boardX - piece.px);
        deltaY=abs(boardY - piece.py);
        toast("jump");
        log("BoardX="+boardX+",BoardY="+boardY+";piece.px="+piece.px+",piece.py="+piece.py);
        log("Jump");
        jump(boardX,piece.px,Math.sqrt(deltaX * deltaX + deltaY * deltaY));
    }
    else
    {
        log("Wait For User");
       continue;
    }
    sta=0;
    piece.x=0;
    piece.y=0;
    sleep(950);
}

}

function prepare()
{
//确保无障碍服务开启
auto();
//请求截图权限
requestScreenCapture();
//请求稳定窗口
setInterval(()=>{}, 1000);
//让用户输入系数
// press_coefficient = dialogs.input("调整跳跃系数(可选)", press_coefficient);
}

  • 191
    帖子
  • 99922
    浏览

与 Auto.js 的连接断开,我们正在尝试重连,请耐心等待