qnyh自动释放技能

qnyh自动释放技能,测试过,可以使用。

import java.awt.*;
import java.awt.event.KeyEvent;
import java.awt.event.InputEvent;
import java.util.Random;

public class GamePlugins extends Robot{
    public Random random;
    public GamePlugins() throws Exception{
        this.random = new Random(System.currentTimeMillis());
    }
    // knock keyboard
    public void knock(int key){
        this.keyPress(key);
        double val = 0.2 + random.nextDouble()*(0.4 - 0.2);
        this.delay((int)(1000 * val));
        this.keyRelease(key);
    }
    // comb_key
    public void comb_key(int key1, int key2){
        this.keyPress(key1);
        double val = 0.2 + random.nextDouble()*(0.4 - 0.2);
        this.delay((int)(1000 * val));
        this.keyPress(key2);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.keyRelease(key2);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.keyRelease(key1);
    }
    // buff
    public void buff(){
        this.keyPress(KeyEvent.VK_CONTROL);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.knock(KeyEvent.VK_1);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.knock(KeyEvent.VK_2);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.knock(KeyEvent.VK_3);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.knock(KeyEvent.VK_4);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.knock(KeyEvent.VK_5);
        this.delay((int)(1000 * (0.2 + random.nextDouble()*(0.4 - 0.2))));
        this.keyRelease(KeyEvent.VK_CONTROL);
    }
    // mouse click
    public void click(int button){
        this.mousePress(button);
        double val = 0.2 + random.nextDouble()*(0.4 - 0.2);
        this.delay((int)(1000 * val));
        this.mouseRelease(button);
    }
    // attack
    public void attack(){
        for (int i = 0; i < 3; i++){
            this.knock(KeyEvent.VK_E);
            double val = 0.2 + this.random.nextDouble()*(0.4 - 0.2);
            this.delay((int)(1000 * val));
            this.knock(KeyEvent.VK_6);
            this.delay((int)(1000 * (4 + this.random.nextDouble() * (6-4))));
        }
        this.buff();
    }
    public static void main(String[] args) throws Exception {
        GamePlugins plugin = new GamePlugins();
        plugin.delay(10000);
        plugin.attack();
    }
    @Test
    public void testMouse() throws Exception{
        Robot robot = new Robot();
        robot.delay(5000);
        robot.mouseMove(1200, 500);
        robot.mousePress(InputEvent.BUTTON3_DOWN_MASK);     //鼠标右键
        robot.delay(300);
        robot.mouseRelease(InputEvent.BUTTON3_DOWN_MASK);
    }
    @Test
    public void testGetColor() throws Exception{
        Robot robot = new Robot();
        robot.delay(5000);
        Color color = robot.getPixelColor(600, 400);
        System.out.println(color.getRed() + " " + color.getGreen() + " " + color.getBlue());
    }
}

E:青木颂
6:厚土颂
CTRL+1,2,3,4,5:增益BUFF

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值