• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Macro - Buy.inc 2020-26-NOV


Captain Obvious
Mar 29, 2020
Is it just me or is the :filling routine not working too good.. when I run this it can't find the item because the merchant window list hasn't populated yet..

could be me tho.. I am use /delay 25 before running it..


Dec 29, 2017
Sub BuyItem(string ItemToBuy, int amount)
    /if (${FindItemCount[${ItemToBuy}]}>= ${amount}) /return
    /declare i int local
    /declare QTY int local
    /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
    /declare ListItem int local ${Window[MerchantWnd].Child[ItemList].List[=${ItemToBuy},2]}
    /declare count int local ${FindItemCount[${ItemToBuy}]}

    /if (!${ListItem}) {
        /echo couldn't find ${ItemToBuy}
    } else {
        /notify MerchantWnd ItemList listselect ${ListItem}
        /delay 5
    /echo Buying ${ItemToBuy} Till I get ${amount}

    /while (${QTY}>0) {
        /varset count ${FindItemCount[${ItemToBuy}]}
        /if (${QTY}>999) {
            /buyitem 1000
            /delay 3 ${FindItemCount[${ItemToBuy}]} > ${count}
            /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
        } else /if (${QTY}>0 && ${QTY}<1000) {
            /buyitem ${QTY}
            /delay 5 ${FindItemCount[${ItemToBuy}]} > ${count}
            /varcalc QTY ${amount}-${FindItemCount[${ItemToBuy}]}
        /if (${FindItemCount[${ItemToBuy}]}>${count}) /echo \ar${FindItemCount[${ItemToBuy}]}\aw/\ar${amount}\awx\ap${ItemToBuy} \at${Math.Calc[${FindItemCount[${ItemToBuy}]}/${amount}*100]}\aw% Done.
    /while (${Window[MerchantWnd].Open}) {
        /delay 5

I use this one. It has a progress tracker, so depending on how many items you want to purchase you can use it or not. It's a bit smaller than what you're using currently. Can buy items that stack up to 1000 at a time.

For this one, it doesn't buy the number of items you pass it, it actually buys items until you actually have that many of the item. So if your intention was to buy XXX more of the items, then you'd need to modify this still.

Example: I have 500 Amber. I use this BuyItem and tell it ${amount} is 1000, then it will purchase 500 more, not 1000.

This doesn't open the merchant or wait for the merchant to populate. It's assumed that it happens prior to you calling the function.
Last edited:

Users who are viewing this thread