Search in sources :

Example 1 with MapOffset

use of org.powerbot.bot.rt6.client.MapOffset in project powerbot by powerbot.

the class Game method mapOffset.

/**
 * Determines the base of the loaded region.
 *
 * @return the {@link Tile} of the base
 */
public Tile mapOffset() {
    final Client client = ctx.client();
    if (client == null) {
        return Tile.NIL;
    }
    final MapOffset b = client.getWorld().getMapOffset();
    if (b.isNull()) {
        return Tile.NIL;
    }
    return new Tile(b.getX(), b.getY(), client.getFloor());
}
Also used : MapOffset(org.powerbot.bot.rt6.client.MapOffset) Tile(org.powerbot.script.Tile) Client(org.powerbot.bot.rt6.client.Client)

Aggregations

Client (org.powerbot.bot.rt6.client.Client)1 MapOffset (org.powerbot.bot.rt6.client.MapOffset)1 Tile (org.powerbot.script.Tile)1