Jump to content

possible to not run?


Recommended Posts

Posted

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

Posted (edited)

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

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