Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetScriptsList

Returns a list of all active scripts for the current character. In normal conditions, contains at least one entry (the calling script itself).

Each element is a TScriptItemInfo record containing the script’s index in the Stealth scripts list.

Возвращает список всех активных скриптов текущего персонажа. В нормальных условиях содержит как минимум одну запись (вызывающий скрипт).

Каждый элемент — запись TScriptItemInfo, содержащая индекс скрипта в списке скриптов Stealth.

DWS

function GetScriptsList: TArray<TScriptItemInfo>;

Pascal Script

function GetScriptsList: TScriptItemInfoArray;

Type definition:

TScriptItemInfo = Word;  // script index
TScriptItemInfoArray = array of TScriptItemInfo;

Python

def GetScriptsList() -> list[ScriptInfo]: ...

Pascal Example

var
  Scripts: TScriptItemInfoArray;
  i: Integer;
begin
  Scripts := GetScriptsList;
  for i := 0 to Length(Scripts) - 1 do
    AddToSystemJournal(GetScriptName(Scripts[i]) + ' [' +
      IntToStr(GetScriptState(Scripts[i])) + ']');
end.

Python Example

scripts = GetScriptsList()
for s in scripts:
    AddToSystemJournal(f'{GetScriptName(s)} [{GetScriptState(s)}]')

See Also

GetScriptName, GetScriptPath, GetScriptState, StartScript, StopScript