Jump to content
  • 0

AHBot Trouble setting price ratio by quality.


boggtroll

Question

Posted

Im not 100% what revision im using but it is SinglePlayerProjectv3 and it is mangos2

i am using it as my starting point with learning how to mess with the DB and config files before i move to actually getting and compiling the data myself and i think i am almost ready aside from tuning the AHBot. (it comes with its own installer and is ULTRA noob friendly)..i cant figure out how to set up the AH to post prices according to color or quality...so currently it shows some REq.lvl 5 green items for 5k and Warglaive of Azzinoth for 200G.

I am wondering if anyone has figured out the config lines for the AHBot that controls Price Ratio by quality.

i started to compile a fresh mangostwo server just to see if the ahbot config is the same and it is EXACT to what comes with SPPv2/v3.

but digging around in a file called AuctionHouseBot (a CPP file) within my uncompiled files i found a few lines...

config.SetPriceRatioPerQuality(AUCTION_QUALITY_GREY, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_WHITE, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_GREEN, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_BLUE, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_PURPLE, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_ORANGE, PriceRatio);

config.SetPriceRatioPerQuality(AUCTION_QUALITY_YELLOW, PriceRatio);

this makes me think that what i want is possible just not in the config file. and i am wondering if anyone knows what i could to make it work

the following is a list of examples that i have tried with no luck...i still get Purple items ranging from 1G to 3k on the ah (same with every color).

AuctionHouseBot.Price.Ratio.Purple = 99999

AuctionHouseBot.Price.Purple = 99999

AuctionHouseBot.PriceRatio.Purple = 99999

AuctionHouseBot.Purple.PriceRatio = 99999

AuctionHouseBot.Purple.Price.Ratio = 99999

Auction.Quality.Purple.PriceRatio = 99999

Auction.Quality.Purple.Price.Ratio = 99999

Auction.Purple.PriceRatio = 99999

Auction.Purple.Price.Ratio = 99999

I even went to the point to go through the ENTIRE item_template and sorted items by req.lvl and gave buy and sell price (to items w/o) to all items between 14 and 80 along with any item that is blue quality or above for lower lvls.

an example of pricing at lvl 80 items Quality 5 is 328756 (32G roughly), quality 4 is 75% of that, quality 3 is 50%, and 2 is 25% and as it goes down in level each ones drops (about 4000 copper for quality 5) down to lvl 14

thanks in advance for any help provided.

(and i know there is a chance that the options i want are ONLY on newer builds of the ahbot)

hope this is relevant and posted in the right place.

2 answers to this question

Recommended Posts

Posted

Never used AHbot, but...

// Set items price. All important value are passed by address.
void AuctionBotSeller::SetPricesOfItem(ItemPrototype const* itemProto, AHB_Seller_Config& config, uint32& buyp, uint32& bidp, uint32 stackcnt, ItemQualities itemQuality)
{
   double temp_buyp = buyp * stackcnt *
                      (itemQuality < MAX_AUCTION_QUALITY ? config.GetPriceRatioPerQuality(AuctionQuality(itemQuality)) : 1) ;

   double randrange = temp_buyp * 0.4;
   buyp = (urand(temp_buyp - randrange, temp_buyp + randrange) / 100) + 1;
   double urandrange = buyp * 40;
   double temp_bidp = buyp * 50;
   bidp = (urand(temp_bidp - urandrange, temp_bidp + urandrange) / 100) + 1;
}

Here is the corresponding method. It looks like "buyp" stands for buyout, and "bidp" for bid. Try much lesser Ratios on all item qualities, actually closer to 1, for example 1 to 2.

        uint32 buyoutPrice;
       uint32 bidPrice = 0;
       // Not sure if i will keep the next test
       if (sAuctionBotConfig.getConfig(CONFIG_BOOL_AHBOT_BUYPRICE_SELLER))
           { buyoutPrice  = prototype->BuyPrice * item->GetCount(); }
       else
           { buyoutPrice  = prototype->SellPrice * item->GetCount(); }
       // Price of items are set here
       SetPricesOfItem(prototype, config, buyoutPrice, bidPrice, stackCount, ItemQualities(prototype->Quality));

Here is the last piece of price forming code.

Posted

although those look close to what i need to be able to set...im just not sure what i need to do with them.

i also have a couple .patch files for ahbot but i am unsure how to apply them to an already compiled/running server.

thanks again for the help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use