Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.rarebot.script.Script;
- import com.rarebot.script.ScriptManifest;
- import com.rarebot.script.wrappers.RSNPC;
- @ScriptManifest(
- authors = {"Phatninja55"}, version = 1.00, keywords = ("Fighter, Experiment, Kill"), description = "Kills Experiments", name = "ExperimentKiller")
- public class ExperimentKiller extends Script {
- public boolean onStart() {
- mouse.setSpeed(6);
- log("Thanks for choosing ExperimentKiller By: Phatninja55");
- return true; }
- @Override
- public int loop() {
- if(getMyPlayer().getAnimation() == -1) {
- Attack(); }
- return random(300, 500); }
- private void Attack() {
- RSNPC AllNPCS[] = npcs.getAll(1678, 1677);
- RSNPC ClosestNPC = null;
- int ClosestNPCDistance = -1;
- for (RSNPC CurrentNpc : AllNPCS) {
- if (((calc.distanceTo(CurrentNpc) < ClosestNPCDistance) || ClosestNPCDistance == -1)) {
- ClosestNPC = CurrentNpc; } }
- if (ClosestNPC != null) {
- if (ClosestNPC.isOnScreen() && (ClosestNPC.getInteracting() == null)) {
- ClosestNPC.interact("Attack ");
- sleep(900, 1200); }
- else if (!ClosestNPC.isOnScreen()) {
- camera.turnTo(ClosestNPC);
- walking.walkTileMM(ClosestNPC.getLocation()); } } } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement