TL2Live = class(TL2Spawn)

Class describing alive objects (chars/npcs/pets etc.)

Name Result Description Code Params Examples
HP Cardinal Current HP percentage
function HP: Cardinal;
There are no arguments
if (User.HP < 80) then Engine.UseItem('Greater Healing Potion');  //if HP less than 80 percent, use healing potion
CurHP Cardinal Accurate HP amount
function  CurHP: Cardinal;
There are no arguments
while delay(1000) do Print(User.Target.Name +': '+ IntToStr(User.Target.CurHP) +' HP');   // prints target HP every second
MaxHP Cardinal Maximum HP amount
function MaxHP: Cardinal;
There are no arguments
if (User.Target.MaxHP > 99999999999) then Engine.CancelTarget;   // if max target HP amount too large, cancel the target
MP Cardinal Current MP percentage
function MP: Cardinal;
There are no arguments
if (User.HP < 80) then Engine.UseItem('Mana Potion');  //if MP less than 80 percent, use mana potion
CurMP Cardinal Accurate MP amount
function CurMP: Cardinal;
There are no arguments
while delay(1000) do Print(User.Target.Name +': '+ IntToStr(User.Target.CurMP) +' MP');   // prints target MP every second
MaxMP Cardinal Maximum MP amount
function MaxMP: Cardinal;
There are no arguments
if (User.Target.MaxMP > 99999999999) then Engine.CancelTarget;   // if max target MP amount too large, cancel the target
Exp Int64 Experience (numerical value)
function Exp: Int64;
There are no arguments
// тут будет пример
Exp2 Int64 Experience (percentage)
function Exp2: Int64;
There are no arguments
// тут будет пример
SP Cardinal SP points
function SP: Cardinal;
There are no arguments
if (User.SP > 100) then Engine.LearnSkill(142);   // if we have enough SP, then learning skill
PK Boolean Returns true if object a player killer
function PK: Boolean;
There are no arguments
// тут будет пример
PvP Boolean Returns true if object in pvp state
function PvP: Boolean;
There are no arguments
// тут будет пример
Karma Integer Karma value (Starting with GoD can be either negative - PK or positive - reputation)
function Karma: Integer;
There are no arguments Examples not found
Load Cardinal Backpack load percentage (available for char or pet)
function Load: Cardinal;
There are no arguments
// тут будет пример
Level Byte Object level
function Level: Byte;
There are no arguments
if (User.Level < 6) then // if our char level lower than 6, then
Title String Object title
function Title: string;
There are no arguments
// тут будет пример
Speed Double Movement speed
function Speed: Double;
There are no arguments
if (User.Target.Speed > User.Speed) then Print('Our target faster than us');
Running Boolean Object movement mode (run/walk)
function Running: Boolean;
There are no arguments
// тут будет пример
Sitting Boolean Object standby mode (sit/stand)
function Sitting: Boolean;
There are no arguments
// тут будет пример
Fishing Integer Returns true if object fishing
function Fishing: Integer;
There are no arguments
// тут будет пример
Fly Boolean Returns true if object flying
function Fly: Boolean;
There are no arguments
// тут будет пример
Dead Boolean Returns true if object dead
function Dead: boolean;
There are no arguments
// тут будет пример
  • Examples found for this method:
Dropped Boolean Returns true if object dropped smth (Dead should be true)
function Dropped: Boolean;
There are no arguments
// тут будет пример
Sweepable Boolean Returns true if object sweepable (Dead should be true)
function Sweepable: Boolean;
There are no arguments
if (mob.dead and mob.sweepable) then engine.useskill(42);
  • Examples found for this method:
Clan String Object clan name
function Clan: string;
There are no arguments
// тут будет пример
ClanID Cardinal Object clan ID
function ClanID: Cardinal;
There are no arguments
// тут будет пример
Ally String Object ally name
function Ally: string;
There are no arguments
// тут будет пример
AllyID Cardinal Object ally ID
function AllyID: Cardinal;
There are no arguments
// тут будет пример
Attackable Boolean Returns true if object available to attack (w/o ctrl)
function Attackable: Boolean;
There are no arguments
// тут будет пример
AtkOID Cardinal Уникальный идентификатор объекта который атакует
function AtkOID: Cardinal;
There are no arguments
// тут будет пример
AtkTime Cardinal Время, которое объект атакуется
function AtkTime: Cardinal;
There are no arguments
// тут будет пример
MyAtkTime Cardinal Время, которое объект атакуется пользователем
function MyAtkTime: Cardinal;
There are no arguments
// тут будет пример
InCombat Boolean Returns true if object in combat state
function InCombat: Boolean;
There are no arguments
while (User.InCombat) do Delay(500);   // while we are in combat, we wait for 0.5 sec
Buffs TBuffList Object buff list (available for our char, pet and party member)
function Buffs: TBuffList;
There are no arguments
for i:= 0 to User.Buffs.Count-1 do Print(User.Buffs.Items(i).Name +' [ID: '+ User.Buffs.Items(i).ID +']');  // prints our buffs
  • Examples found for this method:
Cast TL2Cast Skill that object last used (or using right now, if Cast.EndTime > 0)
function Cast: TL2Cast;
There are no arguments
if (User.Target.Cast.Name = 'Backstab') then  // if our target using "Backstab", then ...
Target TL2Live Object target
function Target: TL2Live;
There are no arguments
if (User.Target.Target = User) then  // if we are the target of our target, then ...
IsMember Boolean Returns true if object is our party member
function IsMember: Boolean;
There are no arguments
// тут будет пример
Team Byte Returns true if mob has red or blue highlighting (for pvp servers with champion-mob)
function Team: Byte;
There are no arguments
if (NpcList(i).Team <> 0) then  // if mob is champion, then
  • Examples found for this method:
TeleportDist Cardinal Distance of the last teleport
function TeleportDist: Cardinal;
There are no arguments
if (User.TeleportDist > 1000) and (User.TeleportTime < 5000) then Print('We have been teleported');   //if we have been teleported to the distance > 1000 and that's was < 5 sec ago, then prints info
TeleportTime Cardinal Elapsed time since the last object teleportation (ms)
function TeleportTime: Cardinal;
There are no arguments
if (User.TeleportDist > 1000) and (User.TeleportTime < 5000) then Print('We have been teleported');   //if we have been teleported to the distance > 1000 and that's was < 5 sec ago, then prints info
AbnormalID Cardinal ID получившийся из наборов флагов
function AbnormalID: Cardinal;
There are no arguments
// тут будет пример
AbnormalID2 Cardinal Значение, соответствующее определенному набору эффектов
function AbnormalID2: Cardinal;
There are no arguments Examples not found
Abnormals TBuffList List of abnormal states (for GOD+ chronicles)
function Abnormals: TBuffList;
There are no arguments Examples not found
StartX Integer X coordinate of the object spawn point
property StartX: Integer;
There are no arguments Examples not found
StartY Integer Y coordinate of the object spawn point
property StartY: Integer;
There are no arguments Examples not found
StartZ Integer Z coordinate of the object spawn point
property StartZ: Integer;
There are no arguments Examples not found
ToX Integer X coordinate of the point where the object is moving
function ToX: Integer;
There are no arguments
Print('Our target is moving to point: ('+ IntToStr(User.Target.ToX) +', '+IntToStr(User.Target.ToY) +', '+ IntToStr(User.Target.ToZ) +')');
ToY Integer Y coordinate of the point where the object is moving
function ToY: Integer;
There are no arguments
Print('Our target is moving to point: ('+ IntToStr(User.Target.ToX) +', '+IntToStr(User.Target.ToY) +', '+ IntToStr(User.Target.ToZ) +')');
ToZ Integer Z coordinate of the point where the object is moving
function ToZ: Integer;
There are no arguments
Print('Our target is moving to point: ('+ IntToStr(User.Target.ToX) +', '+IntToStr(User.Target.ToY) +', '+ IntToStr(User.Target.ToZ) +')');
TitleColor Cardinal
function TitleColor: Cardinal;
There are no arguments Examples not found
NameColor Cardinal
function NameColor: Cardinal;
There are no arguments Examples not found
ShowName Boolean
property ShowName: Boolean;
There are no arguments Examples not found
Targetable Boolean Returns true if object can be targeted
property Targetable: Boolean;
There are no arguments Examples not found
Invisible Boolean
property Invisible: Boolean;
There are no arguments Examples not found
AtkSpd Cardinal Returns object attack speed
property AtkSpd: Cardinal;
There are no arguments Examples not found
CastSpd Cardinal Returns object cast speed
property CastSpd: Cardinal;
There are no arguments Examples not found

Methods

Name Result Description
TL2Live.Target TL2Live Object target