Jump to content

Updating this code


progamerz

Recommended Posts

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
Link to comment
Share on other sites

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;

    }

Link to comment
Share on other sites

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

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