Jump to content

How do I walk one tile over?

Recommended Posts

What I want to do is get the current position of the player, and then walk one 'x' tile over:


int x = myPlayer().getPosition().getX() + 1;

int y = myPlayer().getPosition().getY();

int z = myPlayer().getPosition().getZ();

WalkingEvent newPosition = new WalkingEvent(new Position(x, y, z);



AND, it doesn't work... It's as if it skips over this line of code

Link to comment
Share on other sites

13 minutes ago, Chris said:

getwalking.walk(myPosition().translate(0, 2,));


public Position translate(int x,
                          int y)
Creates a cloned instance of this position with the given translation.
x - The x value to translate.
y - The y value to translate.
The new position object.


I just tried it and the bot still does nothing...

[So I'm trying to get the bot to move a tile over if it can't light a fire on a plant or another fire. I've already incorporated a message listener for "You can't light...". The message listener works fine and the method gets executed but it doesn't walk to the next 'x' tile.]

Edited by Noidlox
Link to comment
Share on other sites

2 hours ago, Polymorphism said:



new Position(1 tile over).interact("Walk here")


 MiniMapTileDestination(Bot bot, Position position, boolean exactPosition) 

That did the trick!

Tysm dude :)

3 hours ago, Chris said:

try creating a walk event and setting the minthreshold to 0

I'll try this for fun when I get time. TY

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.

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