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

GetShopList

Returns the last vendor shop list content as an array of strings.

Each line has the format: "Nr: N|ID:|$ID|type|$Type|Color|$Color|Name|Name|Price|Price|Cliloc|Tooltip|Quantity|Qty" where ID, Type, and Color values are in hex (with $ prefix).

The shop list is populated when the player opens a vendor’s buy menu (by saying “buy” or selecting “Buy” from the context menu).

Возвращает содержимое последнего списка товаров вендора в виде массива строк.

Формат каждой строки: "Nr: N|ID:|$ID|type|$Type|Color|$Color|Name|Name|Price|Price|Cliloc|Tooltip|Quantity|Qty".

Список товаров заполняется, когда игрок открывает меню покупки у вендора (командой “buy” или через контекстное меню).

DWS

function GetShopList: TArray<String>;

DWS overload:

procedure GetShopList(var List: TStringList);

Pascal Script

procedure GetShopList(var List: TStringList);

Python

def GetShopList() -> list[str]: ...

Pascal Example

var
  SL: TStringList;
  i: Integer;
begin
  SL := TStringList.Create;
  GetShopList(SL);
  for i := 0 to SL.Count - 1 do
    AddToSystemJournal(SL[i]);
  SL.Free;
end.

Example output:

Nr: 0|ID:|$4001D0B7|type|$2BE3|Color|$0000|Name|Fresh Ginger|Price|505|Cliloc||Quantity|10
Nr: 1|ID:|$4001D0B8|type|$103B|Color|$0000|Name|bread loaf|Price|6|Cliloc||Quantity|20

Python Example

shop = GetShopList()
for line in shop:
    AddToSystemJournal(line)

See Also

ClearShopList