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

GetStaticArt

Returns a TBitmap object for the static art with the specified ObjType and Hue. If Hue is 0, the art uses original colors.

Returns nil (Pascal) or an empty buffer (Python) if the character is disconnected or UO data files are not loaded.

In Python, this method is named GetStaticArtBitmap and returns the raw BMP file content as list[int] — BMP is used as the only format guaranteed to be 100% compatible with Delphi’s TBitmap.

Возвращает объект TBitmap для статик-арта с указанным ObjType и Hue. Если Hue = 0, арт берётся с оригинальными цветами.

Возвращает nil (Pascal) или пустой буфер (Python), если персонаж не подключён или файлы UO Data не загружены.

В Python метод называется GetStaticArtBitmap и возвращает содержимое BMP-файла в виде list[int] — BMP используется как единственный формат, гарантированно совместимый с Delphi TBitmap.

Pascal

function GetStaticArt(ObjType: Cardinal; Hue: Word): TBitmap;

Python

def GetStaticArtBitmap(ObjType: int, Hue: int) -> list[int]: ...

Pascal Example

var
  bmp: TBitmap;
begin
  bmp := GetStaticArt($0014, 0);
  if Assigned(bmp) then
  begin
    bmp.SaveToFile('StaticArt.bmp');
    bmp.Free;
  end;
end.

Python Example

bitmap_data = GetStaticArtBitmap(0x0014, 0)
if bitmap_data:
    with open('StaticArt.bmp', 'wb') as f:
        f.write(bytes(bitmap_data))
    AddToSystemJournal(f'Saved BMP, size: {len(bitmap_data)} bytes')