Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void attack() throws InterruptedException {
- Player player = this.script.client.getMyPlayer();
- List ExpList = this.script
- .closestAttackableNPCListForName(new String[] { "Experiment" });
- NPC experiment = getclosestExperiment(ExpList);
- if (experiment != null) {
- attackExperiment(experiment);
- }
- }
- private void attackExperiment(NPC experiment) throws InterruptedException {
- if (experiment.isVisible()) {
- if ((!this.player.isAnimating()) && (!this.player.isMoving())) {
- vars.status = "Attacking experiment";
- experiment.interact("Attack");
- this.script.sleep(MethodProvider.random(2000, 3500));
- }
- } else {
- this.script.client.moveCameraToEntity(experiment);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment