mirror of
https://github.com/2006-Scape/Parabot-317-API-Minified.git
synced 2026-07-05 16:49:42 +00:00
Fixing conflict
This commit is contained in:
@@ -11,6 +11,11 @@ import org.rev317.min.api.wrappers.TilePath;
|
||||
*/
|
||||
public class Walking {
|
||||
|
||||
/**
|
||||
* Walks from tile to tile
|
||||
* @param from
|
||||
* @param to
|
||||
*/
|
||||
public static void walkTo(Tile from, Tile to) {
|
||||
Loader.getClient().walkTo(0, 0, 0, 0, from.getRegionY(), 0, 0, to.getRegionY(), from.getRegionX(), true, to.getRegionX());
|
||||
}
|
||||
@@ -27,6 +32,23 @@ public class Walking {
|
||||
tilePath.traverse();
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets nearest reachable tile on minimap to given tile
|
||||
* @param tile
|
||||
* @return nearest reachable tile on minimap
|
||||
*/
|
||||
public static Tile getNearestTileTo(Tile tile) {
|
||||
Tile loc = Players.getMyPlayer().getLocation();
|
||||
for (int i = 0; i < 1000; ++i) {
|
||||
if (tile.distanceTo() < 16 && tile.isWalkable()) {
|
||||
return tile;
|
||||
}
|
||||
tile = new Tile((loc.getX() + tile.getX()) / 2,
|
||||
(loc.getY() + tile.getY()) / 2);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user