Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • IContext

Index

Properties

Readonly BuffList

Readonly CreatureList

Readonly CurrentZone

CurrentZone: L2ZoneTypes

Readonly DropList

Readonly FollowChar

FollowChar: L2Character

Readonly Inventory

Readonly IsAttacking

IsAttacking: boolean

Readonly IsConnected

IsConnected: boolean

Readonly IsEnabled

IsEnabled: boolean

Returns true if character is controlled by L2Project.

Example

if (!IsEnabled) EnableBot();

Readonly IsFollowMaster

IsFollowMaster: boolean

Readonly IsFollowModeOn

IsFollowModeOn: boolean

Readonly IsInCombat

IsInCombat: boolean

Returns true if character is attacking controlled by L2Project.

NOTE: This does not return true if character is in game combat (attacking mob)!

Example

if (!IsInCombat) StartCombat();

Readonly IsInParty

IsInParty: boolean

Readonly IsPartyLeader

IsPartyLeader: boolean

Readonly IsSitting

IsSitting: boolean

Readonly MacroList

Readonly Me

Me: L2User

Readonly PartyList

Readonly PetList

Readonly SkillList

Readonly Target

Target: L2Creature

Readonly host

host: any

Example

let List = Context.host.type('System.Collections.Generic.List');
let DayOfWeek = Context.host.type('System.DayOfWeek');
let week = Context.host.newObj(List(DayOfWeek), 7);
week.Add(DayOfWeek.Sunday);
see

https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_ExtendedHostFunctions.htm

Methods

Alert

  • Alert(message: string): void

Attack

  • Attack(objectId: number): void

Confirm

  • Confirm(title: string, message: string): void

DisableBot

  • DisableBot(): void
  • Disable character control by L2Project, this makes L2Project NOT active for non-attack actions (buffs, heals, etc.).

    Example

    if (IsEnabled) DisableBot();
    

    Returns void

EnableBot

  • EnableBot(): void
  • Enable character control by L2Project, this makes L2Project active for non-attack actions (buffs, heals, etc.).

    Example

    if (!IsEnabled) EnableBot();
    

    Returns void

Prompt

  • Prompt(title: string, message: string, question: string): string
  • Parameters

    • title: string
    • message: string
    • question: string

    Returns string

RunCommand

  • RunCommand(command: string): void

Select

SetCombatRect

  • SetCombatRect(x1: number, y1: number, x2: number, y2: number): void
  • Parameters

    • x1: number
    • y1: number
    • x2: number
    • y2: number

    Returns void

SetWindowTitle

  • SetWindowTitle(title: string): void

ShowBaloonTip

  • ShowBaloonTip(title: string, message: string, timeout: number): void
  • Parameters

    • title: string
    • message: string
    • timeout: number

    Returns void

StartCombat

  • StartCombat(): void
  • Enable character control by L2Project, this makes L2Project active for attack actions (combat).

    Example

    if (!IsInCombat) StartCombat();
    

    Returns void

StopCombat

  • StopCombat(): void
  • Enable character control by L2Project, this makes L2Project active for attack actions (combat).

    Example

    if (IsInCombat) StopCombat();
    

    Returns void