Java机械手未拾色

时间:2019-02-22 18:58:20

标签: awtrobot

我正在使用自制的derank.me API和一个僵尸网络哈哈编写一个自动CS:GO降级机器人。

无论如何,游戏中有两种不同的“接受”按钮。出现在通知上方的标准1和1。我曾碰到过麻烦,使它重新出现在后一个,因此它不会进入游戏。这是代码:

public void checkifgo(){
try{
 println("checking for go button");
 if(rob.getPixelColor((int)screenwidth-380,297).getGreen() > 140 && 
   rob.getPixelColor((int)screenwidth-380,297).getRed() < 140 && 
   rob.getPixelColor((int)screenwidth-380,297).getBlue() < 130){
       rob.mouseMove((int)screenwidth-380,297);
       Thread.sleep(100);
       rob.mousePress(InputEvent.BUTTON1_MASK);
       Thread.sleep(15);
       rob.mouseRelease(InputEvent.BUTTON1_MASK);
       ingame = true;
       Thread.sleep(100);
       logger.println("found the go button!!!!!" + minute() + " : " + second());
     } //we just ended a game OR we just started the launcher
     else{
       println("green: " + rob.getPixelColor((int)screenwidth-380,297).getGreen());
       println("Red:   " + rob.getPixelColor((int)screenwidth-380,297).getRed());
       println("Blue:  " + rob.getPixelColor((int)screenwidth-380,297).getBlue());
       logger.println("no go");
       logger.flush();
     }
     println("go!");
     checkifgo();
  }catch(Exception e){}
}

0 个答案:

没有答案