Jump to content

Random pathwalking?


c0nan

Recommended Posts

private Position[] path = {
            new Position(3254, 3421, 0), new Position(3256, 3428, 0), new Position(3264, 3428, 0),
            new Position(3273, 3428, 0), new Position(3277, 3426, 0), new Position(3281, 3422, 0)
    };


localWalker.walkPath(path);

That is Alek's example in the tutorial section for walking along a path.

 

If I use that method it will click the exact same spots over and over when walking right?

Is it possible to use walkPath(path) but make it click somewhere near the paths?(Antiban)

 

I have been using webWalking to areas but it seems creating own paths is better in some cases.

 

BR c0nan

Link to comment
Share on other sites

private Position[] path = {
            new Position(3254, 3421, 0), new Position(3256, 3428, 0), new Position(3264, 3428, 0),
            new Position(3273, 3428, 0), new Position(3277, 3426, 0), new Position(3281, 3422, 0)
    };


localWalker.walkPath(path);

That is Alek's example in the tutorial section for walking along a path.

 

If I use that method it will click the exact same spots over and over when walking right?

Is it possible to use walkPath(path) but make it click somewhere near the paths?(Antiban)

 

I have been using webWalking to areas but it seems creating own paths is better in some cases.

 

BR c0nan

 

private static List<Position> path = Arrays.asList(new Position(3254 + random(-2, 1), 3421, 0),
new Position(3256 + random(-2, 1), 3428, 0), new Position(3264 + random(-2, 1), 3428, 0),
new Position(3273 + random(-2, 1), 3428, 0), new Position(3277 + random(-2, 1), 3426, 0),
new Position(3281 + random(-2, 1), 3422, 0));

Usage:

getWalking().walkPath(path);
Edited by progamerz
  • Like 1
Link to comment
Share on other sites

private static List<Position> path = Arrays.asList(new Position(3254 + random(-2, 1), 3421, 0),
new Position(3256 + random(-2, 1), 3428, 0), new Position(3264 + random(-2, 1), 3428, 0),
new Position(3273 + random(-2, 1), 3428, 0), new Position(3277 + random(-2, 1), 3426, 0),
new Position(3281 + random(-2, 1), 3422, 0));

Usage:

getWalking().walkPath(path);

 

Thanks for the example code! 

I think I will go with this solution (also stated in previous answers)

 

Thanks for all answers & your time! smile.png

 

BR c0nan

 

 

  • Like 1
Link to comment
Share on other sites

use area's to walk to, the spot on which it will click will always be random then

 

That is one solution however for walking a short distance (2 clicks on the map) using a random "Path position" is (imo) more suitable. This is of course not the case if the player could access the "Area" in one click on the map. smile.png

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