• 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

Bazaar Plat Farming Macro

Ranik

New member
Joined
Jan 23, 2005
RedCents
Here is a Bazaar Plat Farming Macro which will search vendor to vendor and purchase items that are being sold for less than they will sell to a merchant for. Needs Megawarp Plugin however...

RED'S NOTE: Cybris updated this for us on page 4. You may not have seen it so I'm cutting & pasting it here. Enjoy, and everyone be sure and thank Cybris on page 4 of this thread.

Okay mine works. There is one error randomly tho where to doesn't target the person you are trying to buy form and doesn't open the trade window not sure what is causeing that to happen but here is the code i have.

Couple of things to get this to work
put buy.inc into wherever.MQ2.is\macros\common
put idiot.mac into wherever.mq2.is\macros

also make sure mq2cinspect is not loaded.

buy.inc
Rich (BB code):
| buy.inc 
| Modified by Twist to buy more than 20 of stackable items 
| by: Terramantian 
| Thanks to DKAA 

Sub Buy(string Name, int Quantity) 

   /declare ListPosition int local 

   /varset ListPosition ${Window[MerchantWnd].Child[ItemList].List[=${Name},2]} 

   /if (!${ListPosition}) { 
      /echo ERROR: Could not find ${Name}. 
      /return 
   } else { 
      /notify MerchantWnd ItemList listselect ${ListPosition} 
        /delay 2 
        /notify MerchantWnd ItemList leftmouse ${ListPosition} 
        /delay 2 
    } 
   /delay 5 (${Window[MerchantWnd].Child[MW_SelectedItemLabel].Text.Equal[${Name}]}) 
   /if (!${Window[MerchantWnd].Child[MW_SelectedItemLabel].Text.Equal[${Name}]}) { 
      /echo ERROR: Selection Error 
      /return 
   } 

   :CheckQuantity 

   /if ( ${Quantity} > 20 ) { 
      /buyitem 20 
      /varcalc Quantity ${Quantity} - 20 
      /delay 5 
      /goto :CheckQuantity 
   } | if 

   /if ( ${Quantity} > 0 ) { 
      /buyitem ${Quantity} 
   } | if 

/return


idiot.mac
Rich (BB code):
| - idiot.mac - 
| By: Onezero 
| Version: 0.0.2 
| Adapted to MQ2 by Zornecro, 10/10/2004
| Profit finding logic Created by dstern
| 
| This macro goes through the list of traders in the zone and checks 
| them all for profit exploits. (E.g, they are idiot sellers.) It will
| check all traders in the zone once, then end. No pathing needed,
| it uses the bad and wrong, but oh so good /megawarp.
|
| Usage: /mac idiot
| This can get you BANNED! You have been warned. It requires the use of the MEGAWARP plugin
| and players seeing you pop all over the zone may inspire them to do a
| /petition or /report. But I think the risk is low as everyone lags there,
| so popping around is normal to see. The bigger risk is people sending you tells
| "Were you looking for something specific?"

#turbo 40

#define DEBUG_1 /echo
#define DEBUG_2 /echo

#include common\buy.inc

|PoK has 143 merchants. Make the number below bigger if you find a zone with more than 200.
|Since we want to dumpster dive all TRADERS, there can be up to 600.
#define MAX_MERCH 600

|If you think delays will help avoid you getting petitioned, set this to how many seconds.
|It will wait at least this long, up to twice as long at random.
#define PARANOIA 3

Sub Main
/declare counter int local 1
/declare idcount int local 0
/declare ids[MAX_MERCH] int local 0
/declare curID int local 0

/keepkeys off
/popup Searching all of ${Zone} for Traders...

| Go through LastSpawn[n] until we get no more or fill up.
:nextTrader
/varset curID ${LastSpawn[${counter}].ID}
/if (${Spawn[${curID}].Trader}) {
 /varcalc idcount ${idcount}+1
 /varset ids[${idcount}] ${curID}
} else {
 /if (${curID}==0) /goto :nextMerch
}
/varcalc counter ${counter}+1
/if (${idcount}<MAX_MERCH) /goto :nextTrader

:nextMerch
/popup Checking ${idcount} Traders for idiot prices now...
DEBUG_1 Got ${idcount} Traders to check.
/for counter 1 to ${idcount}
 /varset curID ${ids[${counter}]}
 /target trader id ${curID}
 /delay 1s (${Target.ID}!=0)
 /if (${Target.Trader}) {
  DEBUG_1 Heading to ${Spawn[${curID}].CleanName}
  /call movetomerch "${Target.CleanName}"
  /click right target
  /delay 10s ${Merchant.Open}

  |Only buy things at least 8.5% worth of profit (below)
  /call TraderDive 8.5

  |We're done buying now. 
  /if (${Merchant.Open}) /notify /windowstate MerchantWnd close
  /if (PARANOIA) {
   /delay PARANOIAs
   /delay ${Math.Rand[PARANOIA]}s
  }
 } else {
  DEBUG_2 Trader ID ${curID} went away!
 }
/next counter

/echo Looks like we're done after checking ${idcount} Traders.
/return

Sub movetomerch(string mobname)
/face fast nolook
/squelch /warp target
/delay 6s ${Target.Distance}<20
/face fast nolook
/delay 1
/keypress back hold
/delay 1
/keypress forward
/if (${Target.ID}==0) /target trader "${mobname}"
/face fast nolook
/delay 3
/return 

|**
Created by dstern
Made into sub by Zornecro 10/25/04

How To Run: target a trader/npc; open up the merchant window; /call TraderDive 10
  The second parameter is MINIMUM acceptable profit. (10% in the example.)

You will either get nothing returned besides the "macro ended" message, or your computer 
will beep, and will return a message saying that "You can make x.yyy PP on item."
It then will buy up to 100 of these if possible.

Have fun with this, and you can probably figure out ways to automate this process.
Zornecro did!

Oh! And happy farming PP!!!
**|

Sub TraderDive(float percentNeeded)
/declare priceToBuy int local
/declare priceToSell int local
/declare profit int local
/declare profitPc float local
/declare iteration int local
/declare totalItems int local ${Merchant.Items}
/if (${totalItems}<1) /return
/varcalc percentNeeded 1.0+${Math.Calc[${percentNeeded}/100]}
 
/for iteration 1 to ${totalItems}
 /if (${Merchant.Open}&&(${iteration}<=${totalItems})) {
  /varset priceToBuy  ${Merchant.Item[${iteration}].BuyPrice}
  /varset priceToSell ${Merchant.Item[${iteration}].Value}
  /varcalc profit ${priceToSell}-${priceToBuy}
  |Ignore items that profit less than 1pp regardless.
  /if (${profit}>1000) {
   /varcalc profitPc ${Math.Calc[${priceToSell}/${priceToBuy}]}
   /if (${profitPc}>=${percentNeeded}) {
    DEBUG_1 You can resell ${Merchant.Item[${iteration}].Name} at ${Math.Calc[${profitPc}*100.0].Int}% buying price.
    |/mqpause
    /popup Buying ${Merchant.Item[${iteration}].Name} from ${Merchant.Name}
    /call buy "${Merchant.Item[${iteration}]}" 20
   } else {
    DEBUG_2 Profit on ${Merchant.Item[${iteration}]} was ${profit} but only ${Math.Calc[${profitPc}*100.0].Int}%
    |/mqpause
   }
  }
 }
/next iteration
/return

enjoy :)
 
Last edited by a moderator:
hamburgerhelper said:

Courtesy of MQ2 site

|
| 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


hope that helps have not tested it
 
nice macro!!

heh hard to make plat like that nemore i hear... so many ppl use it... but still get some nicep lat once in awhile..

u dont need megawarp.. just use the warp machi posted here or my compile of it and change every line in the macr othat says "megawarp" to "warp" and your gtg
 
hmm dont warp to anyone just stands in same spot moves back and forth i seen 1 thing that needed changed to use the warp plugin that zedmix included with his precomplied version of mq2

/squelch /warp

only place i seen that needed to be changed
 
Last edited by a moderator:
Sorry yeah if you use a precompiled macro see which it has for the plugin ... warp or megawarp ... it was written for megawarp during the time when macroquest2 warp function was broken.
 
hmm dont warp to anyone just stands in same spot moves back and forth i seen 1 thing that needed changed to use the warp plugin that zedmix included with his precomplied version of mq2

ditto
 
hey Zedmix,

If the bugs are worked out of this and it works are you going to add this to your next compile after DoN is released?
 
I dunno if this works in its present condition, but i edited out some of the small errors that i could find (although most likely they never would have hit the errors because of if statements) I'll try this out on my bazaar mule sometime soon to see if it works. If people are impatient go ahead and try it, just let me know what errors come up if it doesn't work.
 
Last edited:
Can this be detected from other players/GMs? is there a chance for the character to continue to buy BS items that are not worth the price? :)
I think im going to definatly try this, maybe buy 100K and then go from that, see if i can make money. I know a person in particular that did this (w/out macro) and had PP in the millions. Said he could average around 1 mil pp per month from just buying/trading low, selling high. It seems to be a job for someone patient though, but i guess the macro takes care of that part :)
 
As anyone had any luck with this as of late.... I know sid tried it and said it was warping way to much?



I dont want this to be very noticeable and how effective is it to buy from traders and sell to merchants at a higher price?


Any numbers?
 
This works w/the new Bazaar?
Also... how about the Barter system, any exploints on that yet? Or deals that are worth bartering combined with bazaar?
 
yes, it works with the new bazaar, but only because it warps to every merchant. if anybody could get a list of sellable items with how much they sell to each vendor for, it would be a lot easier to do this as you would only be searching for items on the vendor rather than having to warp to em and right click to get prices.
 
its the price that you sell it to a npc vendor, or is that really different per server?
 
I think hes talking about price values of items sold on traders on each server
i.e. Fungi on fennin 60-80k,
Fungi on Zek 100-120k (not sure if its acurate but its an example)

I actually didnt know you would buy/sell to vendor for profit, that makes sence now :)
 
the macro checks if prices are lower than npc vendors will buy them for, if so it buys the item and then goes to a vendor to sell it.
 
Lol ok so just to confirm this is working for the items to sell to Vendors only?

If so I will start using it again. As far as the barter system/buying items to sell to other people That sounds like a neat idea, but I like doing that myself and fleecing people in person hehe. BUt if one is made for that lets make a new thread for it so the 2 dont get mixed up ;)
 
if you just stand in one position and move forwards and backwards you have to change /squelch /warp t to /squelch /warp target
you have to look in your ini file if alias t for target was made or make one, then you dont need to change line in macro
and set delay higher, it warps much and maybe people notice, so just do 45s

greetz mr.smith
sorry for bad english, hope its understandable
 
I can't seem to get the warp to work. I was lucky and was standing next to someone that got targeted. It bought an item that got me an extra 100ish plat. Can someone help with the warp?
 
Here is a correction that should make this work. True, you don't need megawarp (can't find anyways) but as previously mentioned by Kool, you can substitute /warp by opening idiot.mac.

The line on mine said - /squelch /megawarp t
Change line to read - /squelch /warp target

This will fix the problem - btw if you have npctobank on it won't work, it will only inspect target.

Hope this fixes the issues :)
 
Last edited:
Ok i Dont get it.

Run the macro works fine, goes around to the traders, then ends with out doing anything.

Is there something im missing here?

could some one give me the intructions for running this so it works.

what I do is load it up with /mac idiot

but it seems to do nothing, just ends after checking the traders.
 
One of two things could be happening.

1 - (Most obvious) Someone beat you to the deals already.

2 - Doesn't work with NPCBANKER on

It looks for items that sell from more than they are listed for.
 
Has this been Nerfed? Won't open Trader's inventory and warps on to next one.
 
I get the same problem. I'll warp to the trader, his inventory open and closes really quick, then I warp to the next trader without buying anything.

Also, does this macro use the sale price as listed in the item id, or the price that you personaly get with your con status and charisma. I noticed a few things I was selling would go for a few plat less then the item window said.

I still made 2k though running around and running just the check and buy bit and clicking on every trader. Took about an hour and half. Just did it before work while bard was running circles on the other computer.
 
Hey you got a working version fork it over.

It uses the price it will sell to vendors for versus the price in bazaar. Provided your CHA is high enough to vendor.

ie: Chocker 48pp in bazaar list to vendor 85pp. You buy for 48 sell for 85.
 
This doesn't work with the new merchant windows.

Rich (BB code):
/if (${Merchant.Open}) /notify MerchantWnd MW_DoneButton leftmouseup

The 'done' button no longer exists. Is there a name for the 'x' on a window that can be called to close?
 
This macro was made by zornecro , not sure why on front page it doesnt give him the deserved credits.
 
Not good with the coding aspect, but couldnt you just have it hit esc twice to remove target and the merchant window? After that it could aquire its next target and continue on as normal.
 
mandrack said:
This macro was made by zornecro , not sure why on front page it doesnt give him the deserved credits.

Mandrack the original post has the credits in the header of the CODE.

| - idiot.mac -
| By: Onezero
| Version: 0.0.2
| Adapted to MQ2 by Zornecro, 10/10/2004
| Profit finding logic Created by dstern
 
Lol yea just read the first post.....has him credited lmao >< maybe read before posting =P jk
 
ya give him all the credit he wants it no longer works and he obviously isn't going to fix it
 
***EDITED**

Doh, im a dumbass hehe. Didnt read the full post about the trade window issue. Disregard this
 
Has anyone found a fix for this?
I wouldn't mind running this every now and then just to see what it comes up with, if anything good.
 
hairpin said:
This doesn't work with the new merchant windows.

Rich (BB code):
/if (${Merchant.Open}) /notify MerchantWnd MW_DoneButton leftmouseup

The 'done' button no longer exists. Is there a name for the 'x' on a window that can be called to close?

Replace that line of code with this

Rich (BB code):
/if (${Merchant.Open}) /cleanup

Will pretty much just close all the windows you currently have open. Just a slight work around till they have the new merchant window sorted out.
 
Bazaar Plat Farming Macro

Users who are viewing this thread

Back
Top
Cart