Jump to content

Useful ranging tactic


Recommended Posts

Posted (edited)

So this works well while safe spotting a group of NPC's as it will randomly sleep for a little while and then prepare to attack the next enemy, maximizing range experience.

 

 

Check if you are ranging the same target method: (Works only solo or multi-combat zones)

public boolean isSkeleton() {
        NPC Skeleton = npcs.closest(Skeletons, "Skeleton");

        if (Skeleton.isUnderAttack()) {
            return true;
        } else return false;
    }

You should be able to make a case alone to Target the NPC, if not:

case KILL:
                log("case KILL:");
                NPC Skeleton = npcs.closest(Skeletons, "Skeleton");
                NPC FarSkeleton = npcs.closest(FarSkeletons, "Skeleton");

                if (RangeSpot.contains(myPlayer())) {
                    if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) {
                        if (Skeleton.getAnimation() != 5491)
                        Skeleton.interact("Attack");
                    } else if (Skeleton == null) {
                        log("Attacking far Skeletons....");
                        FarSkeleton.interact("Attack");
                        localWalker.walk(RangeSpot, true);
                        sleep(random(1000,2000));
                        FarSkeleton.interact("Attack");
                    }
                } else if(!RangeSpot.contains(myPlayer())) {
                    SafeSpot.interact(bot,"Walk here");
                }

This is what we will be doing after attacking, random sleep/skill check and then wait until 1 HP.

case IDLE:
                log("case IDLE:");
                sleep(random(1000, 3500));
                int random = random(0, 10);
                log(random);

                while (myPlayer().isAnimating()) {
                    NPC Skele = npcs.closest(Skeletons, "Skeleton");

                        if (random < 2)
                            tabs.getSkills().hoverSkill(Skill.RANGED);
                        else if (random == 3)
                            tabs.getSkills().hoverSkill(Skill.RANGED);
                        else if (random == 4)
                            tabs.getSkills().hoverSkill(Skill.HITPOINTS);
                        else if (random == 5)
                        {
                            if (isSkeleton() == true)
                                camera.toEntity(Skele);
                        }
                        else if (random > 5) {
                            mouse.moveRandomly();
                            if (random == 6)
                                sleep(random(2000, 3000));
                            else if (random == 7)
                                sleep(random(3000, 4000));
                            else if (random == 8)
                                sleep(random(4000, 5000));
                            else if (random >= 9)
                                sleep(random(5000, 6000));
                        }

                    log("Attacking next Skeleton..");
                    NPC nextSkele = npcs.closest(Skeletons,"Skeleton");
                    if (isSkeleton() == false);
                    nextSkele.interact("Attack");
                }

                if (random % 3 == 0)
                    tabs.open(Tab.INVENTORY);

                mouse.moveRandomly();
                break;

If there are more efficient methods I would be glad to see them. smile.png

Edited by Acinate
  • Mald 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...