Jump to content

possible to not run?


efox

Recommended Posts

The walking in the api deviates by 1 or 2 tiles from the actual position you are trying to walk to, this is for antiban measures most likely. I know you can override the deviation amount, however I have never really needed to badly enough to actually find out how.

 

To get to an exact position for one of my scripts i used the walker to walk to that tile and if it didn't go to the exact position I needed I then just had the mouse hover the tile i needed and then applied a mouse click after the hover to walk to that exact tile.

 

Sorry for my poor description hahaha pretty tired right now but hope that helps a bit

Link to comment
Share on other sites

use a walkingevent

WalkingEvent walkingEvent = new WalkingEvent(position);
walkingEvent.setEnergyThreshold(50);
execute(walkingEvent);

this will start using run when it has 50% energy


or you can use a webwalkevent to simply disable run:

WebWalkEvent webWalkEvent = new WebWalkEvent(position);
webWalkEvent.disableRun();
execute(webWalkEvent);

not really sure if these are what you wanted but they could work for you

 

 

walkingevent: http://osbot.org/api/org/osbot/rs07/event/WalkingEvent.html

webwalkevent: http://osbot.org/api/org/osbot/rs07/event/WebWalkEvent.html

 

 

edit: as for walking to the exact tile , you can use do:

WalkingEvent walkingEvent = new WalkingEvent(position);
walkingEvent.setMinDistanceThreshold(0);
walkingEvent.setMiniMapDistanceThreshold(0);
execute(walkingEvent);

or

WebWalkEvent webWalkEvent = new WebWalkEvent(position);
webWalkEvent.setBreakCondition(new Condition() {

   @Override
   public boolean evaluate() {
    return position.contains(myPlayer());
  }
 });
execute(webWalkEvent);
Edited by Acerd
  • Like 2
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...