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);
- } else if (experiment == null) {
- walkRandom();
- }
- }
- private void attackExperiment(NPC experiment) throws InterruptedException {
- if (experiment.isVisible()) {
- if (!this.player.isAnimating()) {
- vars.status = "Attacking experiment";
- experiment.interact("Attack");
- this.script.sleep(MethodProvider.random(6000, 8000));
- }
- } else if (!experiment.isVisible()) {
- this.script.client.moveCameraToEntity(experiment);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment