微信跳一跳辅助Demo

时间:2023-03-09 17:50:00
微信跳一跳辅助Demo

  [原创] 前几天没事干看别人一直在玩微信上线的那一个跳一跳小游戏,玩着玩着老是掉下去,闲着没事呗

就想了想做一个辅助程序的呗.不过先做的手动版的.自动版的有点麻烦.就不发了.用的Java写的,也就一个蒙版.

下面就开始介绍我的小程序,没好多东西,真正的代码应该就是100行左右,没啥难的.

  下面这是我的微信朋友们的跳一跳

微信跳一跳辅助Demo

也就这样吧,因为wechat还是有那个仿作弊系统的,所以还是低调的吧...

话不多说,还是下面奉上我的code吧,说多了墨迹呢....

 package com.rain.jump.util;

 import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import javax.swing.JFrame;
import javax.swing.JLabel; /**
* @classname JumpOneJump.java
* @package com.rain.jump.util
* @project Jump
* @author Rain
* @describe 微信跳一跳项目
* @version 1.0
* @date 2018年1月13日 下午12:06:07
*/
public class JumpOneJump extends JFrame{
/**
*
*/
private static final long serialVersionUID = 1L;
//定义两点坐标
int x0,y0,x1,y1;
//设置鼠标点击是第一次还是...
boolean flag=true;
public JumpOneJump()
{
super("微信跳一跳");//调父类的方法
this.setSize(316,565);
this.setUndecorated(true);
//设置窗口居中
this.setLocationRelativeTo(null);
this.setOpacity(0.3f);
this.setAlwaysOnTop(true);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel jLabel=new JLabel();
this.add(jLabel); //给jLabel添加一个监听
this.addMouseListener(new MouseAdapter() {
//当你鼠标点击的时候
public void mouseClicked(MouseEvent e){
//参数 鼠标的事件源
//System.out.println(e);
if(e.getButton()==MouseEvent.BUTTON3)
{
//System.out.println("哈哈哈"); if(flag)
{
x0=e.getX();
y0=e.getY();
flag=false;
System.out.println("第一次点击的坐标是:("+x0+","+y0+")");
}
else{
x1=e.getX();
y1=e.getY();
flag=true;
System.out.println("第二次点击的坐标是:("+x1+","+y1+")");
//取绝对值
double _x=Math.abs(x0-x1);
double _y=Math.abs(y0-y1);
//开平方(两点的距离)
double dis = Math.sqrt(_x*_x+_y*_y);
System.out.println(dis);
//定义adb命令
// String cmd="adb shell input touchscreen "
// +"swipe 200 187 200 187 "+Math.round(dis*3);
String cmd="adb shell input swipe 320 410 320 410 "+Math.round(dis*5);
Runtime run = Runtime.getRuntime(); try {
//执行命令
Process p=run.exec(cmd);
System.out.println(cmd);
p.waitFor();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (InterruptedException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} }//end else }//end if
}//end mouseClick()
}); } //程序的入口
public static void main(String[] args) { new JumpOneJump();
} }

不过这个辅助用法还是有讲究的呢...要配套ADB工具,

还要那个就是配套的那个能在电脑上面操作手机的辅助工具,类似TC的套件呀,

还有就是手机得开USB调试(这个在开发者模式中有的),然后看下连接上了电脑没,win+R键然后在输入cmd进入命令行模式,然后adb devices看有没有连接上手机.

还是不懂的下面评论,然后告知你的...谢谢大家 了

再附上下图片,刚刚跳的.

微信跳一跳辅助Demo