TL2List = class(TList)

Parent class for all lists in adrik. Inherited from the standard class TList

Name Result Description Code Params Examples
ByID Boolean Search for an object in the list by ID. If the object is found, it is placed in the Obj variable.
function ByID(ID: Cardinal; var Obj): Boolean;

ID - object identifier
var Obj - object

if NpcList.ByID(12419, tmp_npc) then  // if NPC by ID = 12419 is found, then...
ByOID Boolean Search for an object in the list by ID. If the object is found, it is placed in the Obj variable.
function ByOID(OID: Cardinal; var Obj): Boolean;

OID - unique object identifier
var Obj - object

if NpcList.ByOID(145197, tmp_npc) then  // if NPC by OID = 145197 is found, then...
ByName Boolean Search for an object in the list by name. If the object is found, it is placed in the Obj variable.
function ByName(const Name: string; var Obj): Boolean;

const Name - object name
var Obj - object

if CharList.ByName('xXxNAGIBATORxXx', tmp_char) and (User.DistTo(tmp_char) < 1000) then .. // if a character with the specified nickname is found and the distance < 1000, then..
Count Integer Number of objects in the list
function Count: Integer;
There are no arguments
for i:= 0 to DropList.Count-1 do ...
Items TL2Object Allows to access the object in the list by index
function Items(Index: integer): TL2Object;

Index - serial number, starting with 0

for i:= 0 to SkillList.Count-1 do Print(SkillList.Items(i).Name);   // prints list of skills

Objects

Name Class Description
Auction TL2List из TL2AucItem List of auction items
SpawnList TL2List из TL2Spawn List of objects who have coordinates
NpcList TL2List из TL2Npc List of all visible NPCs
PetList TL2List из TL2Pet List of all pets
CharList TL2List из TL2Char List of players
DropList TL2List из TL2Drop List of landed items
SkillList TL2List из TL2Skill List of all skills availabe to our char
ItemList TL2List из TL2Item List of all items availabe to our char
WareHouse TL2List из TL2Item List of items in our warehouse
LearnList TL2List из TLearnItem List of skills available to learning
LearnList2 TL2List из TLearnItem List of skills available to learining from NPC

Methods

Name Result Description
TL2Control.GetCharList TCharList Gets player list from another account
TInventory.Pet TItemList Pet inventory
TInventory.User TItemList Our char inventory
TL2Control.GetDropList TDropList Gets drop list from another account
TInventory.Quest TItemList Our quest inventory
TL2Control.GetNpcList TNpcList Gets NPC list from another account
TL2Control.GetPetList TPetList Gets pet list from another account
TL2Control.GetSkillList TSkillList Gets skill list from another account
TL2Live.Buffs TBuffList Object buff list (available for our char, pet and party member)
TL2Live.Abnormals TBuffList List of abnormal states (for GOD+ chronicles)