Global Pathfinding
Really getting around...
Pathfinding
Walking
Usage
private Pathfinder pathfinder;
@Override
public void onStart(String... args) {
pathfinder = Pathfinder.create(this);
}
@Override
public void onLoop() {
Coordinate destination = /* your destination */;
Path path;
if (pathfinder.getLastPath() != null && pathfinder.getLastPath().isValid()) {
path = pathfinder.getLastPath();
} else {
path = pathfinder.pathBuilder()
.preferAccuracy()
.enableMinigameTeleports(false)
.poh(POH.builder()
.mountedGlory(true)
.mountedXericsTalisman(true)
.jewelleryBoxTier(JewelleryBox.Tier.ORNATE)
.nexusPortal(Portal.BARROWS)
.build())
.destination(destination)
.findPath();
}
if (path != null) {
path.step();
}
}Contributing
Last updated