Jump to content

Updating this code


Recommended Posts

Posted (edited)

Hey i wanna replace the client.movemouse and client.click()

As its currently showing errors any1 help?

 

private boolean walkTile(Position p) throws InterruptedException {
     client.movemouse(new MiniMapTileDestination(bot, p), false);
     sleep(random(150, 250));
     client.click();
     int failsafe = 0;
     while (failsafe < 10 && myPlayer().getPosition().distance(p) > 2) {
      sleep(200);
      failsafe++;
      if (myPlayer().isMoving())
       failsafe = 0;
     }
     if (failsafe == 10)
      return false;
     return true;
    }

 

 

 

Hope some1 will help me.

 

Thanks,

-Progamerz

Edited by progamerz
Posted

Use mouse.click() and mouse.move() instead, these are the new methods.

 

Thanks but now showing error here

 

private boolean walkTile(Position p) throws InterruptedException {

     mouse.move(new MiniMapTileDestination(bot, p), false);

     //(new MiniMapTileDestination(bot, p), false);

     sleep(random(150, 250));

     mouse.click();

     int failsafe = 0;

     while (failsafe < 10 && myPlayer().getPosition().distance(p) > 2) {

      sleep(200);

      failsafe++;

      if (myPlayer().isMoving())

       failsafe = 0;

     }

     if (failsafe == 10)

      return false;

     return true;

    }

Posted

Thanks but now showing error here

 

private boolean walkTile(Position p) throws InterruptedException {

     mouse.move(new MiniMapTileDestination(bot, p), false);

     //(new MiniMapTileDestination(bot, p), false);

     sleep(random(150, 250));

     mouse.click();

     int failsafe = 0;

     while (failsafe < 10 && myPlayer().getPosition().distance(p) > 2) {

      sleep(200);

      failsafe++;

      if (myPlayer().isMoving())

       failsafe = 0;

     }

     if (failsafe == 10)

      return false;

     return true;

    }

mouse.click(false)  or just mouse.click(new MiniMapTileDestination(bot, p))

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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