java游戏外挂Java源代码精品资料.doc
Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; /主类 public class Action static int TimeNumber=0; public static void main(String args) ViewFlow vf=new ViewFlow(); vf.addActionlistener(); Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; /主类 public class Action static int TimeNumber=0; public static void main(String args) ViewFlow vf=new ViewFlow(); vf.addActionlistener(); package game;import javax.swing.*;import java.awt.*;import java.awt.event.*;import javax.swing.event.*;import java.lang.*;import java.io.*; /主类public class Actionstatic int TimeNumber=0;public static void main(String args) ViewFlow vf=new ViewFlow(); vf.addActionlistener(); Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; class MyActionListener2 implements ActionListener/核心类(实现主要功能) static int ip=0; public void actionPerformed(ActionEvent e2) try Robot robot=new Robot(); int x=73,y=23, x2=ViewFlow.slider1.getValue(), y2=23, x3=228,y3=26, x4=0,y4=0; /* int i=ViewFlow.slider1.getValue(),j=23,k=0; try Robot rb=new Robot(); while(k<1) rb.mouseMove(i,j); rb.getPixelColor(i,j); System.out.print(k+)+": "+rb.getPixelColor(i,j)+": "); System.out.println("(i="+(i+)+",j="+j+");"); catch(AWTException e3) */ if(robot.getPixelColor(x,y).equals(new Color(255,75,53)&&MyActionListener2.ip=1)/自动打怪 robot.keyPress(KeyEvent.VK_5);/捡东西 if( robot.getPixelColor(x3,y3).equals(new Color(255,107,87) |robot.getPixelColor(x3,y3).equals(new Color(255,107,86) robot.keyPress(KeyEvent.VK_1);/技能1 /robot.keyPress(KeyEvent.VK_2);/技能2 /robot.keyPress(KeyEvent.VK_3);/技能3 /robot.keyPress(KeyEvent.VK_4);/打怪1 else robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); /System.out.println(MyActionListener.myTimer.getDelay();/改变加血速度测试 if(!robot.getPixelColor(x,y).equals(new Color(255,75,53) ViewFlow.setText1("提示:请启动游戏"); /System.out.println(ViewFlow.slider1.getValue();/测试1 /System.out.println(ViewFlow.slider2.getValue();/测试2 else if( robot.getPixelColor(x2,y2).equals(new Color(255,75,53) /加血位置与血的颜色相等 |robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) /加血位置与指定的理想的血的位置的颜色相等 /* |robot.getPixelColor(x2,y2).equals(new Color(255,159,147) /加血位置与指血的颜色1比较 |robot.getPixelColor(x2,y2).equals(new Color(247,193,186) /加血位置与指血的颜色2比较 |robot.getPixelColor(x2,y2).equals(new Color(228,103,88) /加血位置与指血的颜色3比较 |robot.getPixelColor(x2,y2).equals(new Color(245,72,51) /加血位置与指血的颜色4比较 |robot.getPixelColor(x2,y2).equals(new Color(255,183,174) /加血位置与指血的颜色5比较 |robot.getPixelColor(x2,y2).equals(new Color(228,91,75) /加血位置与指血的颜色6比较 |robot.getPixelColor(x2,y2).equals(new Color(248,73,52) /加血位置与指血的颜色7比较 |robot.getPixelColor(x2,y2).equals(new Color(225,195,188) /加血位置与指血的颜色8比较 |robot.getPixelColor(x2,y2).equals(new Color(235,141,130) /加血位置与指血的颜色9比较 |robot.getPixelColor(x2,y2).equals(new Color(235,69,49) /加血位置与指血的颜色10比较 |robot.getPixelColor(x2,y2).equals(new Color(239,154,144) /加血位置与指血的颜色11比较 */ ) ViewFlow.setText1("不需加血"); else if( robot.getPixelColor(x,y).equals(new Color(255,75,53)/加血 &&!robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) ) robot.keyPress(KeyEvent.VK_F8);/加血的键位 /ViewFlow.setText1("自动加血开始"); catch(AWTException eException1) Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; class MyActionListener2 implements ActionListener/核心类(实现主要功能) static int ip=0; public void actionPerformed(ActionEvent e2) try Robot robot=new Robot(); int x=73,y=23, x2=ViewFlow.slider1.getValue(), y2=23, x3=228,y3=26, x4=0,y4=0; /* int i=ViewFlow.slider1.getValue(),j=23,k=0; try Robot rb=new Robot(); while(k<1) rb.mouseMove(i,j); rb.getPixelColor(i,j); System.out.print(k+)+": "+rb.getPixelColor(i,j)+": "); System.out.println("(i="+(i+)+",j="+j+");"); catch(AWTException e3) */ if(robot.getPixelColor(x,y).equals(new Color(255,75,53)&&MyActionListener2.ip=1)/自动打怪 robot.keyPress(KeyEvent.VK_5);/捡东西 if( robot.getPixelColor(x3,y3).equals(new Color(255,107,87) |robot.getPixelColor(x3,y3).equals(new Color(255,107,86) robot.keyPress(KeyEvent.VK_1);/技能1 /robot.keyPress(KeyEvent.VK_2);/技能2 /robot.keyPress(KeyEvent.VK_3);/技能3 /robot.keyPress(KeyEvent.VK_4);/打怪1 else robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); /System.out.println(MyActionListener.myTimer.getDelay();/改变加血速度测试 if(!robot.getPixelColor(x,y).equals(new Color(255,75,53) ViewFlow.setText1("提示:请启动游戏"); /System.out.println(ViewFlow.slider1.getValue();/测试1 /System.out.println(ViewFlow.slider2.getValue();/测试2 else if( robot.getPixelColor(x2,y2).equals(new Color(255,75,53) /加血位置与血的颜色相等 |robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) /加血位置与指定的理想的血的位置的颜色相等 /* |robot.getPixelColor(x2,y2).equals(new Color(255,159,147) /加血位置与指血的颜色1比较 |robot.getPixelColor(x2,y2).equals(new Color(247,193,186) /加血位置与指血的颜色2比较 |robot.getPixelColor(x2,y2).equals(new Color(228,103,88) /加血位置与指血的颜色3比较 |robot.getPixelColor(x2,y2).equals(new Color(245,72,51) /加血位置与指血的颜色4比较 |robot.getPixelColor(x2,y2).equals(new Color(255,183,174) /加血位置与指血的颜色5比较 |robot.getPixelColor(x2,y2).equals(new Color(228,91,75) /加血位置与指血的颜色6比较 |robot.getPixelColor(x2,y2).equals(new Color(248,73,52) /加血位置与指血的颜色7比较 |robot.getPixelColor(x2,y2).equals(new Color(225,195,188) /加血位置与指血的颜色8比较 |robot.getPixelColor(x2,y2).equals(new Color(235,141,130) /加血位置与指血的颜色9比较 |robot.getPixelColor(x2,y2).equals(new Color(235,69,49) /加血位置与指血的颜色10比较 |robot.getPixelColor(x2,y2).equals(new Color(239,154,144) /加血位置与指血的颜色11比较 */ ) ViewFlow.setText1("不需加血"); else if( robot.getPixelColor(x,y).equals(new Color(255,75,53)/加血 &&!robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) ) robot.keyPress(KeyEvent.VK_F8);/加血的键位 /ViewFlow.setText1("自动加血开始"); catch(AWTException eException1) package game;import javax.swing.*;import java.awt.*;import java.awt.event.*;import javax.swing.event.*;import java.lang.*;import java.io.*;class MyActionListener2 implements ActionListener/核心类(实现主要功能) static int ip=0; public void actionPerformed(ActionEvent e2) try Robot robot=new Robot(); int x=73,y=23, x2=ViewFlow.slider1.getValue(), y2=23, x3=228,y3=26, x4=0,y4=0;/*int i=ViewFlow.slider1.getValue(),j=23,k=0; try Robot rb=new Robot(); while(k<1) rb.mouseMove(i,j); rb.getPixelColor(i,j); System.out.print(k+)+": "+rb.getPixelColor(i,j)+": "); System.out.println("(i="+(i+)+",j="+j+");"); catch(AWTException e3) */ if(robot.getPixelColor(x,y).equals(new Color(255,75,53)&&MyActionListener2.ip=1)/自动打怪 robot.keyPress(KeyEvent.VK_5);/捡东西 if( robot.getPixelColor(x3,y3).equals(new Color(255,107,87) |robot.getPixelColor(x3,y3).equals(new Color(255,107,86) robot.keyPress(KeyEvent.VK_1);/技能1 /robot.keyPress(KeyEvent.VK_2);/技能2 /robot.keyPress(KeyEvent.VK_3);/技能3 /robot.keyPress(KeyEvent.VK_4);/打怪1 else robot.keyPress(KeyEvent.VK_TAB); robot.keyRelease(KeyEvent.VK_TAB); /System.out.println(MyActionListener.myTimer.getDelay();/改变加血速度测试 if(!robot.getPixelColor(x,y).equals(new Color(255,75,53) ViewFlow.setText1("提示:请启动游戏"); /System.out.println(ViewFlow.slider1.getValue();/测试1 /System.out.println(ViewFlow.slider2.getValue();/测试2 else if( robot.getPixelColor(x2,y2).equals(new Color(255,75,53) /加血位置与血的颜色相等 |robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) /加血位置与指定的理想的血的位置的颜色相等 /* |robot.getPixelColor(x2,y2).equals(new Color(255,159,147) /加血位置与指血的颜色1比较 |robot.getPixelColor(x2,y2).equals(new Color(247,193,186) /加血位置与指血的颜色2比较 |robot.getPixelColor(x2,y2).equals(new Color(228,103,88) /加血位置与指血的颜色3比较 |robot.getPixelColor(x2,y2).equals(new Color(245,72,51) /加血位置与指血的颜色4比较 |robot.getPixelColor(x2,y2).equals(new Color(255,183,174) /加血位置与指血的颜色5比较 |robot.getPixelColor(x2,y2).equals(new Color(228,91,75) /加血位置与指血的颜色6比较 |robot.getPixelColor(x2,y2).equals(new Color(248,73,52) /加血位置与指血的颜色7比较 |robot.getPixelColor(x2,y2).equals(new Color(225,195,188) /加血位置与指血的颜色8比较 |robot.getPixelColor(x2,y2).equals(new Color(235,141,130) /加血位置与指血的颜色9比较 |robot.getPixelColor(x2,y2).equals(new Color(235,69,49) /加血位置与指血的颜色10比较 |robot.getPixelColor(x2,y2).equals(new Color(239,154,144) /加血位置与指血的颜色11比较 */ ) ViewFlow.setText1("不需加血"); else if( robot.getPixelColor(x,y).equals(new Color(255,75,53)/加血 &&!robot.getPixelColor(x,y).equals(robot.getPixelColor(x2,y2) ) robot.keyPress(KeyEvent.VK_F8);/加血的键位 /ViewFlow.setText1("自动加血开始"); catch(AWTException eException1) Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; class MyActionListener3 implements ActionListener public void actionPerformed(ActionEvent e3) MyActionListener.myTimer.stop(); ViewFlow.setText1(" 外挂程序已停止"); Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; class MyActionListener3 implements ActionListener public void actionPerformed(ActionEvent e3) MyActionListener.myTimer.stop(); ViewFlow.setText1(" 外挂程序已停止"); package game;import javax.swing.*;import java.awt.*;import java.awt.event.*;import javax.swing.event.*;import java.lang.*;import java.io.*;class MyActionListener3 implements ActionListener public void actionPerformed(ActionEvent e3) MyActionListener.myTimer.stop(); ViewFlow.setText1(" 外挂程序已停止"); Java代码 package game; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.event.*; import java.lang.*; import java.io.*; class MyActionListener4 implements ActionListener public void actionPerformed(ActionEvent e7) if(e7.getSource()=ViewFlow.helpMenuItem1)/打开使用帮助网页 try Runtime.getRuntime().exec(""C:Program FilesInternet Exploreriexplore.exe" catch(IOException eIO) else if(e7.getSource()=ViewFlow.helpMenuItem2)/打开在线更新网页 try Runtime.getRuntime().exec(""C:Program FilesInternet Exploreriexplore.exe" catch(IOException eIO)