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

GetAltName

Returns the “alternative name” of the object with ObjID. Depending on the server, this may contain a title, guild name, profession, or other information. Can be empty.

Sometimes you need to call ClickOnObject first to populate the name and alt name fields.

Возвращает «альтернативное имя» объекта с ObjID. В зависимости от сервера может содержать титул, название гильдии, профессию или другую информацию. Может быть пустым.

Иногда нужно предварительно вызвать ClickOnObject для заполнения полей имени и альтернативного имени.

Pascal

function GetAltName(ObjID: Cardinal): String;

Parameters:

  • ObjID — ID of the object.

Python

def GetAltName(ObjID: int) -> str: ...

Pascal Example

var
  Alt: String;
begin
  Alt := GetAltName(Self);
  if Alt = '' then
  begin
    ClickOnObject(Self);
    Wait(500);
    Alt := GetAltName(Self);
  end;
  AddToSystemJournal('Alt name: ' + Alt);
end.

Python Example

alt = GetAltName(Self())
if not alt:
    ClickOnObject(Self())
    Wait(500)
    alt = GetAltName(Self())
AddToSystemJournal(f'Alt name: {alt}')

See Also

GetName, GetTitle