yolkbot
    Preparing search index...

    Class Player

    A Player in a Game

    Index

    Accessors

    • get pitch(): number

      An alias to a Player's view.pitch

      Returns number

    • get x(): number

      An alias to a Player's position.x

      Returns number

    • get y(): number

      An alias to a Player's position.y

      Returns number

    • get yaw(): number

      An alias to a Player's view.yaw

      Returns number

    • get z(): number

      An alias to a Player's position.z

      Returns number

    Constructors

    Methods

    • Updates the inKotcZone property on the player when the zone changes

      Parameters

      Returns void

    Properties

    activeGun: number

    The active gun (0 = primary, 1 = secondary) the player is using ingame

    admin?: { dbId: string; ip: string }

    The admin information, viewable if the Bot is an admin or something

    Type Declaration

    • dbId: string

      The player's "DB ID"; this is only accessible to admins so the exact ID is up for speculation

    • ip: string

      The player's IP

    character: PlayerCharacter

    The player's currently equipped skin data

    climbing: boolean

    Whether the player is climbing

    grenades: number

    The number of grenades the player has

    hp: number

    The health of the player

    hpShield: number

    The shield health of the player (involves the shield effect)

    id: number

    The player's ingame ID, does not persist between games

    inKotcZone: boolean = false

    Whether the player is in a KoTC zone

    isVip: boolean

    Whether the player is a VIP

    jumping: boolean

    Whether the player is jumping

    name: string

    The player's ingame name

    playing: boolean

    Whether the player is actively spawned in and playing

    position: Position

    The player's physical position ingame

    randomSeed: number

    The random seed the player's aim will use on the next shot

    safeName: string

    The "safe" name sent by the server, if the user has hid player names or if the name is filtered

    scale: number

    The player's scale (involves the Mini Egg powerup)

    scoping: boolean

    Whether the player is scoping

    selectedGun: GunIds

    The selected gun (eggk, scrambler, etc) the player is using as their primary

    shellStreaks: ShellStreak[]

    the player's shellstreaks/powerups

    showBadge: boolean

    Whether the player has opted to show their badge (either VIP or social)

    socials: {
        active?: boolean;
        id: SocialMedia;
        type:
            | "Facebook"
            | "Instagram"
            | "Tiktok"
            | "Discord"
            | "Youtube"
            | "Twitter"
            | "Twitch";
        url: string;
    }[]

    The player's social media platforms as displayed ingame

    Type Declaration

    • Optionalactive?: boolean

      Whether the social media is "active" (shown ingame)

    • id: SocialMedia

      The social media "ID"

    • type:
          | "Facebook"
          | "Instagram"
          | "Tiktok"
          | "Discord"
          | "Youtube"
          | "Twitter"
          | "Twitch"

      The social media "type"

    • url: string

      The social media URL

    spawnShield: number

    The "spawn shield" ticks (0 = no spawn shield)

    stats: { bestStreak: number; totalDeaths: number; totalKills: number }

    The player's stats for the specific game

    Type Declaration

    • bestStreak: number

      The best streak the player has gotten in that specific game

    • totalDeaths: number

      The total number of times the player has died in that specific game

    • totalKills: number

      The total number of kills the player has gotten in that specific game

    streak: number

    The player's killstreak

    team: Team

    The team the player is on

    uniqueId: string

    The unique ID associated with the player's account, the first 10 or so characters persist between games and the last 4 are random (iirc)

    The direction the player is looking ingame (yaw/pitch)

    weapons: PlayerGun[]

    The primary and secondary weapons in an array the player is using