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

AutoBuyEx

Extended version of AutoBuy with additional filtering by price and item name.

Sets up an automatic buy hook for vendor buy lists. When a buy list is received from a vendor (or if one is already present), Stealth will automatically purchase items matching all specified criteria.

This hook is persistent — it remains active until explicitly removed by calling AutoBuy with Quantity = 0.

Расширенная версия AutoBuy с дополнительной фильтрацией по цене и имени предмета.

Устанавливает автоматический хук для покупки у вендоров. Когда от вендора приходит список покупки (или если он уже открыт), Stealth автоматически купит предметы, соответствующие всем указанным критериям.

Хук постоянный — он остаётся активным, пока не будет явно удалён вызовом AutoBuy с Quantity = 0.

Pascal

procedure AutoBuyEx(ItemType: Word; ItemColor: Word; Quantity: Word; Price: Cardinal; Name: String);

Parameters:

  • ItemType — graphic (type) of the item to buy.
  • ItemColor — color (hue) of the item. $FFFF = any color.
  • Quantity — maximum quantity to buy. 0 = remove this hook.
  • Price — maximum price per item. $FFFFFFFF = any price.
  • Name — item name filter. Empty string '' = any name.

Python

def AutoBuyEx(ItemType: int, ItemColor: int, Quantity: int, Price: int, Name: str) -> None: ...

Pascal Example

begin
  // Buy up to 400 Nightshade, any color, any price, any name
  AutoBuyEx($0F88, $FFFF, 400, $FFFFFFFF, '');

  // Buy up to 50 specific potions, max 100gp each, by name
  AutoBuyEx($0F0C, $0000, 50, 100, 'Greater Heal Potion');
end.

Python Example

# Buy up to 400 Nightshade, any color, any price, any name
AutoBuyEx(0x0F88, 0xFFFF, 400, 0xFFFFFFFF, '')

# Buy up to 50 specific potions, max 100gp each, by name
AutoBuyEx(0x0F0C, 0x0000, 50, 100, 'Greater Heal Potion')

See Also

AutoBuy, AutoSell, GetAutoBuyDelay