azerothcore / mod-ah-bot

AHBot for AzerothCore
http://azerothcore.org/
70 stars 82 forks source link

Bug: Bot Purchase Frequency #109

Open Trus3683 opened 2 weeks ago

Trus3683 commented 2 weeks ago

Current Behaviour

Bot does not appear to be buying auctions very often. Items are undercut from bot prices, usually very generously, but still nothing is purchased. Unknown - Is there a setting in the config that would adjust for this?

Prior to the most recent logic updates, bot was purchasing almost too many things from the auction house.

Expected Behaviour

Bot should purchase auctions, or there should be a setting to determine how many auctions are purchased.

Steps to reproduce the problem

  1. Post auction.
  2. No purchase.

Extra Notes

N/A

AC rev. hash/commit

N/A

Operating system

Windows 11

Custom changes or Modules

No response

kewinrausch commented 2 weeks ago

You have to setup the buyerbidsperinterval value present into the mod_auctionhousebot table for the desired auction house. The default is set to buy one element per minute less or more.

Trus3683 commented 2 weeks ago

You have to setup the buyerbidsperinterval value present into the mod_auctionhousebot table for the desired auction house. The default is set to buy one element per minute less or more.

Hello, I changed the value to 10 and it doesn't seem to have done anything - Is there anything else? Before, the bot was buying things like crazy and I didn't modify any data elements.

kewinrausch commented 1 week ago

I would say you have to enable the TRACE_BUYER setting it to 1 and monitor what is happening, or eventually setup the DEBUG_BUYER and see what the system is telling you. Can you also share the config file and the table content so I can take a look on the configuration situation?

danielcoh92 commented 1 week ago

I have found out that the buyer function only works if you give a character GUID for "AuctionHouseBot.GUID" parameter Otherwise, nothing happens. I tried all use-cases I could think of and this is the only way to make the buyer function work for me.

Trus3683 commented 1 week ago

I have found out that the buyer function only works if you give a character GUID for "AuctionHouseBot.GUID" parameter Otherwise, nothing happens. I tried all use-cases I could think of and this is the only way to make the buyer function work for me.

I have AuctionHouseBot.GUID set to 0 so that I can utilize multiple characters for the Auctionhouse. The account GUID is set properly and multiple bots are also posting properly, just not purchasing frequently.

Trus3683 commented 1 week ago

I would say you have to enable the TRACE_BUYER setting it to 1 and monitor what is happening, or eventually setup the DEBUG_BUYER and see what the system is telling you. Can you also share the config file and the table content so I can take a look on the configuration situation? mod_ahbot.txt Config file provided. How would I provide the table content?

kewinrausch commented 1 week ago

It exists a block in the Buy routine that does not allow the bots to buy stuff from another bot. Maybe this is what you are experiencing. To avoid generating noise on the market right now bots offers lot of auctions to players and consume only players auctions, since they exists only to supports players on low population servers.

To provide the table content, you can simply copy and paste the select * from mod_auctionhousebot; SQL command in a txt file and post it here.

Trus3683 commented 1 week ago

ahbot.txt Does this work? Thanks!

kewinrausch commented 1 week ago

If you see the content of the data you provided to me you will see that buyerbidsperinterval is set to 10, which means that around every minute (buyerbiddinginterval) the bot will try to bid for 10 auctions (bid does not mean buy, it just offers something and when the auction expire the bot will win if it's the last bidder).

Of this 10 attempts, the bots will NOT bid for auctions of other bots, or if the given offers are outside its bidding limits (the bot will not buy that raptor flesh for 5000 golds). There are lot of variables to take into account. For example it depends if it has to look for buy or sell standard prices, and if these standard prices are specified (some objects present into the market could have no prices specified into the database, like for some enchanting reagents).

To sum up: it will BID (sometime BUY) items with a standard price specified offered within a reasonable delta of that price, that do not belong to other bots.

Trus3683 commented 1 week ago

If you see the content of the data you provided to me you will see that buyerbidsperinterval is set to 10, which means that around every minute (buyerbiddinginterval) the bot will try to bid for 10 auctions (bid does not mean buy, it just offers something and when the auction expire the bot will win if it's the last bidder).

Of this 10 attempts, the bots will NOT bid for auctions of other bots, or if the given offers are outside its bidding limits (the bot will not buy that raptor flesh for 5000 golds). There are lot of variables to take into account. For example it depends if it has to look for buy or sell standard prices, and if these standard prices are specified (some objects present into the market could have no prices specified into the database, like for some enchanting reagents).

To sum up: it will BID (sometime BUY) items with a standard price specified offered within a reasonable delta of that price, that do not belong to other bots.

What do I do to increase the frequency that the bot will BUY items? As mentioned before, it is buying significantly less frequently than it has in the past.

kewinrausch commented 1 week ago

The buy mechanism will buy if the price chosen for the bid is high enough. Try to put larger values for the minbidpriceXXX and maxbidpriceXXX fields in the database; this should make the bot more generous and allocate larger sum to bet. If the sum is large enough it will perform a straight buyout instead of a bid. That and increasing buyerbidsperinterval should do the job.