Jump to content

How to create a walkingevent?


fre024

Recommended Posts

Hello all,

 

i am trying to change the 

setMinDistanceThreshold

 

but it keeps giving me errors, no matter what i try sad.png

 

STATUS: SOLVED

i use another method more accurate to the last tile.

 

Event.WalkingEvent(AREA.getRandomPosition(0)).setMinDistanceTreshold(0);
map.walk(AREA);

 

 

 

Edited by fre024
Link to comment
Share on other sites

and how do i make it walk to that exact position?

it always stops 2 tiles from the position it needs to be

can i use:

 

Are you sure it steps 2 tiles from that position? RandomPosition will just return any coordinate in that area, so unless your debugging the coordinate I don't see how you would know?

 

If you are debugging it and it still steps 2 steps before, then it's a bug with the walking class in OSBot 2, remember it's not a final release so there are bound to be imperfections.

Link to comment
Share on other sites

Are you sure it steps 2 tiles from that position? RandomPosition will just return any coordinate in that area, so unless your debugging the coordinate I don't see how you would know?

 

If you are debugging it and it still steps 2 steps before, then it's a bug with the walking class in OSBot 2, remember it's not a final release so there are bound to be imperfections.

 

No it's not a bug, it's just that the script stops within the threshold difference... there's no walkExact method anymore, for whatever reason.

 

I use an area that is 1 tile.

I also tried walking to the specified position with the same result, 2 tiles away from endposition.

Default setMinDistanceTreshold is set to 2 for every walking procedure right?

I want to set this to 0.

 

I contact a developer and see if I can convince them to readd the walkExact method into the OSBot 2 API.

 

For now though, when I needed it to walk exactly, I use localWalker to get near enough then I do the following:

Position position = new Position(x, y, z);
position.interact(bot, "Walk here");

It'll click on the tile on screen, with camera rotation if necessary. This will ensure that you walk to the desired location exactly.

Link to comment
Share on other sites

No it's not a bug, it's just that the script stops within the threshold difference... there's no walkExact method anymore, for whatever reason.

 

 

I contact a developer and see if I can convince them to readd the walkExact method into the OSBot 2 API.

 

For now though, when I needed it to walk exactly, I use localWalker to get near enough then I do the following:

Position position = new Position(x, y, z);
position.interact(bot, "Walk here");

It'll click on the tile on screen, with camera rotation if necessary. This will ensure that you walk to the desired location exactly.

 

you can also write your own, I found local walker to be too buggy.

    public boolean walkMinimap(Position p) {
            MouseDestination mouseDestination = new MiniMapTileDestination(bot,p);
            if (mouseDestination != null) {
                return mouse.click(mouseDestination);
            }
        return false;
    }

usage:

if (walkMinimap(new Position(3022,3022,0) {
//blah
}
Edited by Th3
Link to comment
Share on other sites

 

you can also write your own, I found local walker to be too buggy.

    public boolean walkMinimap(Position p) {
            MouseDestination mouseDestination = new MiniMapTileDestination(bot,p);
            if (mouseDestination != null) {
                return mouse.click(mouseDestination);
            }
        return false;
    }

usage:

if (walkMinimap(new Position(3022,3022,0) {
//blah
}

 

The local walker has always been fine for me... idk

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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