a buy macro

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

hendrix04
a lesser mummy
a lesser mummy
Posts: 38
Joined: Tue Jul 13, 2004 5:02 pm

a buy macro

Post by hendrix04 » Tue Jul 13, 2004 5:09 pm

I was wondering if someone could write a buy macro? where say the file was called buy.mac you could go to a vender, click the item you wanted, and type like /macro buy 20 and it would buy a stack of the item... Is it possible?

missingfiles
a hill giant
a hill giant
Posts: 224
Joined: Wed Jun 09, 2004 1:15 pm

Post by missingfiles » Tue Jul 13, 2004 6:10 pm

/buyitem #
Buys # of the items selected in the merchant inventory. For non-stackable items, 1 must be used. For stackable items, range is 1 to 20.

/macro buy 20 5 <-- Would buy you 5 stacks of 20 of the item you have selected.

buy.mac

Code: Select all

Sub Main 

/declare Buy int outer 0 
/declare Amount int outer 
/declare Stack int outer 

/varset Amount ${Param0} 
/varset Stack ${Param1}

:Again

/buyitem Amount
/varcalc buy ${buy}+1 
if buy == Stack {
/end macro
{

/goto :Again
/return
I think that will work if not hopefully someone will correct me.

hendrix04
a lesser mummy
a lesser mummy
Posts: 38
Joined: Tue Jul 13, 2004 5:02 pm

Post by hendrix04 » Tue Jul 13, 2004 7:07 pm

thx, i will give it a try a little later ;)