Hierarchy (view full)

Constructors

Properties

emit: any
Routes: {
    AVOID_PUBLIC: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    AVOID_PVP: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    FASTEST: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
    SAFEST: {
        avoidPublic: boolean;
        avoidPvp: boolean;
    };
} = Routes

Accessors

  • get lastLoc(): {
        x: number;
        z: number;
    }
  • Returns {
        x: number;
        z: number;
    }

    • x: number
    • z: number
  • set lastLoc(val): void
  • Parameters

    • val: {
          x: number;
          z: number;
      }
      • x: number
      • z: number

    Returns void

Methods

  • Parameters

    • loc: {
          x: string | number;
          y?: string | number;
          z: string | number;
      }
      • x: string | number
      • Optionaly?: string | number
      • z: string | number

    Returns Promise<RouteInfo>

  • Parameters

    • loc: {
          x: string | number;
          y?: string | number;
          z: string | number;
      }
      • x: string | number
      • Optionaly?: string | number
      • z: string | number
    • options: {
          avoidPublic: boolean;
          avoidPvp: boolean;
      }
      • avoidPublic: boolean
      • avoidPvp: boolean

    Returns Promise<RouteInfo>

  • Parameters

    • player: {
          name: string;
          nation?: string;
          nickname?: string;
          online: boolean;
          rank: string;
          town: string;
          underground?: boolean;
          world?: string;
          x?: string | number;
          y?: string | number;
          z?: string | number;
      }
      • name: string
      • Optionalnation?: string
      • Optionalnickname?: string
      • online: boolean
      • rank: string
      • town: string
      • Optionalunderground?: boolean
      • Optionalworld?: string
      • Optionalx?: string | number
      • Optionaly?: string | number
      • Optionalz?: string | number

    Returns boolean

  • Parameters

    • loc: {
          x: string | number;
          y?: string | number;
          z: string | number;
      }
      • x: string | number
      • Optionaly?: string | number
      • z: string | number

    Returns Promise<RouteInfo>

  • Parameters

    • playerName: string
    • interval: number = 3000
    • route: {
          avoidPublic: boolean;
          avoidPvp: boolean;
      } = Routes.FASTEST
      • avoidPublic: boolean
      • avoidPvp: boolean

    Returns Promise<GPS>

  • Determines the direction to the destination from the origin.

    Only one of the main four directions (N, S, W, E) can be returned, no intermediates.

    Parameters

    • origin: {
          x: string | number;
          y?: string | number;
          z: string | number;
      }

      The location where something is currently at.

      • x: string | number
      • Optionaly?: string | number
      • z: string | number
    • destination: {
          x: string | number;
          y?: string | number;
          z: string | number;
      }

      The location we wish to arrive at.

      • x: string | number
      • Optionaly?: string | number
      • z: string | number

    Returns
        | "north"
        | "east"
        | "south"
        | "west"