Enumerated types

Name Values Description Code Values Examples
TL2Class lcError, lcDrop, lcNpc, lcPet, lcChar, lcUser, lcBuff, lcSkill, lcItem Type of ingame object (TL2Object.L2Class)
TL2Class = (lcError, lcDrop, lcNpc, lcPet, lcChar, lcUser, lcBuff, lcSkill, lcItem);

lcError - ошибка
lcDrop - дроп
lcNpc - NPC
lcPet - пет
lcChar - другие игроки
lcUser - наш персонаж
lcBuff - баф
lcSkill - скил
lcItem - предмет

if (User.Target = lcChar) then  // if we targeting player, then...
TL2Status lsOff, lsOffline, lsOnline Account status (Engine.Status)
TL2Status = (lsOff, lsOffline, lsOnline);

lsOff - отключен
lsOffline - вне игры
lsOnline - в игре

while (Engine.Status <> lsOnline) do delay(500);  // wait 0.5 sec while we arent online
TL2Race rtHuman, rtElf, rtDarkElf, rtOrc, rtDwarf, rtKamael, rtErthea, rtUnknown Char race (TL2Char.Race)
TL2Race = (rtHuman, rtElf, rtDarkElf, rtOrc, rtDwarf, rtKamael, rtErthea, rtUnknown);

rtHuman - Люди
rtElf - Эльфы
rtDarkElf - Темные Эльфы
rtOrc - Орки
rtDwarf - Гномы
rtKamael - Камаэль
rtErthea - Артеи
rtUnknown - неизвестно

if (User.Race = Integer(rtHuman)) then Print('I AM HUMAN!!!'); // if our race = humans, prints the message
TL2Action laSpawn, laDelete, laPetSpawn, laPetDelete, laInvite, laDie, laRevive, laTarget, laUnTarget, laInGame, laStatus, laBuffs, laSkills, laDlg, laConfirmDlg, laStop, laStartAttack, laStopAttack, laCast, laCancelCast, laTeleport, laAutoSoulShot, laNpcTrade, laSysMsg, laKey Ingame actions (OnAction or Engine.WaitAction)
TL2Actions = (laSpawn, laDelete, laPetSpawn, laPetDelete, laInvite, laDie, laRevive, laTarget, laUnTarget, laInGame, laStatus, laBuffs, laSkills, laDlg, laConfirmDlg, laStop, laStartAttack, laStopAttack, laCast, laCancelCast, laTeleport, laAutoSoulShot, laNpcTrade, laSysMsg, laKey);

laSpawn - respawn in the game world
laDelete - disappearance from the game world
laPetSpawn - pet respawn in the game world
laPetDelete - pet disappearance from the game world
laInvite - invitation to group
laDie - death
laRevive - revive
laTarget - set target
laUnTarget - cancel target
laInGame - in game world
laStatus - account status change
laBuffs - getting buff
laSkills - use skills
laDlg - set dialog
laConfirmDlg - confirmation of dialog
laStop - stop
laStartAttack - beginning of attack
laStopAttack - canceling of attack
laCast - beginning of cast
laCancelCast - canceling of cast
laTeleport - teleportation
laAutoSoulShot - on/off autouse soulshots
atTeleport - teleport
laNpcTrade - trade with a merchant
laSysMsg - receiving system message
laKey - key press

Examples not found
TLootType ldLooter, ldRandom, ldRandomSpoil, ldOrder, ldOrderSpoil Party loot type (TParty.LootType)
TLootType = (ldLooter, ldRandom, ldRandomSpoil, ldOrder);

ldLooter - to the finder
ldRandom - at random 
ldRandomSpoil - at random + spoil
ldOrder - in course

if (Party.LootType = ldRandomSpoil) and (User.Race = rtDwarf) then Print('This party loot type is total shit!'); // if our race = dwarf and loot type - randomspoil, then prints the message
TStoreType stNone, stSell, stPrepareSell, stBuy, stPrepareBuy, stManufacture, stPrepareManufacture, stObservingGames, stSellPackage Type of private store (TL2Char.StoreType)
TStoreType = (stNone, stSell, stPrepareSell, stBuy, stPrepareBuy, stManufacture, stPrepareManufacture, stObservingGames, stSellPackage);

stNone - nothing
stSell - selling
stPrepareSell - preparing to sell
stBuy - buying
stPrepareBuy - preparing to buy
stManufacture - crafting
stPrepareManufacture - preparing to craft
stObservingGames - ...
stSellPackage - selling in bundles

Examples not found
TRestartType rtTown, rtClanHoll, rtCastle, rtFort, rtFlags Options for function Engine.GoHome
TRestartType = (rtTown, rtClanHoll, rtCastle, rtFort, rtFlags);

rtTown - в город
rtClanHoll - в клан хол
rtCastle - в замок
rtFort - в форт
rtFlags - к флагу

if (User.Dead) then Engine.GoHome(rtCastle); // if dead - revive in castle
TMessageType mtAll, mtSystem, mtPrivate, mtParty, mtClan, mtFriend, mtShout Type of ingame chat (ChatMessage.ChatType)
TMessageType = (mtSystem, mtAll, mtPrivate, mtParty, mtClan, mtFriend, mtShout);

mtAll - общий чат
mtSystem - системное
mtPrivate - приватный чат
mtParty - пати чат
mtClan - клановый чат
mtFriend - переписка с другом
mtShout - крик

if (ChatMessage.Unread) and (ChatMessage.Type = mtPrivate) then Print('Houston, we have a private message!');  // if message unreaded and type of chat - pm, then prints message
  • Examples found for this method:
TZoneType ztGeneral, ztPeace, ztPvP, ztSiege, ztSevenSigns, ztAlt, ztUnknown Type of ingame zone (TL2Control.GetZoneType)
TZoneType = (ztGeneral, ztPeace, ztPvP, ztSiege, ztSevenSigns, ztAlt, ztUnknown);

ztGeneral - general hunting zone
ztPeace - peaceful zone (e.g. village)
ztPvP - combat zone
ztSiege - siege zone
ztSevenSigns -
ztAlt
ztUnknown

if (Engine.GetZoneType = ztPeace) then Engine.Sit;    // Sit down, if we are in peaceful zone
TScriptStatus ssStopped, ssCompile, ssRunning, ssPause, ssTerminate Script status (TPaxEngine.Status)
TScriptStatus = (ssStoped, ssCompile, ssRunning, ssPause, ssTerminate);
There are no arguments Examples not found

Methods

Name Result Description
TParty.LootType TLootType Returns loop type of our party
TL2Control.Status TL2Status Current account status
TL2Control.WaitAction TL2Action Waiting for an action / group of action. It is recomended to use more advanced analogue - OnAction
TL2Object.L2Class TL2Class Get class to which this object belongs
TChatMessage.ChatType TMessageType Returns type of chat
TPaxEngine.Status TScriptStatus Current script status (started \ paused \ stopped etc.)
TL2Char.L2Class TL2Class Type of ingame object
TL2Control.GetZoneType TZoneType Get current game zone type