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.
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.
def AutoBuy(ItemType: int, ItemColor: int, Quantity: int) -> None: ...
begin
// Buy up to 400 Nightshade of any color
AutoBuy($0F88, $FFFF, 400);
// Remove the Nightshade buy hook
AutoBuy($0F88, $FFFF, 0);
end.
# Buy up to 400 Nightshade of any color
AutoBuy(0x0F88, 0xFFFF, 400)
# Remove the Nightshade buy hook
AutoBuy(0x0F88, 0xFFFF, 0)