Use AOE from client to determine server's AOE flag

master
sigonasr2 2 years ago
parent 3134c176e5
commit fb07e64410
  1. 18
      sig/App.java

@ -67,10 +67,13 @@ class Client {
case GlobalKeyEvent.VK_NUMPAD1: case GlobalKeyEvent.VK_NUMPAD1:
case GlobalKeyEvent.VK_1: case GlobalKeyEvent.VK_1:
case GlobalKeyEvent.VK_2: case GlobalKeyEvent.VK_2:
case GlobalKeyEvent.VK_3: case GlobalKeyEvent.VK_3:{
case GlobalKeyEvent.VK_Z:{
out.writeUTF("FIGHT"); out.writeUTF("FIGHT");
}break; }break;
case GlobalKeyEvent.VK_Z:
case GlobalKeyEvent.VK_X:{
out.writeUTF("FIGHTAOE");
}break;
case GlobalKeyEvent.VK_NUMPAD3: case GlobalKeyEvent.VK_NUMPAD3:
case 110: case 110:
case GlobalKeyEvent.VK_DELETE: case GlobalKeyEvent.VK_DELETE:
@ -168,6 +171,7 @@ class Server
private DataInputStream in = null; private DataInputStream in = null;
Robot r; Robot r;
boolean fighting=false; boolean fighting=false;
boolean fightingaoe=false;
private void PressKeyWithModifier(int modifier,int keycode) { private void PressKeyWithModifier(int modifier,int keycode) {
r.keyPress(modifier); r.keyPress(modifier);
@ -227,9 +231,10 @@ class Server
return 0; return 0;
} }
boolean MultipleTargets(){ boolean MultipleTargets(){
BufferedImage img=r.createScreenCapture(new Rectangle(75, 628, 1, 1)); return fightingaoe;
/*BufferedImage img=r.createScreenCapture(new Rectangle(75, 628, 1, 1));
Color c=new Color(img.getRGB(0,0)); Color c=new Color(img.getRGB(0,0));
return (c.getRed()==120&&c.getRed()==118&&c.getBlue()==120)||(c.getRed()==140&&c.getRed()==138&&c.getBlue()==140); return (c.getRed()==120&&c.getRed()==118&&c.getBlue()==120)||(c.getRed()==140&&c.getRed()==138&&c.getBlue()==140);*/
} }
@ -328,6 +333,11 @@ class Server
}break; }break;
case "FIGHT":{ case "FIGHT":{
fighting=true; fighting=true;
fightingaoe=false;
System.out.println("Fight mode: "+fighting);
}break;
case "FIGHTAOE":{
fighting=fightingaoe=true;
System.out.println("Fight mode: "+fighting); System.out.println("Fight mode: "+fighting);
}break; }break;
case "CHILL":{ case "CHILL":{

Loading…
Cancel
Save