Jump to content

[PATCH] AuctionHouse Bot


Recommended Posts

sLog.outError("Player #%d have broken data in `data` field. Can't be loaded for character list.",GUID_LOPART(guid)); <- this one, of course filled out. "Player ..."

and with numbers I ment this part:

- m_name = fields[2].GetCppString();

+ m_name = fields[1].GetCppString();

- Relocate(fields[3].GetFloat(),fields[4].GetFloat(),fields[5].GetFloat());

- SetLocationMapId(fields[6].GetUInt32());

+ Relocate(fields[2].GetFloat(),fields[3].GetFloat(),fields[4].GetFloat());

+ SetLocationMapId(fields[5].GetUInt32());

// the instance id is not needed at character enum

- m_Played_time[PLAYED_TIME_TOTAL] = fields[7].GetUInt32();

- m_Played_time[PLAYED_TIME_LEVEL] = fields[8].GetUInt32();

+ m_Played_time[PLAYED_TIME_TOTAL] = fields[6].GetUInt32();

+ m_Played_time[PLAYED_TIME_LEVEL] = fields[7].GetUInt32();

obvious it didn't work out as expected :-)

Well that would indicate that it is still looking for the Data value even though you corrected the value... perhaps there was an error?

Link to comment
Share on other sites

  • Replies 702
  • Created
  • Last Reply

Top Posters In This Topic

it still works if you don't remove the data blob yet.

Somehow it won't start filling my auction house any idea why that happens ?

Hi,

Have you changed the maxitem field in auctionhousebot table (character database). The default is zero, so nothing will be added to the auctionhouse. I set the value for all auctionhouses (Horde,Alliance,Neutral) to 500.

They remove the data field from the character database in the latest sql update 9630_01_characters_characters.sql. I counted myself one of the lucky few, as I wasn't effected by the recent freeze issue, being on linux. However, auctionhousebot now causes both my servers (windows (32bit) and linux) to crash. Interestingly, MinimalLoadFromDB( QueryResult *result, uint32 guid ) was removed from the core code ages ago, and is only maintained now by auctionhousebot. Maybe if we looked at the alternative used in the core, we could apply this to auctionohousebot. Just a thought.

Cheers

Link to comment
Share on other sites

Looking into this issue atm seeing what I can accomplish hopefully ill have something to show for it within the hour.

//EDIT//

Sorry guys best I can come with as well is an Ahbot that doesnt give any errors on loading but crashes when items are inserted into the DB by it.

Since thats no good then I guess the best I can come up with is nothing.

I did however notice that when I got the Ahbot working the way it did if i looked into the Auctionhouse and did a search previous auctions that were present had nothing listed as the seller where as usually it would say "Ahbot"

Makes me wonder if mangos itself is having trouble getting the Auctioneer's Data now. Will look into more options tomorrow afternoon.

Link to comment
Share on other sites

It can't be too hard to fix the MinimalLoadFromDB function to work without the data blob, and yes my configuration is fine, minitems and maxitems are both 2000, ahbot is enabled in config, time to add some debug info to the ahbot functions.

Hi,

Point is, why did they stop using MinimalLoadFromDB in the core? Perhaps there is a better solution

There was just a chance you might have missed the maxitem setting;). Have you logged on with the 'auction guy' [/b,]they do suggest you do this at least once.

I've been trying to upgrade ACE libs for windows (Upgrade works fine with linux), to help towards the freeze issue, but ServiceWin32.cpp does not like the change. The ServiceMain function may haveto be rewritten. With this present problem I will put that on hold. I have also tried updating the MySQL header files (These are quite old, and almost certainly will have been revised). More info to throw into the pile.

Cheers

Link to comment
Share on other sites

Hi,

Point is, why did they stop using MinimalLoadFromDB in the core? Perhaps there is a better solution

There was just a chance you might have missed the maxitem setting;). Have you logged on with the 'auction guy' [/b,]they do suggest you do this at least once.

I've been trying to upgrade ACE libs for windows (Upgrade works fine with linux), to help towards the freeze issue, but ServiceWin32.cpp does not like the change. The ServiceMain function may haveto be rewritten. With this present problem I will put that on hold. I have also tried updating the MySQL header files (These are quite old, and almost certainly will have been revised). More info to throw into the pile.

Cheers

I think they removed it because nothing used MinimalLoadFromDB anymore, can't be too hard to use the normal loadFromDB in ahbot.

Oh yes and my ahbot table is

INSERT INTO `auctionhousebot` (`auctionhouse`, `name`, `minitems`, `maxitems`, `mintime`, `maxtime`, `percentgreytradegoods`, `percentwhitetradegoods`, `percentgreentradegoods`, `percentbluetradegoods`, `percentpurpletradegoods`, `percentorangetradegoods`, `percentyellowtradegoods`, `percentgreyitems`, `percentwhiteitems`, `percentgreenitems`, `percentblueitems`, `percentpurpleitems`, `percentorangeitems`, `percentyellowitems`, `minpricegrey`, `maxpricegrey`, `minpricewhite`, `maxpricewhite`, `minpricegreen`, `maxpricegreen`, `minpriceblue`, `maxpriceblue`, `minpricepurple`, `maxpricepurple`, `minpriceorange`, `maxpriceorange`, `minpriceyellow`, `maxpriceyellow`, `minbidpricegrey`, `maxbidpricegrey`, `minbidpricewhite`, `maxbidpricewhite`, `minbidpricegreen`, `maxbidpricegreen`, `minbidpriceblue`, `maxbidpriceblue`, `minbidpricepurple`, `maxbidpricepurple`, `minbidpriceorange`, `maxbidpriceorange`, `minbidpriceyellow`, `maxbidpriceyellow`, `maxstackgrey`, `maxstackwhite`, `maxstackgreen`, `maxstackblue`, `maxstackpurple`, `maxstackorange`, `maxstackyellow`, `buyerpricegrey`, `buyerpricewhite`, `buyerpricegreen`, `buyerpriceblue`, `buyerpricepurple`, `buyerpriceorange`, `buyerpriceyellow`, `buyerbiddinginterval`, `buyerbidsperinterval`) VALUES
(2, 'Alliance', 1000, 2000, 8, 48, 0, 27, 12, 10, 1, 0, 0, 0, 10, 30, 8, 2, 0, 0, 100, 150, 150, 250, 800, 1400, 2250, 2750, 3250, 5550, 6250, 8550, 9250, 11550, 70, 100, 70, 100, 80, 100, 75, 100, 80, 100, 80, 100, 80, 100, 0, 0, 3, 2, 1, 1, 1, 1, 1, 5, 12, 15, 20, 22, 1, 1),
(6, 'Horde', 1100, 2200, 8, 48, 0, 27, 12, 10, 1, 0, 0, 0, 10, 30, 8, 2, 0, 0, 100, 150, 150, 250, 800, 1400, 2250, 2750, 3250, 5550, 6250, 8550, 9250, 11550, 70, 100, 70, 100, 80, 100, 75, 100, 80, 100, 80, 100, 80, 100, 0, 0, 3, 2, 1, 1, 1, 1, 1, 5, 12, 15, 20, 22, 1, 1),
(7, 'Neutral', 100, 200, 8, 24, 0, 27, 12, 10, 1, 0, 0, 0, 10, 30, 8, 2, 0, 0, 100, 150, 150, 250, 800, 1400, 2250, 2750, 3250, 5550, 6250, 8550, 9250, 11550, 70, 100, 70, 100, 80, 100, 75, 100, 80, 100, 80, 100, 80, 100, 0, 0, 3, 2, 1, 1, 1, 1, 1, 5, 12, 15, 20, 22, 1, 1);

Seems fine :/

Link to comment
Share on other sites

I think they removed it because nothing used MinimalLoadFromDB anymore, can't be too hard to use the normal loadFromDB in ahbot.

Feel free go show us the way ;-) As said just some posts ago my C++ knowledge is ... well there ain't no C++ knowledge. What you suggest sounds like the way MaNGOS devs feel would be acceptable for the master branch. Look at Neo2003's comment in this thread or VladimirMangos's (iirc last) comment in the old ahbot thread. Up to this day no one, not even Naicisum, has done something in this way. The easiest way right now, would be to modify minimalload to use the new fields of characters table, instead the data blob. Sadly I feel that I can't do it. So from my point of view right now it's farewell ahbot ...

Regards

Skirnir

Link to comment
Share on other sites

I tried switching it from MinimalloadFromDb to LoadfromDB which is what mangos uses itself. it seemed to work fine except on compile it has problems on line 751 of Auctionhousebot.cpp where it calls

_AHBplayer.LoadFromDB(NULL, AHBplayerGUID)

The issue is it will not convert from what used to be expected as a Uint32 and is now a Queryholder *

Link to comment
Share on other sites

I thought I would give this ahbot patch a go and immediately came into a problem.

Followed the guide and this error pops up in the git window:-

$ git apply --check Addon/AHBot/mangos-9611-ahbot.patch

error: patch failed: src/game/Player.h:1409

error: src/game/Player.h: patch does not apply

Here is my server info:-

MaNGOS/0.16.0-DEV (* * Revision 9632 - c0043781bed0da29f5aaeee59866ae57572e1dd5)

for Win32 (little-endian)

Using script library: ScriptDev2 (for MaNGOS 9603+) Revision [1656] 2010-03-27 1

1:30:55 (Win32)

Using World DB: UDB 0.12.0 (389) for MaNGOS 9630 with SD2 SQL for rev. 1656

Using creature EventAI: ACID 3.0.4 - Final Release for Mangos (3.3.2 Client)

I'm not certain if it's me or the patch just doesn't work with the new core. Hopefully someone will be able to answer that and perhaps fix the problem :)

Link to comment
Share on other sites

I tried switching it from MinimalloadFromDb to LoadfromDB which is what mangos uses itself. it seemed to work fine except on compile it has problems on line 751 of Auctionhousebot.cpp where it calls

_AHBplayer.LoadFromDB(NULL, AHBplayerGUID)

The issue is it will not convert from what used to be expected as a Uint32 and is now a Queryholder *

If it's a query holder you should be able to get the uint32 value from it, but I'll look into it as promised.

Link to comment
Share on other sites

Hi Guys,

There seems to be activity in core development to restructure the character database. 9630_01_characters_characters.sql you will be aware of the demise of the data field. You will note that the data has been shifted to a new table called data_backup. Some of the data has already been redirected to three new fields highlighted below. What this means is a massive headache to developers of third party addons (mods like auctionhousebot, playerbot and account management systems such as MiniManager).

ALTER TABLE character_db_version CHANGE COLUMN required_9611_01_characters required_9630_01_characters_characters bit;

ALTER TABLE characters

ADD COLUMN `exploredZones` longtext AFTER activeSpec,

ADD COLUMN `equipmentCache` longtext AFTER exploredZones,

ADD COLUMN `ammoId` int(10) UNSIGNED NOT NULL default '0' AFTER equipmentCache;

UPDATE characters SET

exploredZones = SUBSTRING(data,

length(SUBSTRING_INDEX(data, ' ', 1041))+2,

length(SUBSTRING_INDEX(data, ' ', 1168+1))- length(SUBSTRING_INDEX(data, ' ', 1041)) - 1),

equipmentCache = SUBSTRING(data,

length(SUBSTRING_INDEX(data, ' ', 283))+2,

length(SUBSTRING_INDEX(data, ' ', 320+1))- length(SUBSTRING_INDEX(data, ' ', 283)) - 1),

ammoId = SUBSTRING(data,

length(SUBSTRING_INDEX(data, ' ', 1198))+2,

length(SUBSTRING_INDEX(data, ' ', 1198+1))- length(SUBSTRING_INDEX(data, ' ', 1198)) - 1);

CREATE TABLE `data_backup` (

`guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',

`data` longtext,

PRIMARY KEY (`guid`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO data_backup (guid, data) (SELECT guid, data FROM characters);

ALTER TABLE characters

DROP COLUMN data;

This migration of data is ongoing so be prepared for alot of upset. I advise you to backup your existing databases and be reluctant to upgrade MaNGOS until they have finished messing about.

As fast as we find fixes, they will cause more issues by changing things again :mad:

Hope this helps

Link to comment
Share on other sites

EarthWalker, i have had this error....in the past since i didn't the latest Mangos version.... (well i've installed everything then went to add the AHBot 2 weeks later and i had this error since they did changed few things by then)

You'll have to do some manual stuff ....

Actualy, it is supose to add few lines in the mangos.conf.dist.in if it's not already there... my version used was mangos-9573-ahbot

You could open the patch file with notepad...(make a copy to make sur you don't scrap it)

Search for mangos.conf.dist.in and remove the entire part that refers to that.... (between square)

Should be like "diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in

index f4abaa1..f77bed1 100644

--- a/src/mangosd/mangosd.conf.dist.in

+++ b/src/mangosd/mangosd.conf.dist.in

@@ -1362,6 +1362,79 @@ Network.TcpNodelay = 1

Network.KickOnBadPacket = 0"

save your patch file and later try a new --check

Then change your mangosd.conf.dist.in or your mangosd.conf....or both..anyway.. dist.in would need to be rename to .conf...

Add in the file if its not there:

Network.KickOnBadPacket = 0

after Network.TcpNodelay = 1

and look in the file if you see any "AuctionHouseBot." ...if not ...add these lines...but only if they are not there...

(ill start my server and copy the exact text i got

Link to comment
Share on other sites

Network.KickOnBadPacket = 0

###################################################################################################################

# AUCTION HOUSE BOT SETTINGS

#

# AuctionHouseBot.EnableSeller

# Enable/Disable the part of AHBot that puts items up for auction

# Default 0 (disabled)

#

# AuctionHouseBot.EnableBuyer

# Enable/Disable the part of AHBot that buys items from players

# Default 0 (disabled)

#

# Auction House Bot character data

# AuctionHouseBot.Account is the account number (in realmd->account table) of the player you want to run as the auction bot.

# AuctionHouseBot.GUID is the GUID (in characters->characters table) of the player you want to run as the auction bot.

# Default: 0 (Auction House Bot disabled)

#

# AuctionHouseBot.VendorItems

# Include items that can be bought from vendors.

# Default 0

#

# AuctionHouseBot.LootItems

# Include items that can be looted or fished for.

# Default 1

#

# AuctionHouseBot.OtherItems

# Include misc. items.

# Default 0

#

# AuctionHouseBot.Bonding_types

# Indicates which bonding types to allow seller to put up for auction

# No_Bind

# Default 1

# Bind_When_Picked_Up

# Default 0

# Bind_When_Equipped

# Default 1

# Bind_When_Use

# Default 1

# Bind_Quest_Item

# Default 0

#

# AuctionHouseBot.ItemsPerCycle

# Number of Items to Add/Remove from the AH during mass operations

# Default 200

#

# AuctionHouseBot.UseBuyPriceForSeller

# Should the Seller use BuyPrice or SellPrice to determine Bid Prices

# Default 0 (use SellPrice)

#

# AuctionHouseBot.UseBuyPriceForBuyer

# Should the Buyer use BuyPrice or SellPrice to determine Bid Prices

# Default 0 (use SellPrice)

#

# All other settings have been moved to sql

#

###################################################################################################################

AuctionHouseBot.EnableSeller = 1

AuctionHouseBot.EnableBuyer = 1

AuctionHouseBot.Account = 0

#put your account number

AuctionHouseBot.GUID = 0

#put your character number

AuctionHouseBot.VendorItems = 1

AuctionHouseBot.LootItems = 1

AuctionHouseBot.OtherItems = 1

AuctionHouseBot.No_Bind = 1

AuctionHouseBot.Bind_When_Picked_Up = 0

AuctionHouseBot.Bind_When_Equipped = 1

AuctionHouseBot.Bind_When_Use = 1

AuctionHouseBot.Bind_Quest_Item = 0

AuctionHouseBot.ItemsPerCycle = 500

AuctionHouseBot.UseBuyPriceForSeller = 0

AuctionHouseBot.UseBuyPriceForBuyer = 0

Link to comment
Share on other sites

Don't worry m8. I'll back you up. No one on the planet can convince me that this git stuff is easier than SVN. NO way in hell. In fact, Hell would have to freeze over before that would ever happen.

Plus I'm bigger and more mature than most people to be able to be be-littled.

And to think, I was be-littled 4 days ago for suggesting the same thing...

skinlayers

Link to comment
Share on other sites

Thanks dude. I'll give that a go now and report back my findings.

EarthWalker, i have had this error....in the past since i didn't the latest Mangos version.... (well i've installed everything then went to add the AHBot 2 weeks later and i had this error since they did changed few things by then)

You'll have to do some manual stuff ....

Actualy, it is supose to add few lines in the mangos.conf.dist.in if it's not already there... my version used was mangos-9573-ahbot

You could open the patch file with notepad...(make a copy to make sur you don't scrap it)

Search for mangos.conf.dist.in and remove the entire part that refers to that.... (between square)

Should be like "diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in

index f4abaa1..f77bed1 100644

--- a/src/mangosd/mangosd.conf.dist.in

+++ b/src/mangosd/mangosd.conf.dist.in

@@ -1362,6 +1362,79 @@ Network.TcpNodelay = 1

Network.KickOnBadPacket = 0"

save your patch file and later try a new --check

Then change your mangosd.conf.dist.in or your mangosd.conf....or both..anyway.. dist.in would need to be rename to .conf...

Add in the file if its not there:

Network.KickOnBadPacket = 0

after Network.TcpNodelay = 1

and look in the file if you see any "AuctionHouseBot." ...if not ...add these lines...but only if they are not there...

(ill start my server and copy the exact text i got

Link to comment
Share on other sites

Good idea Temporary, but unfortunately, it went even more pear-shaped.

$ git apply --check Addon/AHBot/mangos-9611-ahbot.patch

error: patch failed: src/game/AuctionHouseHandler.cpp:28

error: src/game/AuctionHouseHandler.cpp: patch does not apply

error: patch failed: src/game/Player.h:1409

error: src/game/Player.h: patch does not apply

error: patch failed: src/game/World.cpp:1346

error: src/game/World.cpp: patch does not apply

Seems mangos has been well messed with this update.

Link to comment
Share on other sites

Lol then it wasnt a good idea... hehe

Well perhaps they made more changes in the patch :S

Well i can put the version i've downloaded .......2-3 weeks ago....

[email protected] // temporary1

I've setup this for the other person that wanted the Word's & PDF version

(AHBot 7h52PM, Word&PDF 7h53PM)

I don't know what they were trying to fix....well for my part i have all my items in the AH ....didn't tried to buy one ....since i haven't played the game and have no money but i expected this to work....

Link to comment
Share on other sites

So it's official that Naicisum has thrown in the towel and walked away from AHBot? Can you elaborate more on your comments, X-Savior? I'm sure all of the AHBot fans would like to know the veracity of your assertions, if only to know for certain where the next step is to be taken.

Based on what you've stated, blueboy, there is no point in attempting to update/fix AHBot until such time as the core devs settle on what they are going to do with the 'characters' database schema.

All we can do is sit tight, weather the storm, and wait for the dust to settle so someone can step up to work on AHBot.

Good thing my server is still set up for 3.2.2a!

Switching AHBot to SVN would be a monumentally bad idea. Git is the standard used by the MaNGOS community now. Functionality between Git and SVN is just too much of a kludge and merging AHBot into the local source would be a tremendous pain, let alone trying to generate diff files from the master, if it were to be reverted back to an SVN repo. Patching is already enough of a hassle without mucking things up because of a personal dislike for Git.

Link to comment
Share on other sites

Guest
This topic is now 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