blahs44

Untitled

Oct 9th, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.77 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.         } else if (experiment == null) {
  11.             walkRandom();
  12.  
  13.         }
  14.  
  15.     }
  16.  
  17. private void attackExperiment(NPC experiment) throws InterruptedException {
  18.         if (experiment.isVisible()) {
  19.             if (!this.player.isAnimating()) {
  20.                 vars.status = "Attacking experiment";
  21.                 experiment.interact("Attack");
  22.                 this.script.sleep(MethodProvider.random(6000, 8000));
  23.             }
  24.         } else if (!experiment.isVisible()) {
  25.             this.script.client.moveCameraToEntity(experiment);
  26.         }
  27.     }
Advertisement
Add Comment
Please, Sign In to add comment