Advertisement
illpastethat

ExperimentKiller

Mar 12th, 2012
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.25 KB | None | 0 0
  1. import com.rarebot.script.Script;
  2. import com.rarebot.script.ScriptManifest;
  3. import com.rarebot.script.wrappers.RSNPC;
  4. @ScriptManifest(
  5.         authors = {"Phatninja55"}, version = 1.00, keywords = ("Fighter, Experiment, Kill"), description = "Kills Experiments", name = "ExperimentKiller") 
  6. public class ExperimentKiller extends Script {
  7.     public boolean onStart() {
  8.         mouse.setSpeed(6);
  9.         log("Thanks for choosing ExperimentKiller By: Phatninja55");
  10.     return true; }
  11.         @Override
  12.     public int loop() {
  13.           if(getMyPlayer().getAnimation() == -1) {
  14.                Attack(); }
  15.               return random(300, 500); }
  16.         private void Attack() {
  17.                  RSNPC AllNPCS[] = npcs.getAll(1678, 1677);
  18.               RSNPC ClosestNPC = null;
  19.               int ClosestNPCDistance = -1;
  20.               for (RSNPC CurrentNpc : AllNPCS) {
  21.                   if (((calc.distanceTo(CurrentNpc) < ClosestNPCDistance) || ClosestNPCDistance == -1)) {
  22.                       ClosestNPC = CurrentNpc; }  }
  23.                     if (ClosestNPC != null) {
  24.              if (ClosestNPC.isOnScreen() && (ClosestNPC.getInteracting() == null)) {
  25.                 ClosestNPC.interact("Attack ");
  26.                    sleep(900, 1200);   }
  27.              else if (!ClosestNPC.isOnScreen()) {
  28.                     camera.turnTo(ClosestNPC);
  29.                      walking.walkTileMM(ClosestNPC.getLocation()); } } } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement