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

AutoBuy

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 the specified type and color.

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

To remove all buy/sell hooks at once, use ClearShopList.

For more advanced filtering (by price and name), use AutoBuyEx.

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

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

Для удаления всех хуков покупки/продажи используйте ClearShopList.

Для более гибкой фильтрации (по цене и имени) используйте AutoBuyEx.

Pascal

procedure AutoBuy(ItemType: Word; ItemColor: Word; Quantity: Word);

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.

Python

def AutoBuy(ItemType: int, ItemColor: int, Quantity: int) -> None: ...

Pascal Example

begin
  // Buy up to 400 Nightshade of any color
  AutoBuy($0F88, $FFFF, 400);

  // Remove the Nightshade buy hook
  AutoBuy($0F88, $FFFF, 0);
end.

Python Example

# Buy up to 400 Nightshade of any color
AutoBuy(0x0F88, 0xFFFF, 400)

# Remove the Nightshade buy hook
AutoBuy(0x0F88, 0xFFFF, 0)

See Also

AutoBuyEx, AutoSell, ClearShopList, GetShopList