• 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.mac 2.0 -- updated 12/04/2012

Maskoi

old and salty
Joined
Sep 28, 2005
RedCents
82,796¢
Bazaar.mac 2.0 -- updated 12/04/2012
This is my revised and updated Bazaar.mac. Read the instructions in the mac to use. its pretty straight forward.

I love Bazaar.mac but was it missing some useful stuff people had posted or suggested. I also tried to make it a little friendlier by making some of the variables user assigned and moving them to the top of the macro for easy access.

Requires MQ2Bzsrch, MQ2ItemDisplay, and Bazaar.ini all plugins and files are included in the Redguides Compile

V 2.0 12/04/2012
~ Trader routines updated only. I haven't tackled barter section yet.
~ Increased Bazaar slots form 100 to 200 to match recent expansions.
~ Added a fix for Viridian Hero's Forge Leather as name is usually loner than 30 characters.
~ Added a fix for for Spell names longer than 30 characters by trimming Spell: from item name.
~ Removed all vendor price code since EQ Bazaar no longer supports it.
~ Min price will no longer check if lower than vendor price.
~ Fixed stall caused by ${Bazaar.Done}. It no longer returns TRUE if Bazaar search is empty.
~ Fixed setting item to max price if defined in ini file and search returns 0 items for sale.

V 1.20 08/24/2012
~ Fix to compensate for Viridian Hero's Forge Leather names because its more than 30 characters. Trims 3 characters off in order to search correctly.

V 1.10 04/06/2011
~ ini file VendorPrice fixed. It was reporting the gp sp values incorrectly. VendorPrice is for quick reference only and has no impact on any auction values.

V 1.09 04/06/2011
~ Fixed makeini feature - Was incorrectly comparing vendor sell price to ini MinSellPrice if item existed in ini file.

V 1.08 03/04/2011
~ Removed all orphaned code left over from updatebazaarprices.mac.
~ Heavily commented Trader Section
~ Jumped duplicate item check code back in from updatebazaarprices.mac
~ Cleaned up and made /echo statements more consistent.
~ Added code to detect commas (,) in item name and skip entry to prevent macro crashing.
~ Will now match ini file minimum sell price if within 25pp of adjusted sell price because marco rounds down to nearest 25pp price when undercutting prices over 100 pp.
~ Fixed macro not recognizing if min sell price for was below sell to vendor price.
~ Removed all buttons .Enabled code seems mq2 no longer recognizes button states correctly.

V 1.07 01/21/2011
~Cleaned up and updated instructions and contributors
~Added ini file generation and updating with the following command

  • /mac bazaar makeini
~Editable default ini values
  • SellPriceMin
  • SellPriceMax
  • BuyPriceMin
  • BuyPriceMax
~Automatically updates SellPriceMin ini price if lower than Sell to Vendor Price when /mac bazaar makeini
~Can now set the macro to run once or update prices to a user defined time variable (default 90 min)
~Can now set price for /mac bazaar trader initprice command
~Added ExcludeList to ini file so you don't underprice your other traders
~Can set custom message to /ooc or /auction after price updates (default off) i.e. /ooc New trader up!
~If Trader active turns off tradermode when updating

V 1.06 01/19/2011
-Updated trader slots from 80 to 100 for HoT
-Took out all the /beeps
-Removed a bunch of irrelevant test code that was commented out to avoid confusion
-Labeled the subs
-Cleaned up and aligned the code


Download both bazaar.mac and bazaar.inc to use
 

Attachments

Last edited:
Re: Bazaar.mac 1.07 -- updated 01/21/2011

Fabulous!! There is just one little issue that would be great to add but I'm not sure how to do it. This macro will price an item below the tribute value. How can we keep the minimum to say 10% above tribute if desired so that we don't lose potential tributes?

Thanks!
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

Fabulous!! There is just one little issue that would be great to add but I'm not sure how to do it. This macro will price an item below the tribute value. How can we keep the minimum to say 10% above tribute if desired so that we don't lose potential tributes?

Thanks!

I never bother with tribute so that never occurred to me.
  • How would tribute value translate into plat?
  • Could you give me some samples of what items in the baz you are talking about and how you would price them?
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

I just ran this for the first time and I noticed that many items were set to sell way below vendor price.

In lines 504 to 525 it looks like the minpricecheck variable is set to 0 and used to compare the SellPriceMin .

I can't see where it is set to Vendor Value. I'm not a programmer, just a recreational player so I could be missing something.

I also noticed that bazaar.ini only had one line for exclusions in it after running /mac bazaar trader .

Thanks

Rich (BB code):
:nextslot
	/varcalc slot ${slot}+1
	/varset l 0
	/varset c 
	/varset s 
	/varset g 
	/varset p 
	/varset minpricecheck 0
	/varset SellValue ${FindItem[${itemname}].Value} 
	/if (${slot}>99) /return
	/notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
	/if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /return
	/varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
	/delay 1s
	/if (${Ini[bazaar.ini,"${itemname}", SellPriceMin]}) {
		/varset l ${SellValue.Length}
		/echo Entry already exists for ${itemname}.
		/if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}<=${minpricecheck}) {
			/echo ${itemname} ini SellPriceMin=${SellPriceMin} is lower than Sell to Vendor Price. Restting to ${minpricecheck}
			/ini bazaar.ini "${itemname}" "SellPriceMin" ${minpricecheck}
		}
		/goto :nextslot
 
Last edited:
Re: Bazaar.mac 1.07 -- updated 01/21/2011

Wow, that was fast. I didn't notice your reply within minutes after my post before I posted the next item. Thanks. Here is an example:

Spell: Viridifloral Bulwark Rk. II Vendor price 258 Set to sell for 250
Spell: Solemn Force Rk. II Vendor price 423 Set to sell for 375
- That's just not worth the space in the trader.

It would be nice if those were removed from sale so you could see it easily and remove them to take to vendor and sell.

Elaborate Defiant Leather Gloves Set to sell for 39 Tribute Value 77 Value 6

I like to sell for at least 10% over tribute else I take item to origin and turn it in for tribute credit. Perhaps the 10% could be a variable that could be set by user.

Thanks!
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

Feature request:
If there's a MinSellPrice in the .ini and someone's selling something below it, use the next highest price than MinSellPrice as the minprice.
e.g.
MinSellPrice for Water Flask is 5pp in the .ini
Someone's selling one for 3pp. Someone else is selling for 100pp.
Current behavior is bazaar.mac sets the price at 5pp.
Desired behavior is a sell price of 99pp.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

The following contains Tribute code to avoid selling below the Tribute Value. I've tested it for several days now and it appears to work without a major hitch. A bit of a tweak may be necessary for items that do not have a sell value but do have a tribute value. I'll work on that in a week or two. One problem I noticed even before adding the tribute code is that in the creation of the INI file, it will occasionally not capture the entire price but only one or two digits. I can't make out a pattern yet but I suspect that it is a lag issue.

Rich (BB code):
|************************************************************************
|* bazaar.mac version 1.0.7              
|* Updated by Maskoi 01/19/2011                     
|* Auto-Update Bazaar Prices                 
|*                           
|* Special thanks to:                     
|* - Sparr for the original updatebazaarprices.mac
|* - ebs2002 for the original bazaar.mac  
|* - jpetrone for create ini file code.         
|* - M.D. for updating it     
|* - dkaa for fixing it after /bzsrch died
|* - TreeHuginDruidUpdated added TraderSetup routine 10/26/2007
|* - nytemyst for ExcludeList ini file entry      
|* - Maskoi updated for HoT 01/19/2011        
|* - DragonFire added tribute code 4/1/2011   
|************************************************************************
|* Summary:                       
|* Requires MQ2Bzsrch and MQ2ItemDisplay                           
|* This macro is used to automatically update the prices of your   
|* buyer or trader to remain competitive.           
|*                           
|* It also contains INI support to allow you to set minimum and maximum
|* prices which your merchants will not pass           
|************************************************************************
|* Usage:                       
|* /mac bazaar trader                     
|* updates your /trader                     
|*                           
|* /mac bazaar buyer                     
|* updates your buyer  
|* 
|* /mac bazaar trader initprice
|* Sets all unpriced items in Bazaar/Trader Window to InitialPrice variable (default 1000)
|* 
|* /mac bazaar make ini
|* To create an entry for each item shown in your trader window in the Bazaar.ini.               
|*                           
|* INI format:                       
|* bazaar.ini:                       
|* [Metallic Drake Scales]                 
|* SellPriceMin=20500                     
|* SellPriceMax=30000                     
|* BuyPriceMin=10000                     
|* BuyPriceMax=20000                     
|************************************************************************
|* Notes:                       
|*                           
|* This macro also will ALWAYS beat a price unless it falls outside your
|* SellPriceMin or BuyPriceMax.  Rather than using Standard Deviation,   
|* it will price your seller 1% lower than the lowest seller, or price   
|* your buyer at either +5, +1%, or +0.1% depending on the price of the   
|* item:                       
|*                           
|* 1-500    : +5                     
|* 501-5000 : +1%                     
|* 5000+    : +0.1%                     
|*                           
|* Additionally, if your selling price is significantly lower than the
|* next highest seller (or your buying price is higher than the next   
|* lowest buyer), your prices will be adjusted accordingly     
|*                           
|************************************************************************|

#include bazaar.inc

Sub Main
|-------------------------------------------------------------|
| Edit your variables
|-------------------------------------------------------------|
| - Set AnnounceOn to 1 for AnnounceMessage after prices updated (default off)
| - AnnounceWhere set the channel you want AnnounceMessage no / needed i.e. auction or ooc
| - If UpdateOn=1 maqcro will AnnounceMessage every UpdateInterval (default 90 min) 
	/declare AnnounceOn			int 	outer	0
	/declare AnnounceWhere		string 	outer	ooc
	/declare AnnounceMessage	string 	outer	New trader up!
| - Set UpdateOn to 1 to update prices every UpdateInterval (default 90 min) 
| - Set UpdateOn to 0 update prices just once then end macro
| - Set UpdateSpam to 1 to /echo countdown every 5 min until next price update 
	/declare UpdateOn			int 	outer	1
	/declare UpdateInterval		int 	outer	90
	/declare UpdateSpam			int 	outer	1
| - Variable to set no priced items with /mac bazaar trader initprice
	/declare InitialPrice		int 	outer	1000
| - Default values for creation of ini file /mac bazaar makeini
| - Sell price updates will ignore variables if set 1 (default) in ini file
	/declare SellPriceMin 		int 	outer	100
	/declare SellPriceMax 		int 	outer	1
	/declare BuyPriceMin 		int 	outer	1
	/declare BuyPriceMax		int 	outer	1
| - Use Tribute Values as minimum sale prices.  Set UseTrib to 0 to ignore tribute and 1 (default) to use tribute.
| - If you use tribute as a minimum price, it will set the SellPriceMin to the Tribute Value in the ini file.
	/declare UseTrib			int		outer	1

	
|-------------------------------------------------------------|
| Things you dont Need to worry about
|-------------------------------------------------------------|
	/declare looptimer 		int 	local
	/declare slot 			int 	local
	/declare dupecheck		int 	local
	/declare itemname 		string 	local
	/declare result 		int 	local
	/declare stddev 		int 	local
	/declare itemsfound 	int 	local
	/declare pricetotal 	int 	local
	/declare avgprice 		int 	local
	/declare minprice 		int 	local
	/declare avgdev 		int 	local
	/declare devhigh 		int 	local
	/declare quartprice 	int 	local
	/declare maxprice 		int 	local
	/declare price 			int 	local
	/declare fairprice 		int 	local
	/declare targetprice 	int 	local
	/declare newtargetprice int 	local
	/declare PlatVal 		int 	local
	/declare targetstr 		string 	local
	/declare merchType 		int 	local 0
	/declare merchString 	string 	local 0
	/declare minSellPrice 	int 	local
	/declare maxSellPrice 	int 	local
	/declare Excludelist 	string 	outer ${Me.Name},${Ini[bazaar.ini,Excludes,ExcludeList,NOT_FOUND]}
	/declare dontReprice int local 0
	/if (!${Ini[bazaar.ini,Excludes,ExcludeList].Length}) /ini bazaar.ini "Excludes" "ExcludeList" "name1,name2,name3,name4"
	
	| - INITPRICE SETUP
	/if (${Defined[Param1]}) {
		/if (${Param1.Equal[initprice]}) {
			/echo Initiating prices on new items.
			/call TraderSetup
		}
	}
	
:mainloop
	/varset looptimer ${UpdateInterval}
	/echo Starting Auto-update...
	/if (${Defined[Param0]}) {
		/if (${Param0.Equal[makeini]}) {
			/echo Initiating ini file check
			/call MakeIni
			/echo Done checking/updating ini file
			/end
		}
		/if (${Param0.Equal[trader]}) {
			/varset merchType 1
			/varset merchString ""
			/echo Auto-Updating Trader Prices.
		} else /if (${Param0.Equal[buyer]}) {
			/varset merchType 2
			/echo Auto-Updating Buyer Prices.
		}
	}
	/if (${merchType}==0) {
		/echo Invalid Usage: /mac bazaar trader | /mac bazaar buyer.
		/endmac
	}
	/if (${merchType}==1) {
	/call TraderStatus Off
	:OpenBazaarAgain
		/bazaar
		/echo Opening Bazaar Window.
		/delay 2s ${Window[BazaarSearchWnd].Open}
		/if (!${Window[BazaarSearchWnd].Open}) /goto :OpenBazaarAgain
		/notify BazaarSearchWnd BZR_UpdatePlayerButton leftmouseup
		/echo Updating Current Traders...
		/delay 2s
	} else {
		/call Barter_Main
	}
	/varset slot -1
:nextslot
	/call ResetItemName
	/if (!${Window[BazaarWnd].Open}) /end
	/delay 5
	/varcalc slot ${slot}+1
	/if (${slot}>99) /goto :donewithslots
	/notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
	/if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /goto :donewithslots
	/if (!${Window[BazaarWnd].Child[BZW_SetPrice_Button].Enabled}) /goto :nextslot 
	/if (!${Window[BazaarWnd].Child[BZW_Clear_Button].Enabled}) /goto :nextslot
	/varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
	/delay 10
:SearchBazaarAgain
	/echo Searching bazaar for item (${itemname}).
	/call SetItemName "${itemname}"
	/call MakeQuery
	/delay 5s ${Bazaar.Done}
	/if (!${Bazaar.Done}) /goto :SearchBazaarAgain
	/if (!${Bazaar.Count}) /goto :nextslot
	/varset itemsfound 0
	/varset pricetotal 0
	/varset minprice 9999999999
	/varset maxprice 0
	/varset minSellPrice 0
	/varset maxSellPrice 9999999999   
	/varset dontReprice 0
	/for result 1 to ${Bazaar.Count} 
		/if (${Bazaar.Item[${result}].Name.Equal[${itemname}]} && !${Spawn[${Bazaar.Item[${result}].Trader}].Name.Equal[${Me}]}) {    
			/varcalc itemsfound ${itemsfound}+${Bazaar.Item[${result}].Quantity}
			/varcalc pricetotal ${pricetotal}+${Bazaar.Item[${result}].Price}*${Bazaar.Item[${result}].Quantity}
			/if (${Bazaar.Item[${result}].Price}<${minprice}) /varset minprice ${Bazaar.Item[${result}].Price}
			/if (${Bazaar.Item[${result}].Price}>${maxprice}) /varset maxprice ${Bazaar.Item[${result}].Price}
		}
	/next result
	/if (!${itemsfound}) {
      /if (${Ini[bazaar.ini,"${itemname}", SellPriceMax]}) {
			/varset targetstr ${Ini[bazaar.ini,"${itemname}", SellPriceMax]}
			/goto :setPrice
		} else {
			/goto :nextslot
		}
	}
	/varcalc  minprice ${minprice}/1000
	/if (${minprice}==1) /varset minprice 2
	/if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}>=2) {
		/varset minSellPrice ${Ini[bazaar.ini,"${itemname}",SellPriceMin]}
	}
 
	
	/if (${Ini[bazaar.ini,"${itemname}",SellPriceMax]}>=2) {
		 /varset maxSellPrice ${Ini[bazaar.ini,"${itemname}",SellPriceMax]}
	}
	/if (${minprice}*0.99<${minSellPrice}) {
		/varset targetstr ${minSellPrice}
		/echo ${itemname} is being sold for ${minprice}, but your minimum is ${minSellPrice}.
		/goto :setPrice
	}
	/if (${minprice}*0.99>${maxSellPrice}) {
		/varset targetstr ${maxSellPrice}
		/goto :setPrice
	}
	/if (${minprice}<500000 && ${minprice}>0) {
		/if (${minprice}<100) {
			/varset targetstr ${Math.Calc[${minprice}-1]}
		} else {
			/varcalc targetstr ${Int[${Math.Calc[ ${minprice}*0.99/25 ]}]}*25
		}
		/varset targetprice ${targetstr}
		/varset targetstr ${Int[${targetstr}]}
	:setPrice
		/if (!${targetstr.Equal[${Window[BazaarWnd].Child[BZW_Money0].Text}]}) {
			/echo --- Repricing ${itemname} from (${Window[BazaarWnd].Child[BZW_Money0].Text}) to (${targetstr}).
			:openqtywndagain
				/notify BazaarWnd BZW_Money0 leftmouseup
				/delay 2s
			/if (!${Window[QuantityWnd].Open}) /goto :openqtywndagain
			/delay 1
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/keypress backspace chat
			/delay 1
			/for PlatVal 1 to ${targetstr.Length}
			/keypress ${targetstr.Mid[${PlatVal},1]} chat
			/next PlatVal
			/notify QuantityWnd QTYW_Accept_Button leftmouseup
			/delay 1
			/notify BazaarWnd BZW_SetPrice_Button leftmouseup
			/delay 1
		}
	}
	/goto :nextslot
:donewithslots
	/call TraderStatus On
:cycleloop
	/if (${UpdateSpam}) /echo *** ${looptimer} minutes until next price check/update. ***
	/call CloseBazSrchWnd
	/if (${AnnounceOn} && ${looptimer}==${UpdateInterval}) /call Announcement
	/if (${UpdateOn} && ${looptimer}<=0) /goto :mainloop
	/varset looptimer ${Math.Calc[${looptimer}-5]}
	/delay 5m
	/if (${UpdateOn}) /goto :cycleloop
	/echo ending macro
	/call EndMacro
/return

|-------------------------------------------------------------|
| Sub Barter_Main
|-------------------------------------------------------------|
Sub Barter_Main
	/declare merchType int local 0
	/declare merchString string local 0
	/declare minBuyPrice int local
	/declare maxBuyPrice int local
	/declare BuyItemSlot int local 0
	/declare ItemName string local 0
:OpenBuyerAgain
	/echo Opening Buy Window.
	/buy
	/delay 1s ${Window[BarterWnd].Open}
	/if (!${Window[BarterWnd].Open}) /goto :OpenBuyerAgain
:OpenBarterAgain
	/barter
	/echo Opening Barter Window.
	/delay 2s ${Window[BarterSearchWnd].Open}
	/if (!${Window[BarterSearchWnd].Open}) /goto :OpenBarterAgain
:startLoop
	/for BuyItemSlot 1 to 100
		/if (${Window[BarterWnd].Child[BTR_BuyLineList].List[${BuyItemSlot}].Length}>0) {
			/varset ItemName ${Window[BarterWnd].Child[BTR_BuyLineList].List[${BuyItemSlot},3]}   
			/varset minBuyPrice ${Ini[bazaar.ini,${ItemName}, BuyPriceMin]}
			/varset maxBuyPrice ${Ini[bazaar.ini,${ItemName}, BuyPriceMax]}
			/call UpdateBuyer "${ItemName}" ${minBuyPrice} ${maxBuyPrice}
		}
	/next BuyItemSlot
	/echo ending macro
	/call EndMacro	
/return

|-------------------------------------------------------------|
| Sub UpdateBuyer
|-------------------------------------------------------------|
Sub UpdateBuyer(String name, int min, int max)
	/declare loopVar int local 0
	/declare loopVarMax int local 0
	/declare maxFoundPrice int local ${min}
	/declare searchResult string local
	/declare found int local 0
	/declare seller string local
	/declare inSlot int local 0
	/notify BarterSearchWnd BTRSRCH_ItemSearchEdit leftmouseup
	/delay 1s
	/shiftkey /keypress end chat
	/delay 1s
	/varset loopVarMax ${Window[BarterSearchWnd].Child[BTRSRCH_ItemSearchEdit].Text.Length}
	/for loopVar 1 to ${loopVarMax}
		/keypress backspace chat
	/next loopVar
	/for loopVar 1 to ${name.Length}
		/if (${name.Mid[${loopVar},1].Equal[" "]}) {
			/keypress space chat
		} else {
			/keypress ${name.Mid[${loopVar},1]} chat
		}
	/next loopVar
	/keypress enter chat
	/delay 3s
	| - Find Max Buy Price
	/for loopVar 1 to 200
		/varset searchResult ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},2]}
		/varset searchResult ${searchResult.Mid[1, ${Math.Calc[${searchResult.Find["("]}-1]}]}
		/if (${searchResult.Length}==0) /goto :EndLoop
		/varset seller ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},4]}
		/if (${searchResult.Equal[${name}]} && (${seller.NotEqual[${Me.Name}]} || !${Excludelist.Find[${seller}]})) {
			| Item match, get max plat value
			/varset found ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},3]}
			/if (${found}>${maxFoundPrice}) /varset maxFoundPrice ${found}
		}
	/next loopVar
:EndLoop
	/if (${maxFoundPrice}!=${min}) {
		/if (${maxFoundPrice}<100) {
			/varcalc maxFoundPrice ${maxFoundPrice}+1
		} else /if (${maxFoundPrice}<5000) {
			/varcalc maxFoundPrice ${maxFoundPrice}+5
		} else {
			/varcalc maxFoundPrice ${maxFoundPrice}*1.001
			/varcalc maxFoundPrice ${Int[${Math.Calc[${maxFoundPrice}/5]}]}*5
		}
	}
	/if (${maxFoundPrice}>${max}) {
		/echo Want to set ${name} to ${maxFoundPrice}, but your maximum is ${max}.
		/varset maxFoundPrice ${max}
	}
	/varset inSlot ${Window[BarterWnd].Child[BTR_BuyLineList].List[=${name},3]}
	/if (${maxFoundPrice} != ${Int[${Window[BarterWnd].Child[BTR_BuyLineList].List[${inSlot},5]}]} ) {
		/call SetPrice ${maxFoundPrice} "${name}"
	}
/return

|-------------------------------------------------------------|
| Sub SetPrice
|-------------------------------------------------------------|
Sub SetPrice(string price, string name)
	/echo Setting price of ${name} to ${price}.
	/declare listID int ${Window[BarterWnd].Child[BTR_BuyLineList].List[=${name},3]}
	/declare PlatVal int 0
	/notify BarterWnd BTR_BuyLineList listselect ${listID}
	/delay 5
	/notify BarterWnd BTR_BuyLineList leftmouse ${listID}
	/delay 5
	/notify BarterWnd BTR_CompensationPlat leftmouseup
	/delay 1
:delete
	/keypress backspace chat
	/if (${Window[QuantityWnd].Child[QTYW_SliderInput].Text.Length}) /goto :delete
	/delay 1
	/for PlatVal 1 to ${price.Length}
	/keypress ${price.Mid[${PlatVal},1]} chat
	/next PlatVal
	/notify QuantityWnd QTYW_Accept_Button leftmouseup
	/delay 1
	/notify BarterWnd BTR_BuyLineModifyButton leftmouseup
/return

|-------------------------------------------------------------|
| Sub TraderStatus
|-------------------------------------------------------------|
Sub TraderStatus(string OnOff)
	/if (!${Me.Trader}) {
		/delay 1s
	:OpenBazaarWnd
		/if (!${Window[BazaarWnd].Open}) /trader
		/delay 1s (${Window[BazaarWnd].Open})
		/if (!${Window[BazaarWnd].Open}) /goto :OpenBazaarWnd
		/delay 1s
		/if (${OnOff.Equal[On]}) {
			/notify BazaarWnd BZW_Start_Button LeftMouseUp
			/delay 1s
			/echo Tradermode ON.
		}
	}
	/if (${OnOff.Equal[Off]}) {
		/notify BazaarWnd BZW_End_Button LeftMouseUp
		/delay 1s
		/echo Tradermode OFF.
	}
	/delay 1s
/return

|-------------------------------------------------------------|
| Sub TraderSetup - Sets unpriced items to defind ${InitialPrice} amount of plat
|-------------------------------------------------------------|
Sub TraderSetup
	/declare slot int local
	/declare itemname string local
	/declare PlatVal int local
	/declare targetstr string local ${InitialPrice}
	/declare curprice string local   
	/echo Setting unpriced items to default price of (${targetstr}) pp.
:OpenTraderAgain
	/echo Opening Trade Window.
	/trader
	/delay 1s ${Window[BazaarWnd].Open}
	/if (!${Window[BazaarWnd].Open}) /goto :OpenTraderAgain
	/varset slot -1
:nextslot
	/varcalc slot ${slot}+1
	/if (${slot}>99) /goto :donewithslots
	/notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
	/varset curprice ${Window[BazaarWnd].Child[BZW_Money0].Text}
	/if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /goto :donewithslots
	/if (!${Window[BazaarWnd].Child[BZW_SetPrice_Button].Enabled}) /goto :nextslot
	/varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
	/delay 1s
	/if (${curprice}==0) {
		/echo Price not set for item (${itemname}).
		:setPrice
		/echo --- Repricing ${itemname} from ${Window[BazaarWnd].Child[BZW_Money0].Text} to ${targetstr}.
		:openqtywndagain
		/notify BazaarWnd BZW_Money0 leftmouseup
		/delay 2s
		/if (!${Window[QuantityWnd].Open}) /goto :openqtywndagain
		/delay 1
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/keypress backspace chat
		/delay 1
		/for PlatVal 1 to ${targetstr.Length}
		/keypress ${targetstr.Mid[${PlatVal},1]} chat
		/next PlatVal
		/delay 1
		/notify QuantityWnd QTYW_Accept_Button leftmouseup
		/delay 1
		/notify BazaarWnd BZW_SetPrice_Button leftmouseup
		/delay 1
	} else {
		/echo Price set to: (${curprice} pp), skipping price init.
	}
	/goto :nextslot
:donewithslots
	/call CloseBazSrchWnd   
/return

|-------------------------------------------------------------|
| Sub CloseBazSrchWnd
|-------------------------------------------------------------|
Sub CloseBazSrchWnd
	:CloseBazaarSearchWnd
		/if (${Window[BazaarSearchWnd].Open}) /keypress TOGGLE_BAZAARSEARCHWIN
		/delay 2s (!${Window[BazaarSearchWnd].Open})
	/if (${Window[BazaarSearchWnd].Open}) /goto :CloseBazaarSearchWnd
/return

|-------------------------------------------------------------|
| Sub MakeIni
|-------------------------------------------------------------|
Sub MakeIni
	/declare slot	  		int		local -1
	/declare SellValue	 	string 	local
	/declare l 				int  	local
	/declare p 				string  local
	/declare g 				string 	local
	/declare s 				string 	local
	/declare c 				string 	local	
	/declare itemname 		string 	local
	/declare minpricecheck 	int  	local
:OpenBazaarWnd
	/if (!${Window[BazaarWnd].Open}) /trader
	/delay 1s (${Window[BazaarWnd].Open})
	/if (!${Window[BazaarWnd].Open}) /goto :OpenBazaarWnd
:nextslot
	/varcalc slot ${slot}+1
	/varset l 0
	/varset c 
	/varset s 
	/varset g 
	/varset p 
	/varset minpricecheck 0

	/if (${slot}>99) /return
	/notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
	/if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /return
	/varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
	/delay 1s
	/varset SellValue ${FindItem[${itemname}].Value}
|___________________________________________________________________
|Tribute use calculation	
	/if (${UseTrib}==1 && ${FindItem[${itemname}].Tribute}>${SellValue}) {
		/varset SellValue ${FindItem[${itemname}].Tribute}
		/echo The minimum price for ${itemname} is being set at ${SellValue} to match tribute value.
		}
|___________________________________________________________________  
	
	/if (${Ini[bazaar.ini,"${itemname}", SellPriceMin]}) {
		/varset l ${SellValue.Length}
		/varcalc minpricecheck ${SellValue}/1000
		/echo ${minpricecheck}
		/echo Entry already exists for ${itemname}.
		/if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}<=${minpricecheck}) {
			/echo ${itemname} ini SellPriceMin=${SellPriceMin} is lower than Sell to Vendor Price. Resetting to ${minpricecheck}
			/ini bazaar.ini "${itemname}" "SellPriceMin" ${minpricecheck}
		}
		/goto :nextslot
	}
	/echo No entry found for ${itemname} so creating one.
	/ini bazaar.ini "${itemname}" "SellPriceMin" 	${SellPriceMin}
	/ini bazaar.ini "${itemname}" "SellPriceMax" 	${SellPriceMax}
	/ini bazaar.ini "${itemname}" "BuyPriceMin" 	${BuyPriceMin}
	/ini bazaar.ini "${itemname}" "BuyPriceMax" 	${BuyPriceMax}
	/if (${SellValue}>0) {
		/varset l ${SellValue.Length}
		/if (${SellValue.Right[1]}>0) /varset c ${SellValue.Right[1]}cp
		/if (${SellValue.Mid[${Math.Calc[${l}-2]},1]}>0) /varset s "${SellValue.Mid[${Math.Calc[${l}-2]},1]}sp "
		/if (${SellValue.Mid[${Math.Calc[${l}-3]},1]}>0) /varset g "${SellValue.Mid[${Math.Calc[${l}-3]},1]}gp "
		/if (${SellValue.Left[${Math.Calc[${l}-3]}]}>0) /varset p "${SellValue.Left[${Math.Calc[${l}-3]}]}pp "
		/if (${SellValue.Left[${Math.Calc[${l}-3]}]}>0) /varset minpricecheck ${SellValue.Left[${Math.Calc[${l}-3]}]}
	} 
	/if (${SellValue}>0) /ini bazaar.ini "${itemname}" "VendorPrice" 	${p}${g}${s}${c}
	/if (${SellValue}==0) /ini bazaar.ini "${itemname}" "VendorPrice" 0
	/if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}<=${minpricecheck}) {
		/echo ${itemname} ini SellPriceMin=${SellPriceMin} is lower than Sell to Vendor Price. Resetting to ${minpricecheck}
		/ini bazaar.ini "${itemname}" "SellPriceMin" ${minpricecheck}
	}
	/goto :nextslot
/return 

|-------------------------------------------------------------|
| Sub Announcement
|-------------------------------------------------------------|
Sub Announcement
	/if (${AnnounceOn}) /${AnnounceWhere} ${AnnounceMessage} 
/return

|-------------------------------------------------------------|
| Sub  EndMacro
|-------------------------------------------------------------|
Sub EndMacro
	/call CloseBazSrchWnd
	/if (${AnnounceOn}) /call Announcement
	/echo ending macro really
	/endmac
/return
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

Oops I have I release I forgot to upload since my last one.

V 1.08 03/04/2011
~ Removed all orphaned code left over from updatebazaarprices.mac.
~ Heavily commented Trader Section
~ Jumped duplicate item check code back in from updatebazaarprices.mac
~ Cleaned up and made /echo statements more consistent.
~ Added code to detect commas (,) in item name and skip entry to prevent macro crashing.
~ Will now match ini file minimum sell price if within 25pp of adjusted sell price because marco rounds down to nearest 25pp price when undercutting prices over 100 pp.
~ Fixed macro not recognizing if min sell price for was below sell to vendor price.
~ Removed all buttons .Enabled code seems mq2 no longer recognizes button states correctly.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

still crashing on awnfire, Morning star of light and Torn, Frost covered book. I know you mentioned something about the commas.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

still crashing on awnfire, Morning star of light and Torn, Frost covered book. I know you mentioned something about the commas.

Did you download 1.08 from the first post? I was testing it with Dawnfire.
What part is is it crashing on? makeini, initprice or just the reg price update?
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

I just copied and paste the code from 3 posts above. I downloaded it now and it is version 1.08 now it was still 1.07 It should be ok now thanks!
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

I just copied and paste the code from 3 posts above. I downloaded it now and it is version 1.08 now it was still 1.07 It should be ok now thanks!

That copy is a revised 1.07 by dragonfire for tribute items. He was working out an issue still. I will try to incorporate his tribute additions after he posts again.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

It will probably be a few weeks before I am able to get into the items that have tribute value but no vendor value issue. It is not something that I have seen a problem with but just one of those "something doesn't feel right about this" feelings. Otherwise the code seems to be working without a hitch but I don't have any items with commas, so I haven't seen that problem. Thanks for posting the update Maskoi. My post DOES NOT include your corrections.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

It will probably be a few weeks before I am able to get into the items that have tribute value but no vendor value issue. It is not something that I have seen a problem with but just one of those "something doesn't feel right about this" feelings. Otherwise the code seems to be working without a hitch but I don't have any items with commas, so I haven't seen that problem. Thanks for posting the update Maskoi. My post DOES NOT include your corrections.

I'll check out your tribute additions and see if I can merge them with 1.08
 
Re: Bazaar.mac 1.08 -- updated 03/31/2011

Hi Maskoi ^_^ ! Would there be a way to output to either txt or in the mq2 or someplace visible what sales were done with a timestamp at what price & quantity from who?

After all the price update every now & then the trader window is flooded, beside checking quantities and such you cant reallly see what sold for how much.
 
Re: Bazaar.mac 1.08 -- updated 03/31/2011

Mq2 is not capable of looking inside the Trader window to do that so no BUT EQ logs everthing that goes on in the Trader Window in a file.

In your EQ log folder look for bzlog_server_Toonname.txt

Anything sold looks like
[Mon Mar 28 15:32:04 2011] SomeGuy purchased 1 Lesser Muramite Rune for ( 2325p).
 
Re: Bazaar.mac 1.08 -- updated 03/31/2011

Awesome thanks buddy, I look forward to your new macro ;)
 
Bazaar.mac 1.08.1 -- updated 04/4/2011

This version includes calculations for tribute values to be considered in determining minimum price. There is also an addition to the .ini file of entries that designate the vendor sale value and the tribute value. In the previous version there was a slight error in calculating p g s c variables that set the gold value as the platinum value. That has been adjusted. So far it is running like a champ.

Thanks Maskoi for bringing this up to date and allowing me to add the tribute feature. Variables have been slightly changed to include the tribute.



Rich (BB code):
| ************************************************************************
|* bazaar.mac version 1.0.8.1
|* Updated by Dragonfire 4/4/2011         
|* Updated by Maskoi 03/04/2011                     
|* Auto-Update Bazaar Prices                 
|*                           
|* Special thanks to:                     
|* - Sparr for the original updatebazaarprices.mac
|* - ebs2002 for the original bazaar.mac
|* - jpetrone for create ini file code.         
|* - M.D. for updating it     
|* - dkaa for bazaar.inc after /bzsrch died
|* - TreeHuginDruidUpdated added TraderSetup routine 10/26/2007
|* - nytemyst for ExcludeList ini file entry     
|* - Maskoi updated for HoT 01/19/2011       
|* - Dragonfire added calculations for tribute included with additions to the .ini file of tribute value and vendor sell values. 4/4/2011
| ************************************************************************
|* Summary:                       
|*                           
|* This macro is used to automatically update the prices of your   
|* buyer or trader to remain competitive.           
|*                           
|* It also contains INI support to allow you to set minimum and maximum
|* prices which your merchants will not pass           
| ************************************************************************
|* Usage:                       
|* /mac bazaar trader                     
|* updates your /trader                     
|*                           
|* /mac bazaar buyer                     
|* updates your buyer
|*
|* /mac bazaar trader initprice
|* Sets all unpriced items in Bazaar/Trader Window to InitialPrice variable (default 1000)
|*
|* /mac bazaar makeini
|* To create an entry for each item shown in your trader window in the Bazaar.ini.               
|*                           
|* INI format:                       
|* bazaar.ini:                       
|* [Metallic Drake Scales]                 
|* SellPriceMin=20                    
|* SellPriceMax=30000                     
|* BuyPriceMin=10000                     
|* BuyPriceMax=20000                     
|* VendorValue=20000   (For reference only)
|* TributeValue=0      (For reference only)
|* TraderPrice=20pp 5gp (For reference only)

| ************************************************************************

#include bazaar.inc

Sub Main
|-------------------------------------------------------------|
| Edit your variables
|-------------------------------------------------------------|
| - Set AnnounceOn to 1 for AnnounceMessage after prices updated (default off)
| - AnnounceWhere set the channel you want AnnounceMessage no / needed i.e. auction or ooc
| - If UpdateOn=1 maqcro will AnnounceMessage every UpdateInterval (default 90 min)
    /declare AnnounceOn         int         outer   0
    /declare AnnounceWhere      string      outer   ooc
    /declare AnnounceMessage    string      outer   Old trader back up! 
| - Set UpdateOn to 1 to update prices every UpdateInterval (default 90 min)
| - Set UpdateOn to 0 update prices just once then end macro
| - Set UpdateSpam to 1 to /echo countdown every 5 min until next price update
    /declare UpdateOn            int         outer   1
    /declare UpdateInterval      int         outer   90
    /declare UpdateSpam          int         outer   1
| - Variable to set no priced items with /mac bazaar trader initprice
    /declare InitialPrice        int         outer   1000
| - Default values for creation of ini file /mac bazaar makeini
| - Sell price updates will ignore variables if set 1 (default) in ini file
    /declare SellPriceMin        int         outer   10
    /declare SellPriceMax        int         outer   1
    /declare BuyPriceMin         int         outer   1
    /declare BuyPriceMax         int         outer   1
| - Set variable to determine percentage above vendor price or tribute value to set minimum price.
	/declare MinProfit           int         outer   5
| - Set TribUse to 1 if tribute values are to be used in determining minimum prices. Otherwise, use 0.
	/declare TribUse			 int		 outer	 1
|-------------------------------------------------------------|
| Things you dont Need to worry about
|-------------------------------------------------------------|
    /declare looptimer           int         local
    /declare slot                int         local
    /declare dupecheck           int         local
    /declare itemname            string      local
    /declare result              int         local
    /declare itemsfound          int         local
    /declare minprice            int         local
    /declare price               int         local
    /declare PlatVal             int         local
    /declare targetstr           string      local
    /declare merchType           int         local   0
    /declare minSellPrice        int         outer
	/declare maxSellPrice        int         local
    /declare Excludelist         string      outer   ${Me.Name},${Ini[bazaar.ini,Excludes,ExcludeList,NOT_FOUND]}
    /declare dontReprice         int         local   0
    /if (!${Ini[bazaar.ini,Excludes,ExcludeList].Length}) /ini bazaar.ini "Excludes" "ExcludeList" "name1,name2,name3,name4"
| - INITPRICE SETUP
    /if (${Defined[Param1]}) {
        /if (${Param1.Equal[initprice]}) {
            /echo Initiating prices on new items.
            /call TraderSetup
        }
    }
:mainloop
    /varset looptimer ${UpdateInterval}
    /echo Starting Auto-update...
| - If /mac bazaar makeini create/update ini file
    /if (${Defined[Param0]}) {
        /if (${Param0.Equal[makeini]}) {
            /echo Initiating ini file check
            /call MakeIni
            /echo Done checking/updating ini file
            /end
        }
| - If /mac bazaar trader initate trader mode
        /if (${Param0.Equal[trader]}) {
            /varset merchType 1
            /echo Auto-Updating Trader Prices.
| - If /mac bazaar buyer initate buyer mode
        } else /if (${Param0.Equal[buyer]}) {
            /varset merchType 2
            /echo Auto-Updating Buyer Prices.
        }
    }
| - Error control for no commands line option after /mac bazaar
    /if (${merchType}==0) {
        /echo Invalid Usage: /mac bazaar trader | /mac bazaar buyer.
        /endmac
    }
| - Begin trader routine if merchType=1
    /if (${merchType}==1) {
        /call TraderStatus Off
        :OpenBazaarAgain
        /bazaar
        /echo Opening Bazaar Window.
        /delay 2s ${Window[BazaarSearchWnd].Open}
        /if (!${Window[BazaarSearchWnd].Open}) /goto :OpenBazaarAgain
        /notify BazaarSearchWnd BZR_UpdatePlayerButton leftmouseup
        /echo Updating Current Traders...
        /delay 2s
| - Begin barter routine merchType=2
    } else {
        /call BarterMain
    }
| - Set intial slot var to 0
    /varset slot -1
:nextslot
| - Call to bazaar.inc file. Presses reset button in bazaar window
    /call ResetItemName
    /if (!${Window[BazaarWnd].Open}) /end
    /delay 5
| - Increment trader window slot var to next slot #. Slots are 0-99
    /varcalc slot ${slot}+1
    /if (${slot}>99) /goto :donewithslots
| - Click on item in slot#
    /notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
| - If slot is empty skip down to :donewithslots.
    /if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /goto :donewithslots
| - Set itemname to item in current slot
    /varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
    /delay 10
    /if (${itemname.Find[,]}) {
        /echo ${itemname} has a comma in the name, skipping, set manually ...
        /goto :nextslot
    }   
    /echo Searching bazaar for - ${itemname}
| - Check/skip for duplicate items in inventory
    /if (${slot}) {
        /for dupecheck 0 to ${Math.Calc[${slot}-1]}
            /if (${itemname.Equal[${Window[BZW_BazaarSlotsWnd].Child[BZR_BazaarSlot${dupecheck}].Tooltip}]}) {
                /echo * Already priced skipping.
                /goto :nextslot
            }
        /next dupecheck
    }
:SearchBazaarAgain
| - Call to bazaar.inc file. Clicks on and inputs item name to bazaar search window
    /call SetItemName "${itemname}"
| - Call to bazaar.inc file. Click Find Items button
    /call MakeQuery
    /delay 5s ${Bazaar.Done}
| - Check baz window if seacrh is done and has any items
    /if (!${Bazaar.Done}) /goto :SearchBazaarAgain
    /if (!${Bazaar.Count}) /goto :nextslot
| - Set baz var window search pararmeters
    /varset itemsfound 0
    /varset minprice 9999999999
    /varset minSellPrice 0
    /varset maxSellPrice 9999999999   
    /for result 1 to ${Bazaar.Count}
| - Echo Ignore trader if name is found in exclude list
        /if (${Excludelist.Find[${Spawn[${Bazaar.Item[${result}].Trader}].Name}]}>=1) /echo * Exclude List - ${Spawn[${Bazaar.Item[${result}].Trader}].Name} ignoring their price.
| Check if item is for sale and Seller is not me or someone on my exclude list
        /if (${Bazaar.Item[${result}].Name.Equal[${itemname}]} && (${Spawn[${Bazaar.Item[${result}].Trader}].Name.NotEqual[${Me}]} || ${Excludelist.Find[${Spawn[${Bazaar.Item[${result}].Trader}].Name}]}>=1)) {   
| Set itemsfound var - how many items are for sale
            /varcalc itemsfound ${itemsfound}+${Bazaar.Item[${result}].Quantity}
| Set min/max prices to highest and lowest found in search
            /if (${Bazaar.Item[${result}].Price}<${minprice}) /varset minprice ${Bazaar.Item[${result}].Price}
        }
   /next result
| If baz search returns 0 items in search check ini file for SellPriceMax
    /if (!${itemsfound}) {
| if SellPriceMax higher than 1 (default) set targetstr to ini sell max price else skip to next item
        /if (${Ini[bazaar.ini,"${itemname}", SellPriceMax]}>1) {
            /varset targetstr ${Ini[bazaar.ini,"${itemname}", SellPriceMax]}
            /goto :setPrice
        } else {
            /goto :nextslot
        }
    }
| Divide lowest price found by 1000 to convert to plat, mq2 price format is pgsc so 3pp=3000
| If ${Bazaar.Item[${result}].Price} is 160pp mq2 shows it as 160000. 160000/1000=160
    /varcalc  minprice ${minprice}/1000
| if minprice =1 i.e lowest price found was 1 pp varccalc rounds down set minprice to 2
    /if (${minprice}==1) /varset minprice 2
| Set minSellPrice to ini file SellPriceMin if exists and not default (1)
    /if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}>1) {
        /varset minSellPrice ${Ini[bazaar.ini,"${itemname}",SellPriceMin]}
    }
| Set maxSellPrice to ini file SellPriceMax if exists and not default (1)
    /if (${Ini[bazaar.ini,"${itemname}",SellPriceMax]}>1) {
        /varset maxSellPrice ${Ini[bazaar.ini,"${itemname}",SellPriceMax]}
    }
| If lowest price found is less that ini file SellPriceMin skip changing price
    /if (${minprice}*0.99<${minSellPrice}) {
        /varset targetstr ${minSellPrice}
        /echo * Selling price ${minprice}, but your minimum is ${minSellPrice}.
        /goto :setPrice
    }
| If lowest price found is greater than ini maxSellPrice set var to maxSellPrice
    /if (${minprice}*0.99>${maxSellPrice}) {
        /varset targetstr ${maxSellPrice}
        /goto :setPrice
    }
| If lowest price found is between 1 and 499999 continue
    /if (${minprice}<500000 && ${minprice}>0) {
| If lowest price found is below 100 pp set var to lowest price found -1
        /if (${minprice}<100) {
            /varset targetstr ${Math.Calc[${minprice}-1]}
        } else {
| If lowest price found > 100 pp set var to round down price to neareast 25pp increment 
            /varcalc targetstr ${Int[${Math.Calc[ ${minprice}*0.99/25 ]}]}*25
| Set min price to ini file setting if within 25p of adjusted min price
            /if (${Float[${targetstr}].Int}<${minSellPrice} && ${minSellPrice}-${Float[${targetstr}].Int}<25) /varset targetstr ${minSellPrice}
        }
        /varset targetstr ${Int[${targetstr}]}
        :setPrice
| If item pp price doesn't match ${targetstr} var reprice item
        /if (!${targetstr.Equal[${Window[BazaarWnd].Child[BZW_Money0].Text}]}) {
            /echo * Repricing ${itemname} from (${Window[BazaarWnd].Child[BZW_Money0].Text}) to (${targetstr}).
            :openqtywndagain
| Click on item pp price window
            /notify BazaarWnd BZW_Money0 leftmouseup
            /delay 2s
            /if (!${Window[QuantityWnd].Open}) /goto :openqtywndagain
| Delete any price in open pp window
            /delay 1
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /keypress backspace chat
            /delay 1
| Type in new price
            /for PlatVal 1 to ${targetstr.Length}
            /keypress ${targetstr.Mid[${PlatVal},1]} chat
            /next PlatVal
| Click Accept button
            /notify QuantityWnd QTYW_Accept_Button leftmouseup
            /delay 1
| Click Set Price button
            /notify BazaarWnd BZW_SetPrice_Button leftmouseup
            /delay 1
        }
    }
    /goto :nextslot
:donewithslots
    /call TraderStatus On
:cycleloop
    /if (${UpdateSpam}) /echo *** ${looptimer} minutes until next price check/update. ***
    /call CloseBazSrchWnd
    /if (${AnnounceOn} && ${looptimer}==${UpdateInterval}) /call Announcement
    /if (${UpdateOn} && ${looptimer}<=0) /goto :mainloop
    /varset looptimer ${Math.Calc[${looptimer}-5]}
    /delay 5m
    /if (${UpdateOn}) /goto :cycleloop
    /echo ending macro
    /call EndMacro
/return
|-------------------------------------------------------------|
| Sub Barter Main
|-------------------------------------------------------------|
Sub BarterMain
    /declare merchType int local 0
    /declare minBuyPrice int local
    /declare maxBuyPrice int local
    /declare BuyItemSlot int local 0
    /declare ItemName string local 0
:OpenBuyerAgain
    /echo Opening Buy Window.
    /buy
    /delay 1s ${Window[BarterWnd].Open}
    /if (!${Window[BarterWnd].Open}) /goto :OpenBuyerAgain
:OpenBarterAgain
    /barter
    /echo Opening Barter Window.
    /delay 2s ${Window[BarterSearchWnd].Open}
    /if (!${Window[BarterSearchWnd].Open}) /goto :OpenBarterAgain
:startLoop
    /for BuyItemSlot 1 to 100
    /if (${Window[BarterWnd].Child[BTR_BuyLineList].List[${BuyItemSlot}].Length}>0) {
        /varset ItemName ${Window[BarterWnd].Child[BTR_BuyLineList].List[${BuyItemSlot},3]}   
        /varset minBuyPrice ${Ini[bazaar.ini,${ItemName}, BuyPriceMin]}
        /varset maxBuyPrice ${Ini[bazaar.ini,${ItemName}, BuyPriceMax]}
        /call UpdateBuyer "${ItemName}" ${minBuyPrice} ${maxBuyPrice}
    }
    /next BuyItemSlot
    /echo ending macro
    /call EndMacro   
/return
|-------------------------------------------------------------|
| Sub UpdateBuyer
|-------------------------------------------------------------|
Sub UpdateBuyer(String name, int min, int max)
    /declare loopVar int local 0
    /declare loopVarMax int local 0
    /declare maxFoundPrice int local ${min}
    /declare searchResult string local
    /declare found int local 0
    /declare seller string local
    /declare inSlot int local 0
    /notify BarterSearchWnd BTRSRCH_ItemSearchEdit leftmouseup
    /delay 1s
    /shiftkey /keypress end chat
    /delay 1s
    /varset loopVarMax ${Window[BarterSearchWnd].Child[BTRSRCH_ItemSearchEdit].Text.Length}
    /for loopVar 1 to ${loopVarMax}
    /keypress backspace chat
    /next loopVar
    /for loopVar 1 to ${name.Length}
    /if (${name.Mid[${loopVar},1].Equal[" "]}) {
        /keypress space chat
    } else {
        /keypress ${name.Mid[${loopVar},1]} chat
    }
    /next loopVar
    /keypress enter chat
    /delay 3s   
| - Find Max Buy Price
   /for loopVar 1 to 200
    /varset searchResult ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},2]}
    /varset searchResult ${searchResult.Mid[1, ${Math.Calc[${searchResult.Find["("]}-1]}]}
    /if (${searchResult.Length}==0) /goto :EndLoop
    /varset seller ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},4]}
    /if (${searchResult.Equal[${name}]} && (${seller.NotEqual[${Me.Name}]} || !${Excludelist.Find[${seller}]})) {
| Item match, get max plat value
        /varset found ${Window[BarterSearchWnd].Child[BTRSRCH_BuyLineList].List[${loopVar},3]}
        /if (${found}>${maxFoundPrice}) /varset maxFoundPrice ${found}
    }
    /next loopVar
:EndLoop
    /if (${maxFoundPrice}!=${min}) {
        /if (${maxFoundPrice}<100) {
            /varcalc maxFoundPrice ${maxFoundPrice}+1
        } else /if (${maxFoundPrice}<5000) {
            /varcalc maxFoundPrice ${maxFoundPrice}+5
        } else {
            /varcalc maxFoundPrice ${maxFoundPrice}*1.001
            /varcalc maxFoundPrice ${Int[${Math.Calc[${maxFoundPrice}/5]}]}*5
        }
    }
    /if (${maxFoundPrice}>${max}) {
        /echo Want to set ${name} to ${maxFoundPrice}, but your maximum is ${max}.
        /varset maxFoundPrice ${max}
    }
    /varset inSlot ${Window[BarterWnd].Child[BTR_BuyLineList].List[=${name},3]}
        /if (${maxFoundPrice} != ${Int[${Window[BarterWnd].Child[BTR_BuyLineList].List[${inSlot},5]}]} ) {
        /call SetPrice ${maxFoundPrice} "${name}"
    }
/return
|-------------------------------------------------------------|
| Sub SetPrice
|-------------------------------------------------------------|
Sub SetPrice(string price, string name)
    /echo Setting price of ${name} to ${price}.
    /declare listID int ${Window[BarterWnd].Child[BTR_BuyLineList].List[=${name},3]}
    /declare PlatVal int 0
    /notify BarterWnd BTR_BuyLineList listselect ${listID}
    /delay 5
    /notify BarterWnd BTR_BuyLineList leftmouse ${listID}
    /delay 5
    /notify BarterWnd BTR_CompensationPlat leftmouseup
    /delay 1
:delete
    /keypress backspace chat
    /if (${Window[QuantityWnd].Child[QTYW_SliderInput].Text.Length}) /goto :delete
    /delay 1
    /for PlatVal 1 to ${price.Length}
    /keypress ${price.Mid[${PlatVal},1]} chat
    /next PlatVal
    /notify QuantityWnd QTYW_Accept_Button leftmouseup
    /delay 1
    /notify BarterWnd BTR_BuyLineModifyButton leftmouseup
/return
|-------------------------------------------------------------|
| Sub TraderStatus
|-------------------------------------------------------------|
Sub TraderStatus(string OnOff)
    /if (!${Me.Trader}) {
        /delay 1s
        :OpenBazaarWnd
        /if (!${Window[BazaarWnd].Open}) /trader
        /delay 1s (${Window[BazaarWnd].Open})
        /if (!${Window[BazaarWnd].Open}) /goto :OpenBazaarWnd
        /delay 1s
        /if (${OnOff.Equal[On]}) {
            /notify BazaarWnd BZW_Start_Button LeftMouseUp
            /delay 1s
            /echo Tradermode ON.
        }
    }
    /if (${OnOff.Equal[Off]}) {
        /notify BazaarWnd BZW_End_Button LeftMouseUp
        /delay 1s
        /echo Tradermode OFF.
    }
    /delay 1s
/return
|-------------------------------------------------------------|
| Sub TraderSetup - Sets unpriced items to defind ${InitialPrice} amount of plat
|-------------------------------------------------------------|
Sub TraderSetup
    /declare slot int local
    /declare itemname string local
    /declare PlatVal int local
    /declare targetstr string local ${InitialPrice}
    /declare curprice string local   
    /echo Setting unpriced items to default price of (${targetstr}) pp.
:OpenTraderAgain
    /echo Opening Trade Window.
    /trader
    /delay 1s ${Window[BazaarWnd].Open}
    /if (!${Window[BazaarWnd].Open}) /goto :OpenTraderAgain
    /varset slot -1
:nextslot
    /varcalc slot ${slot}+1
    /if (${slot}>99) /goto :donewithslots
    /notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
    /varset curprice ${Window[BazaarWnd].Child[BZW_Money0].Text}
    /if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /goto :donewithslots
    /varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
    /delay 1s
    /if (${itemname.Find[,]}) {
        /echo ${itemname} has a comma in the name, skipping, set manually ...
        /goto :nextslot
    }
    /if (${curprice}==0) {
        /echo Price not set for item (${itemname}).
        :setPrice
        /echo * Repricing ${itemname} from ${Window[BazaarWnd].Child[BZW_Money0].Text} to ${targetstr}.
        :openqtywndagain
        /notify BazaarWnd BZW_Money0 leftmouseup
        /delay 2s
        /if (!${Window[QuantityWnd].Open}) /goto :openqtywndagain
        /delay 1
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /keypress backspace chat
        /delay 1
        /for PlatVal 1 to ${targetstr.Length}
        /keypress ${targetstr.Mid[${PlatVal},1]} chat
        /next PlatVal
        /delay 1
        /notify QuantityWnd QTYW_Accept_Button leftmouseup
        /delay 1
        /notify BazaarWnd BZW_SetPrice_Button leftmouseup
        /delay 1
    } else {
        /echo Price set to: (${curprice} pp), skipping price init.
    }
    /goto :nextslot
:donewithslots
    /call CloseBazSrchWnd   
/return
|-------------------------------------------------------------|
| Sub CloseBazSrchWnd
|-------------------------------------------------------------|
Sub CloseBazSrchWnd
    :CloseBazaarSearchWnd
        /if (${Window[BazaarSearchWnd].Open}) /keypress TOGGLE_BAZAARSEARCHWIN
        /delay 2s (!${Window[BazaarSearchWnd].Open})
    /if (${Window[BazaarSearchWnd].Open}) /goto :CloseBazaarSearchWnd
/return
|-------------------------------------------------------------|
| Sub MakeIni
|-------------------------------------------------------------|
Sub MakeIni
    /declare slot           int         local   -1
    /declare SellValue      string      local
    /declare l              int         local
    /declare p              string      local
    /declare g              string      local
    /declare s              string      local
    /declare c              string      local
    /declare itemname       string      local
 	/declare calcminprice   int         local
	/declare calcminstring	string      local
	/declare TribValue		string		local
:OpenBazaarWnd
    /if (!${Window[BazaarWnd].Open}) /trader
    /delay 1s (${Window[BazaarWnd].Open})
    /if (!${Window[BazaarWnd].Open}) /goto :OpenBazaarWnd
:nextslot
    /varcalc slot ${slot}+1
    /varset l 0
    /varset c
    /varset s
    /varset g
    /varset p
 	/varset calcminprice 0
	/varset calcminstring 

	

    /if (${slot}>99) /return
    /notify BazaarWnd BZR_BazaarSlot${slot} leftmouseup
    /if (!${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip.Length}) /return
    /varset itemname ${Window[BazaarWnd].Child[BZR_BazaarSlot${slot}].Tooltip}
| - Set the calculation for minimum value string to the vendor sell value.
    /varset calcminstring ${FindItem[${itemname}].Value}
	/delay 5
| - If tribute consideration is chosen, perform a calculation for tribute.
	/if (${TribUse}==1) {
| - Determine if the tribute value is greater than the vendor value and adjust the variable if so.
    /if ((${Math.Calc[${FindItem[${itemname}].Tribute}*1000]}) > ${FindItem[${itemname}].Value}) {
        /varset calcminstring ${Math.Calc[${FindItem[${itemname}].Tribute}*1000]}
		/delay 5
		}
		}
| - Adjust minimum sale value for default minimum.
	/if (${calcminstring}<${Math.Calc[${SellPriceMin}*1000]}) /varset calcminstring ${Math.Calc[${SellPriceMin}*1000]}
| - Include minimum profit
	/varset SellValue ${Math.Calc[${calcminstring}+(${calcminstring}*${MinProfit}/100)]}
| - Set l (letter lower case L) to length of SellValue 
	/varset l ${SellValue.Length}
| - Remove .00 from end of value.
    /varset SellValue ${SellValue.Left[${Math.Calc[${l}-3]}]}
	/delay 5
| - COMMENT OUT THE FOLLOWING LINE AFTER DEBUGGING
| -	/echo ${itemname} TraderPrice ${SellValue} Value ${FindItem[${itemname}].Value} Tribute ${Math.Calc[${FindItem[${itemname}].Tribute}*1000]}

| - Check for the presence of a "," in the name which has caused CTD.
    /if (${itemname.Find[,]}) {
        /echo ${itemname} has a comma in the name, skipping, set manually ...
        /goto :nextslot
    }
| - Creates a string for the minimum price of plat only for the .ini file and checks it against the default.	
	/varset l ${SellValue.Length}
	/varset calcminstring ${SellValue.Left[${Math.Calc[${l}-3]}]}
	/if (${calcminstring}<${SellPriceMin}) /varset calcminstring ${SellPriceMin}

| - Checks if item has an ini SellPriceMin entry
    /if (${Ini[bazaar.ini,"${itemname}"].Length}>=1) {
| - Check to see if min sell price is lower than sell to vendor price
        /if (${Ini[bazaar.ini,"${itemname}",SellPriceMin]}<${calcminstring}) {
            /echo ${itemname} minimum sell price of ${Ini[bazaar.ini,"${itemname}",SellPriceMin]} is less than vendor price or tribute value plus a little profit of ${SellValue}. Updating...
            /ini bazaar.ini "${itemname}" "SellPriceMin" ${calcminstring}
        } else  /echo Entry for ${itemname} exists and has an adequate minimum sale price...skipping.
		/goto :nextslot
    }
| - If there are no entries in the bazaar.ini file.
    /echo Creating entry for - ${itemname}
    /ini bazaar.ini "${itemname}" "SellPriceMin"   ${calcminstring}
    /ini bazaar.ini "${itemname}" "SellPriceMax"   ${SellPriceMax}
    /ini bazaar.ini "${itemname}" "BuyPriceMin"    ${BuyPriceMin}
    /ini bazaar.ini "${itemname}" "BuyPriceMax"    ${BuyPriceMax}
    /ini bazaar.ini "${itemname}" "VendorValue"    ${FindItem[${itemname}].Value}
	/varset TribValue ${Math.Calc[${FindItem[${itemname}].Tribute}*1000]}
	/varset l ${TribValue.Length}
	/ini bazaar.ini "${itemname}" "TributeValue"   ${TribValue.Left[${Math.Calc[${l}-3]}]}
| - SellValue should never be 0 if the default minimum price is greater than 0.
    /if (${SellValue}>0) {
| - Creates sell value based on p g s c
| - Set l to length of SellValue i.e. item trader mininum sell price
        /varset l ${SellValue.Length}
        /if (${SellValue.Right[1]}>0) /varset c "${SellValue.Right[1]}cp "
        /if (${SellValue.Length}==1) /goto :SkipLow
		/if (${SellValue.Mid[${Math.Calc[${l}-1]},1]}>0) /varset s "${SellValue.Mid[${Math.Calc[${l}-1]},1]}sp "
        /if (${SellValue.Length}==2) /goto :SkipLow
        /if (${SellValue.Mid[${Math.Calc[${l}-2]},1]}>0) /varset g "${SellValue.Mid[${Math.Calc[${l}-2]},1]}gp "
        /if (${SellValue.Length}==3) /goto :SkipLow
        /if (${SellValue.Left[${Math.Calc[${l}-3]}]}>0) /varset p "${SellValue.Left[${Math.Calc[${l}-3]}]}pp "
		:SkipLow
		}
    /if (${SellValue}>0)  /ini bazaar.ini "${itemname}" "TraderPrice" ${p}${g}${s}${c}
| - The next line should never happen if the default minimum price is greater than 0.
    /if (${SellValue}==0) /ini bazaar.ini "${itemname}" "TraderPrice" 0

    /goto :nextslot
/return
|-------------------------------------------------------------|
| Sub Announcement
|-------------------------------------------------------------|
Sub Announcement
   /if (${AnnounceOn}) /${AnnounceWhere} ${AnnounceMessage}
/return
|-------------------------------------------------------------|
| Sub  EndMacro
|-------------------------------------------------------------|
Sub EndMacro
   /call CloseBazSrchWnd
   /if (${AnnounceOn}) /call Announcement
   /echo ending macro really
   /endmac
/return
 
Re: Bazaar.mac 1.08.1 -- updated 04/4/2011

There is also an addition to the .ini file of entries that designate the vendor sale value and the tribute value. In the previous version there was a slight error in calculating p g s c variables that set the gold value as the platinum value. That has been adjusted.
Thanks for the awesome update. Will test it this week.

Just curious about the addition above. Was this your version or my version. I added the vendor price code when I first added the ini creation text and it always calculated the right price. My ini file from a while back.

Rich (BB code):
[Excludes]
ExcludeList=toon1,toon2,toon3
[Flayed Skin Sleeves]
SellPriceMin=100
SellPriceMax=1
BuyPriceMin=1
BuyPriceMax=1
VendorPrice=18pp 8gp 
[Trade-In Gem: Protective Confession Rk. II]
SellPriceMin=100
SellPriceMax=1
BuyPriceMin=1
BuyPriceMax=1
VendorPrice=25pp 5gp 
[Trade-In Gem: Hypnotic Stare Rk. II]
SellPriceMin=100
SellPriceMax=1
BuyPriceMin=1
BuyPriceMax=1
VendorPrice=25pp 5gp 
[Trade-In Gem: Autarchian Mindwrack Rk. II]
SellPriceMin=100
SellPriceMax=1
BuyPriceMin=1
BuyPriceMax=1
VendorPrice=25pp 5gp 
[Trade-In Gem: Arcane Disjunction Aura Rk. II]
SellPriceMin=100
SellPriceMax=1
BuyPriceMin=1
BuyPriceMax=1
VendorPrice=22pp 2gp 5sp
 
Re: Bazaar.mac 1.08 -- updated 03/31/2011

I just found a minorflaw in my ini file creation. I am fixing that and I am incorporating your tribute code as I go along.
 
Last edited:
Re: Bazaar.mac 1.09 -- updated 04/06/2011

V 1.09 04/06/2011
Fixed makeini feature - Was incorrectly comparing vendor sell price to ini MinSellPrice if item existed in ini file.

Working on integrating Dragonfires tribute addition's. Look for it in a few days.
 
Re: Bazaar.mac 1.09 -- updated 04/06/2011

I think I fixed that. I made quite a few changes in the variables.

Now that I see what you were actually trying to do it will easy to add the tribute code. I am tied up at the moment trying to get kissassist finished so I can get more people testing it. I should have bazaar mac going by the end of the week.

Your tribute idea is great a feature and will make the bazaar mac very comprehensive.
 
Re: Bazaar.mac 1.09 -- updated 04/06/2011

Hi Maskoi,

About the post above where you posted the .ini file. Notice how the Vendor Price = 22pp 2gp or 25pp 5gp . In both of those, the gp = the last digit of the pp. This was occuring even if the value was 25678. The gp was picking up the wrong place in the string. I fixed that. I added the VendorValue and the TributeValue to the .ini file just so that peeps could look in one place and see what all of their stuff was listed as. It also really helped me with debugging. I hope my comments helped in figuring out what I was trying to do.
 
Re: Bazaar.mac 1.09 -- updated 04/06/2011

Hi Maskoi,

About the post above where you posted the .ini file. Notice how the Vendor Price = 22pp 2gp or 25pp 5gp . In both of those, the gp = the last digit of the pp. This was occuring even if the value was 25678. The gp was picking up the wrong place in the string. I fixed that. I added the VendorValue and the TributeValue to the .ini file just so that peeps could look in one place and see what all of their stuff was listed as. It also really helped me with debugging. I hope my comments helped in figuring out what I was trying to do.

The vendor price is purely for reference and a conversion. The macro never uses or even sees the 25 p 5g price. Prices are in mq2 are in the following format. 0000
p g s c = plat gold silver copper. Gold silver copper are always single digits 0-9 and only the plat is the only multiple digit so 234400 = 234p 4g 0s 0c. The macro calculates total length of the item[].value and always drops off the last 3 digits so 234400 for the plat value so length of 6 -3 starting from the left most digit and dropping the last 3 digits = 234.
 
Re: Bazaar.mac 1.09 -- updated 04/06/2011

Hi Maskoi,

I agree with what you are saying. The 22pp 4gp 6sp 2cp is totally for reference. What I was seeing in 1.08 that I worked on was

Value 25634 was showing 25pp 5gp 3sp 4cp . The gp was picking up the last pp digit.

Rich (BB code):
		/if (${SellValue.Right[1]}>0) /varset c ${SellValue.Right[1]}cp
		/if (${SellValue.Mid[${Math.Calc[${l}-2]},1]}>0) /varset s "${SellValue.Mid[${Math.Calc[${l}-2]},1]}sp "
		/if (${SellValue.Mid[${Math.Calc[${l}-3]},1]}>0) /varset g "${SellValue.Mid[${Math.Calc[${l}-3]},1]}gp "
		/if (${SellValue.Left[${Math.Calc[${l}-3]}]}>0) /varset p "${SellValue.Left[${Math.Calc[${l}-3]}]}pp "
		/if (${SellValue.Left[${Math.Calc[${l}-3]}]}>0) /varset minpricecheck ${SellValue.Left[${Math.Calc[${l}-3]}]}

In the line for sp, I changed that to

${Math.Calc[${l}-1]}

for gp ${Math.Calc[${l}-2]}

for pp ${Math.Calc[${l}-3]}

That seemed to fix the issue. It did not make a whit of difference in the trader but it was bugging me a bit.
 
Re: Bazaar.mac 1.09 -- updated 04/06/2011

Yar my digits were off on the g & s. I am fixing that now. Reference price was wrong but it had no bearing on the auction price because that was working off the correct plat value.

I am going to break that code out in a separate subroutine so I can report the vendor and tribute value in p g s c format.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

V 1.10 04/06/2011
ini file VendorPrice fixed. It was reporting the gp sp values incorrectly. VendorPrice is for quick reference only and has no impact on any auction values.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

Hi, I noticed a couple things

1) if you run makeini and the trader window is not open, it will open the trader window and the macro will end. Running it again will complete the makeini process

2) the exclude list does not seem to be reliable - i have multiple traders with lore items and sometimes they undercut each other so over time it will hit the min price on both of them. One of the items I have seen it happen on is Treasure Hunter's Satchel.

Thanks!
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

Any ideas on the exclude lists? I've noticed that it doesn't really ignore, it's pretty much undercutting even people on the exclude list, so if I have lore items, I have to turn a trader off and run he mac periodically or it will undercut each other until the min price hits...
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

i hope im not the only one that uses this.. but if im not, i also noticed that the mac doesnt set the max price if it doesnt find the item in the bazaar...

like if i set a cloth cap to 100min 1000max and say it was at 500 the previous time I had it running, and when it goes thru and checks prices, if it doesnt find one it will just stay at 500, when it should set it to 1000.

I wish the mac was easier for me to tinker with, but its not...
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

Yea, there's a lot of math involved vice normal if/then logic. That's the issue I ran into when I was editing the version posted on the VIP MQ2 forums.
 
Re: Bazaar.mac 1.07 -- updated 01/21/2011

I never bother with tribute so that never occurred to me.
  • How would tribute value translate into plat?
  • Could you give me some samples of what items in the baz you are talking about and how you would price them?

1 Tribute = 1pp
1pp = 1 Tribute

Although unless they fixed it there is a cheaper way to get tribute atm.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

i hope im not the only one that uses this.. but if im not, i also noticed that the mac doesnt set the max price if it doesnt find the item in the bazaar...

like if i set a cloth cap to 100min 1000max and say it was at 500 the previous time I had it running, and when it goes thru and checks prices, if it doesnt find one it will just stay at 500, when it should set it to 1000.

I wish the mac was easier for me to tinker with, but its not...

I believe the macro only checks to ensure you have the cheapest price. It will not lower the price below you rminuim or raise the price above your max. The min/max is only a limit, there is probable no practical reason to limit teh max price.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

I believe the macro only checks to ensure you have the cheapest price. It will not lower the price below you rminuim or raise the price above your max. The min/max is only a limit, there is probable no practical reason to limit teh max price.

I don't want it to break those limits, but don't you think that it should set the price to your maximum listed (if you have a max set) if there is no competing item available?

Say you are selling Gate pots for 200pp, someone else starts selling 1 for 99pp, so you undercut them to 98pp. They log off, now the rest of the time you are up you are still selling for 98pp.. it should adjust back to the max you set on the next run.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

I don't want it to break those limits, but don't you think that it should set the price to your maximum listed (if you have a max set) if there is no competing item available?

Say you are selling Gate pots for 200pp, someone else starts selling 1 for 99pp, so you undercut them to 98pp. They log off, now the rest of the time you are up you are still selling for 98pp.. it should adjust back to the max you set on the next run.

I would probable agree with you except thats where the min price comes in...

Maybe we can talk teh writter into modification after the Red Planet server is up and running properly.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

I would probable agree with you except thats where the min price comes in...

Maybe we can talk teh writter into modification after the Red Planet server is up and running properly.

You're incorrect, that's not where the min price comes in. The min price sets the limit downward the macro will automatically undercut the competition. This avoids the crappy situation of someone logging in and attempting to game the system by putting an item up for WAAAAY under the value to see if you undercut them again. I've personally seen it done to people after noticing a few who set the macro to cycle way too frequently.

The max price (in one of the original versions on the MQ2 VIP site) would allow you to set a value that your macro would set if you were the only seller of an item online. It worked for a while, but I noticed it was broken somehow when I was still playing the bazaar game (I don't anymore).

I did laugh a little at the last line.
 
Re: Bazaar.mac 1.10 -- updated 04/06/2011

Seems I expressed myself incorrectly... The min price limits how far down you will follow the compitition. It someone comes in and significantly undercuts your price, min price prevents you from selling at a loss....

I expect it also keeps two or more peeps running the macro fro driving the price to zero... lol

It probable wouldn't be that hard to raise the price to your max if no one else was selling the item......
 
Bazaar.mac 2.0 -- updated 12/04/2012

Users who are viewing this thread

Back
Top
Cart