- package cn.seejava.lei2;
- import java.awt.AWTException;
- import java.awt.event.InputEvent;
- import java.awt.event.KeyEvent;
- import java.util.Date;
- import javax.swing.JOptionPane;
- public class ReadyOwner implements Runnable {
- //是不是正常开启
- static boolean programeOn = false;
- //是不是开启自动房主功能
- static boolean autoStart = false;
- //是不是开启挂机功能
- static boolean fastJoin = false;
- //是不是开启自动准备
- static boolean autoReady = false;
- //是不是开启自动换队
- static boolean changeTeam = false;
- //小于多少人不准备
- static int penum = 0;
- //3分钟不开始游戏自动退出
- static boolean threeOut = false;
- //自杀
- static boolean noStop = false;
- //控制自动发言
- static boolean sayF5 = false;
- boolean cgTeamStart = false;
- boolean threeOutStart = false;
- static SRobot robot3 = null;
- Check check = new Check();
- Worker worker = new Worker();
- @Override
- public void run() {
- while(true){
- while(programeOn){
- // System.out.println("呵呵");
- try {
- robot3 = new SRobot();
- if(check.isResult(robot3)){
- //有确定了
- worker.doResult(robot3);
- }
- else if(autoReady&&check.isReadyButton(robot3)){
- //找到准备按钮 移动鼠标并且去点击
- if(threeOut&&!threeOutStart){
- //启动一个监控
- HouTui ht = new HouTui();
- Thread t3 = new Thread(ht);
- t3.start();
- }
- int pepnum = check.getPep(robot3);
- if(pepnum>=penum){
- //合格
- //跳槽
- if(changeTeam&&!cgTeamStart){
- Thread t4 = new Thread(new BeTT());
- t4.start();
- worker.sleep(1000);
- }
- worker.doReady(robot3);
- }
- else if(pepnum>2){
- worker.doBack(robot3, check);
- }
- }
- else if(fastJoin&&check.isFastJoin(robot3)){
- //快速加入房间的按钮
- worker.doFastJoin(robot3);
- }
- else if(check.isFQueDing(robot3)){
- //找到一个快速加入的确定确定按钮
- worker.doFQueDing(robot3);
- }
- else if(autoReady&&check.joinGame(robot3)){
- //找到 加入游戏按钮
- if(changeTeam){
- worker.doCheckJoinGame(robot3,check);
- }else{
- worker.doJoinGame(robot3,check);
- }
- }
- else if(check.isNotice(robot3)){
- //服务器人数已经满了,请选择其他服务器
- //已经被房主请出房间
- //已经成为房主请开始游戏
- worker.doTypeEnter(robot3);
- }
- else if(check.isLevelUp(robot3)){
- //提升了军衔
- worker.doLevelUp(robot3);
- }
- else if(check.isStartGame(robot3)){
- if(autoStart){
- //开始游戏
- worker.doStartGame(robot3);
- }else{
- //不要求当房主
- worker.doBack(robot3, check);
- }
- }
- else if(check.isInvite(robot3)){
- //别人的邀请 直接拒绝邀请
- worker.doInvite(robot3);
- }
- else if(check.timeToDead(robot3)&&check.isLive(robot3)&&noStop){
- //检查是否该死
- worker.doKeyType(robot3, KeyEvent.VK_4);
- }
- if(check.isHaveBomb(robot3)){
- //手上有雷了 做自雷
- worker.doThrowBomb(robot3);
- }
- if(sayF5){
- worker.doSayF5(robot3);
- }
- worker.doChekOut(robot3,check);
- } catch (AWTException e) {
- JOptionPane.showMessageDialog(null, "外挂出现异常异常编号0001,请主动联系开发人员");
- }
- worker.sleep(600);
- }
- //System.out.println("嘿嘿ie");
- worker.sleep(2000);
- }
- }
- class HouTui implements Runnable{
- @Override
- public void run() {
- threeOutStart = true;
- worker.doThreeOut(check);
- threeOutStart = false;
- }
- }
- class BeTT implements Runnable{
- @Override
- public void run() {
- cgTeamStart = true;
- worker.cgTeam(check);
- cgTeamStart = false;
- }
- }
- }