blahs44

Untitled

Oct 3rd, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1. private void attack() throws InterruptedException {
  2.         Player player = this.script.client.getMyPlayer();
  3.  
  4.         List ExpList = this.script
  5.                 .closestAttackableNPCListForName(new String[] { "Experiment" });
  6.         NPC experiment = getclosestExperiment(ExpList);
  7.  
  8.         if (experiment != null) {
  9.             attackExperiment(experiment);
  10.         }
  11.     }
  12.  
  13.     private void attackExperiment(NPC experiment) throws InterruptedException {
  14.         if (experiment.isVisible()) {
  15.             if ((!this.player.isAnimating()) && (!this.player.isMoving())) {
  16.                 vars.status = "Attacking experiment";
  17.                 experiment.interact("Attack");
  18.                 this.script.sleep(MethodProvider.random(2000, 3500));
  19.             }
  20.         } else {
  21.             this.script.client.moveCameraToEntity(experiment);
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment