Jump to content

How to walk in a (nightmare) instance?


MoistScripts

Recommended Posts

Hey I was wondering if anyone could show me an example of how they walk in instances as I currently can not really figure it out myself. Currently I'm using the following code to walk, and the result is that it will just click far in the distance.

I have also tried the getWalking.Walk() function but that didn't do aanything

This is run when in a nightmare instance, I want to try to find a tile with no effects on them so I can stand there.

 List<Position> handPortals = this.graphicObjects
                            .getAll()
                            .stream()
                            .filter(c -> c.getId() == 1767)
                            .map(c -> c.getPosition())
                            .collect(Collectors.toList());
List<Position> playerArea = myPlayer().getArea(10).getPositions();
Position posToWalkTo = playerArea.stream().filter(c -> !handPortals.contains(c) && !playerArea.contains(nightmare)).findFirst().get();

posToWalkTo.interact(this.bot, "Walk here");

In another post frostbug says

Quote

I would recommend working with Local Positions (found by getLocalPosition methods). This is the position relative to the current map base. When time comes to walk to a position, translate your desired local position to an absolute position by adding the map base position to it (Map#getBaseX/Y).

But I couldn't find the getLocalPosition method, is this not used anymore in the current version of the OsBot API? And is there any other method I could use?

Thanks in advance for reading this.

Link to comment
Share on other sites

8 minutes ago, skillerkidos1 said:

 

1 hour ago, MoistScripts said:

I have also tried the getWalking.Walk() function but that didn't do aanything

Same goes for the walkingevent. Is this supposed to be working in instances?

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...