• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

New Buy.inc

Riddlerr

New member
Joined
May 21, 2005
RedCents
30¢
Just wanted to let everyone know. that there is a new buy.inc out. sad part is that it is infact posted in the MQ2 Vip boards. and there for i will no post it here. in order to get access to the vip section. donate the MQ2 Dev's ( they really deserve it anyways) Link to the tread can be found http://macroquest2.com/phpBB2/viewtopic.php?t=8 tose them what ever you can afford i belive its 10$ min. once you have donated. you can use this link http://macroquest2.com/phpBB2/viewtopic.php?t=11371&postdays=0&postorder=asc&start=15 its the first post on this page (page 2).
 
Has anyone tried switching the Buy.inc linked above, with the Buy.inc from Override. and does it work with his macros? I'm stuck at work and can't test it atm.

Zepher
 
that buy.inc is just an example of using it in the new UI. I have no idea if it's compatible with override's macros because I honestly didn't even look at his buy.inc. If it is, then you got lucky.
 
yes. it is complelty fulling working for all the uses of the old buy.inc, or atleast all that i have tested.
 
So do we just place the sub given on the 2nd page in place of the sub buy in my buy.inc? It doesn't look a think like it and is missing all the loops...

So like this:

Current buy.inc:
Rich (BB code):
| 
| buy.inc
| Buy Include File needed for macros
| Version 1.7
| Date: September 13, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2
|
| These file MUST be in the common directory in your macros directory.
|
| Usage: /call Buy (ItemToBuy) (Amount Needed)
|
| Use the Buy function for buying if you need a set total amount, like if you have
| 20 of the item on you already and you need a total of 30, it will only buy 10
| of the item.
|
| Usage: /call PCBuy (ItemToBuy) (Amount to buy off merchant)
|
| Use the PCBuy function if you don't need a set total amount, you just need 
| a set amount off that merchant.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 


#event Broke "#*#you cannot afford#*#" 
#event Broke "#*#you can't afford#*#" 

Sub Buy(item ItemToBuy, int amount)
/echo Buying ${ItemToBuy}!
/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0

/for x 1 to ${TotalMItems}
  /if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
    /varset ItemSlotNum ${x}
  }
/next x

/if (${ItemSlotNum}==0) {
  /echo Not on Merchant
  /return
}

/itemnotify merchant${ItemSlotNum} leftmouseup
/delay 1s


:Buy
   /if (${FindItemCount[=${SelectedItem}]}>=${amount}) {
     /echo Done!
     /return
   }        

:StackLoop 
   /if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=20) /goto :RegLoop 
   /buyitem ${If[${SelectedItem.Stackable},20,1]} 
   /delay 5 
   /doevents
   /goto :StackLoop 

:RegLoop 
   /if (${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]}<=0) {
     /echo Done!
     /return
   }
   /buyitem ${If[${SelectedItem.Stackable},${Math.Calc[${amount}-${FindItemCount[=${SelectedItem}]}]},1]} 
   /delay 5 
   /doevents 
   /goto :RegLoop 

/return

Sub PCBuy(item ItemToBuy, int amount)
/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0
/delay 2s

:BuyPC
   /varset ItemSlotNum 0
   /if (${amount}<=0) {
     /echo Done!
     /return
   }
   /for x 1 to ${TotalMItems}
     /if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
       /varset ItemSlotNum ${x}
     }
   /next x
   /if (${ItemSlotNum}==0) {
     /echo No More on Merchant, done buying.
     /return
   }
   /itemnotify merchant${ItemSlotNum} leftmouseup
   /delay 1s
   /if (${SelectedItem.Stackable}) {
     /if (${amount}>=20) {
       /buyitem 20
       /varset amount ${Math.Calc[${amount}-20]}
     } else {
       /buyitem ${amount}
       /varset amount ${Math.Calc[${amount}-${amount}]}
     }
   } else {
     /buyitem 1
     /varset amount ${Math.Calc[${amount}-1]}
   }
   /delay 5 
   /doevents 
   /goto :BuyPC

/return

Sub Event_Broke 
   /echo Error: You are out of money! 
   /beep
   /endmacro
/return

and make it look like this?

new buy.inc:

Rich (BB code):
| 
| buy.inc
| Buy Include File needed for macros
| Version 1.7
| Date: September 13, 2004
|
| Please be sure to get the lastest updates at http://www.soc-music.com/mq2
|
| These file MUST be in the common directory in your macros directory.
|
| Usage: /call Buy (ItemToBuy) (Amount Needed)
|
| Use the Buy function for buying if you need a set total amount, like if you have
| 20 of the item on you already and you need a total of 30, it will only buy 10
| of the item.
|
| Usage: /call PCBuy (ItemToBuy) (Amount to buy off merchant)
|
| Use the PCBuy function if you don't need a set total amount, you just need 
| a set amount off that merchant.
|
| Disclaimer:
| Code was used from other programers also from the MQ Forums.
| 


#event Broke "#*#you cannot afford#*#" 
#event Broke "#*#you can't afford#*#" 

CUT AND PASTE THE CODE FROM THE LINK HERE?


Sub PCBuy(item ItemToBuy, int amount)
/declare TotalMItems int Inner
/varset TotalMItems ${Merchant.Items}
/declare x int Inner
/declare ItemSlotNum int Inner
/varset ItemSlotNum 0
/delay 2s

:BuyPC
   /varset ItemSlotNum 0
   /if (${amount}<=0) {
     /echo Done!
     /return
   }
   /for x 1 to ${TotalMItems}
     /if (${ItemToBuy.Equal[${Merchant.Item[${x}]}]}) {
       /varset ItemSlotNum ${x}
     }
   /next x
   /if (${ItemSlotNum}==0) {
     /echo No More on Merchant, done buying.
     /return
   }
   /itemnotify merchant${ItemSlotNum} leftmouseup
   /delay 1s
   /if (${SelectedItem.Stackable}) {
     /if (${amount}>=20) {
       /buyitem 20
       /varset amount ${Math.Calc[${amount}-20]}
     } else {
       /buyitem ${amount}
       /varset amount ${Math.Calc[${amount}-${amount}]}
     }
   } else {
     /buyitem 1
     /varset amount ${Math.Calc[${amount}-1]}
   }
   /delay 5 
   /doevents 
   /goto :BuyPC

/return

Sub Event_Broke 
   /echo Error: You are out of money! 
   /beep
   /endmacro
/return
 
Last edited:
can anyone verify that the buy.inc is working with overides macs? it seems when i purchase it will open the merchant window but not buy anything
 
New Buy.inc

Users who are viewing this thread

Back
Top
Cart