• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Question - is it possible to buy multiple nonstacking items from a merchant with a macro or command

timmy

Well-known member
i want to buy 100 widgets from a_merchant_01. widgets don't stack, so i have to click over and over. is there any way to circumvent this click madness?
 
Code:
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}
        /return
    } else {
        /notify MerchantWnd ItemList listselect ${ListItem}
        /delay 5
    }
    /echo Buying ${ItemToBuy} Till I get ${amount}
    :BuyLoop
    /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}) {
        /cleanup
        /delay 5
    }
/return

/call BuyItem "Widget" "100"

This assumes you're already close enough to a_merchant_01
This assumes the merchant is targeted, /target a_merchant_01
This assumes the merchant is open, /click right target
This assumes the item is available on said merchant
This assumes the "amount" input on the /call is the total you want on your person, not the total you want to buy.

This should handle stackable and non-stackable items.
 
Last edited:
I dont know if im doing something wrong but i /mac buystuff Redwine 20000 (because i have 20 empty inventory slots for a stack of 1000 red wine) and it says "you already have 2100 Red Wine" and ends. I dont want only 2100 lol.
 
I dont know if im doing something wrong but i /mac buystuff Redwine 20000 (because i have 20 empty inventory slots for a stack of 1000 red wine) and it says "you already have 2100 Red Wine" and ends. I dont want only 2100 lol.
This assumes the "amount" input on the /call is the total you want on your person, not the total you want to buy.
 
Question - is it possible to buy multiple nonstacking items from a merchant with a macro or command

Users who are viewing this thread

Back
Top
Cart