Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Bot Purchase Frequency #109

Open
Trus3683 opened this issue Sep 28, 2024 · 12 comments
Open

Bug: Bot Purchase Frequency #109

Trus3683 opened this issue Sep 28, 2024 · 12 comments

Comments

@Trus3683
Copy link

Trus3683 commented Sep 28, 2024

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

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
Copy link
Author

Trus3683 commented Oct 2, 2024

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

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

danielcoh92 commented Oct 5, 2024

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
Copy link
Author

Trus3683 commented Oct 5, 2024

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
Copy link
Author

Trus3683 commented Oct 5, 2024

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

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
Copy link
Author

Trus3683 commented Oct 6, 2024

ahbot.txt
Does this work? Thanks!

@kewinrausch
Copy link

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
Copy link
Author

Trus3683 commented Oct 6, 2024

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

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.

@Bits-per-post
Copy link

Bits-per-post commented Jan 12, 2025

I can confirm altering the buyerbidsperinterval value in the database previously increased bot bids and purchase frequency but in newer builds altering this value no longer has the desired effect.

While I could spend an eternity going through the code for the latest commits (professions items etc) instead I simply opted to edit the source code and rebuild.

navigate to modules / mod-ah-bot / src and edit the AuctionHouseBotConfig.cpp file

find the start of the SetBidsPerInterval function in the code

void AHBConfig::SetBidsPerInterval(uint32 value)
{
buyerBidsPerInterval = value;
}

and edit "value" to the number of bid attempts you want. For me as a solo player i changed to 10 like so

buyerBidsPerInterval = 10;

and it simply bids/buys all my items instantly without breaking too much. Not recommended if you are running a server, troubleshoot it properly and find where in the code the buyerbidsperinterval function is being skipped over and correct it, but if you just want to see immediate effect then changing this value simply works without breaking too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants