Jump to content

Useful ranging tactic


Acinate

Recommended Posts

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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