Jump to content

[11723][PATCH]Auction House Bot


Auntie Mangos

Recommended Posts

  • Replies 281
  • Created
  • Last Reply

Top Posters In This Topic

OMG!!!! Could you have found a worse place to park that patch!?!?!? That place is so full of pop-ups and syrveys and everything else under the sun to keep you AWAY from the file!

Who the hell your talking to? Use github and create your own patch files.

Yours

Skirnir

Link to comment
Share on other sites

OMG!!!! Could you have found a worse place to park that patch!?!?!? That place is so full of pop-ups and syrveys and everything else under the sun to keep you AWAY from the file!

Who the hell your talking to? Use github and create your own patch files.

Yours

Skirnir

I did use git to get it, and when I tried the git bash on it it came up with 2 errors.

'patch failed: src/game/Mail.cpp:1002'

'src/game/Mail.cpp: patch does not apply'

And have also searched in here and found a thread with the same problem. Still no excuse to place a patch on a site like that.

Link to comment
Share on other sites

Still don't know who or which site you mean, anyways antiroot who seems to be the new ahbot master created his repo just two postings befor your rant against anonymous. His repo is up to the latest mangos revision [11386] at the time I'm typing. You could just clone his repo and build it.

Regards

Skirnir

Link to comment
Share on other sites

Still don't know who or which site you mean, anyways antiroot who seems to be the new ahbot master created his repo just two postings befor your rant against anonymous. His repo is up to the latest mangos revision [11386] at the time I'm typing. You could just clone his repo and build it.

Regards

Skirnir

Cool! Thanks. It's the very first post. There's a link to a http file download site...it has all kinds of pop-ups and so on.

Link to comment
Share on other sites

@younguns, Oh now your post makes perfect sense I was going through all the more recent patches trying to find one with popups, should have known you were talking about the outdated patch hosted on mediafire

I'll post a patch file from my repro soon if i can find a good host

EDIT: on side note i created a branch called new_ahbot_fixes that has some minor fixes to the original cyberium branch like fixing some default conf values, fixing item skill rank checks

Link to comment
Share on other sites

Sorry for the confusion....I sometimes forget how old post can be on forums. :/

Nicely done antiroot. Compiled with no trouble, and ran just fine. Spooked me at first startup though, wasn't expecting the mangosd console to talk back with so much. It was loading items for a good 5 minutes...lol

Thanks for the prog.

Link to comment
Share on other sites

thanks Jethrogibbs, i'm testing your suggested patch now. I'll update my repro once all the conflicts are resolved

Sorry to anyone using my repro, had issues at work with the recent storms. suffered electrical and flood damage, but I will try to have my repro updated by the end of the day

Link to comment
Share on other sites

new conflicts (11398)

That's how to solve

//IN WORLD.CPP
diff --git a/src/game/world.cpp b/src/game/world.cpp
--- a/src/game/world.cpp
+++ b/src/game/world.cpp
@@@ -1335,16 -1333,11 +1335,14 @@@ void World::SetInitialWorldSettings(
     sprintf( isoDate, "%04d-%02d-%02d %02d:%02d:%02d",
         local.tm_year+1900, local.tm_mon+1, local.tm_mday, local.tm_hour, local.tm_min, local.tm_sec);

     LoginDatabase.PExecute("INSERT INTO uptime (realmid, starttime, startstring, uptime) VALUES('%u', " UI64FMTD ", '%s', 0)",
         realmID, uint64(m_startTime), isoDate);
-
+        
+    static uint32 abtimer = 0;
+    abtimer = sConfig.GetIntDefault("AutoBroadcast.Timer", 60000);
+  
-     m_timers[WUPDATE_OBJECTS].SetInterval(0);
-     m_timers[WUPDATE_SESSIONS].SetInterval(0);
     m_timers[WUPDATE_WEATHERS].SetInterval(1*IN_MILLISECONDS);
     m_timers[WUPDATE_AUCTIONS].SetInterval(MINUTE*IN_MILLISECONDS);
     m_timers[WUPDATE_UPTIME].SetInterval(getConfig(CONFIG_UINT32_UPTIME_UPDATE)*MINUTE*IN_MILLISECONDS);
                                                             //Update "uptime" table based on configuration entry in minutes.
     m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILLISECONDS);
@@@ -1504,24 -1490,12 +1502,19 @@@ void World::Update(uint32 diff

         ///- Handle expired auctions
         sAuctionMgr.Update();
     }

+    /// [*] Handle AHBot operations
+    if (m_timers[WUPDATE_AHBOT].Passed())
+    {
+        auctionbot.Update();
+        m_timers[WUPDATE_AHBOT].Reset();
+    }
+
-     /// [*] Handle session updates when the timer has passed
-     if (m_timers[WUPDATE_SESSIONS].Passed())
-     {
-         m_timers[WUPDATE_SESSIONS].Reset();
- 
-         UpdateSessions(diff);
-     }
+     /// [*] Handle session updates
+     UpdateSessions(diff);

     /// [*] Handle weather updates when the timer has passed
     if (m_timers[WUPDATE_WEATHERS].Passed())
     {
         ///- Send an update signal to Weather objects

//IN WORLD.H
diff --git a/src/game/world.h b/src/game/world.h
--- a/src/game/world.h
+++ b/src/game/world.h
@@@ -69,21 -69,17 +69,19 @@@ enum ShutdownExitCod
 };

 /// Timers for different object refresh rates
 enum WorldTimers
 {
-     WUPDATE_OBJECTS     = 0,
-     WUPDATE_SESSIONS    = 1,
-     WUPDATE_AUCTIONS    = 2,
-     WUPDATE_WEATHERS    = 3,
-     WUPDATE_UPTIME      = 4,
-     WUPDATE_CORPSES     = 5,
-     WUPDATE_EVENTS      = 6,
-     WUPDATE_DELETECHARS = 7,
-     WUPDATE_AHBOT       = 8,
-     WUPDATE_AUTOBROADCAST = 9,    
-     WUPDATE_COUNT       = 10
+     WUPDATE_AUCTIONS    = 0,
+     WUPDATE_WEATHERS    = 1,
+     WUPDATE_UPTIME      = 2,
+     WUPDATE_CORPSES     = 3,
+     WUPDATE_EVENTS      = 4,
+     WUPDATE_DELETECHARS = 5,
-    WUPDATE_COUNT       = 6
+    WUPDATE_AHBOT       = 6,
+    WUPDATE_AUTOBROADCAST = 7,    
+    WUPDATE_COUNT       = 8
 };

 /// Configuration elements
 enum eConfigUInt32Values
 {

Warning in world.h there is the line that pertains autobroadcast if you do not have this patch remove this line and remember to make good

- WUPDATE_AUTOBROADCAST = 7,

+ WUPDATE_COUNT = 7

Link to comment
Share on other sites

Having problem with items not showing up in AH. They are generated in char. db, But, Only shows 1 or 2 in Game. I'm using Antiroot's new_ahbot. Anyone else having this problem? Also maybe remove extra "AuctionHouseBot.Alliance.Items.Amount.Ratio" from the config... :)

Link to comment
Share on other sites

  • 2 weeks later...
Still having the same problem as above after many hours. Only error I get is ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296) and no longer get the Boost value text with standard config... :(

The "ERROR:SESSION: received not allowed opcode CMSG_LFG_GET_STATUS (0x0296)" is an error concerning the Looking for Group option which is not yet supported, the other error however does have something to do with the Auction House Bot ;)

Link to comment
Share on other sites

I hope this is a good place to ask this, but: I've managed to compile mangos, and got a server up and running, but I don't have a clue how to take your patch, and apply it to the code (which is what I figure I need to do to have an AH bot).

So, I've downloaded a source tarball from here: https://github.com/antiroot/mangos/tree/new_ahbot_finetune

My guess is that I need to somehow take this, and merge it with the mangos source, and then compile the whole thing. Is that correct? If so, how do I do that?

Finally, how do I know which revision of mangos this is compatible with?

EDIT: Ah! You just compile it. Well, never mind then, I figured it out :-)

Now I have a new question. I've got it compiled, configured, and running. However, only one item actually showed up on the AH. I bought it, and that was that. It did populate the Auction table in the Characters with around 7000 items, but I guess that doesn't make them show up? Have I done something wrong?

I noticed that I didn't find anything about needing to update the database. Is there some database entry I need to make for the bot? I assume since SOMETHING showed up on the AH, it must at least somewhat be working.

EDIT Again: Aaaand maybe I should have read above in this thread more closely, as perhaps this question was just recently answered. Is this the same deal as Rog360's question? If so, how long should I have to wait before the AH becomes useful? And am I correct in not messing with the database at all when adding the bot?

Yet another edit: I am seeing a fairly frequent error in the server log: "SQL ERROR: Out of range value for column 'moneyTime' at row 1" Should I be concerned by this?

Edit again: Ok, so I noticed that the itemowner for all of the auction entries is '4294967295', which is obviously not the guid of any characters on the server. Is this just the way it works? When it needs to look at the item's owner, does the server redirect that request to some AH Bot code or something?

Link to comment
Share on other sites

@Dark_Oppressor

1. You can indeed just compile the AHBot version directly, or merge it into a clean version of MaNGOS (Even make a patch), just take a look at the GIT tutorials in some subforum don't recall which one (I think it's called "Source code mastery")

2. Yes it takes a while for them to appear, how long I don't really know

3. Yes it uses this GUID to not require an actual character to exist for the auctions, it just takes the highest possible value for that variable type and if it the client asks the server for the name the server will check if it matches that and returns the configured name for the AHBot.

~Xeross

Link to comment
Share on other sites

@xeross155 Thanks for the response! The server has been running for many hours, and no items have shown up. I can see it trying to insert things into 'auction' in the server logs. It is here where it keeps showing the 'moneyTime' error. I'm guessing that is why nothing is showing up? The moneyTime column isn't documented on the mangos wiki, so I have no clue what it is for. Is it some special addition of AHBot? Either way, is there any way to fix this?

I should also mention that the bot is BUYING items perfectly. So no problems there, as far as I can tell. But it won't SELL things at all now.

EDIT: I noticed that when I make my own auctions at a Horde AH, it has a houseid of 1. But the AHBot doesn't put anything in that houseid. It used 2, 6 and 7. What's up with that?

EDIT AGAIN: Ok, so I've been looking at the source for the bot, and it seems that moneyTime in the database represents the time left until a successful auction is sent to the winner, and the money is sent to the seller. However, from looking at the database and server logs, it is trying to set moneyTime to some insanely high number right when the auction is created, so all of the bot's auctions are counted as "already sold." I'm currently perusing the source trying to figure out why this is happening. I'm pretty sure I understand what is happening in the source, and it seems weird that it isn't working.

One other thing I noticed about moneyDeliveryTime (the variable in the source that becomes the moneyTime data entry). It is a time_t. That is either a 32-bit or 64-bit integer, depending on whether you have '_USE_32BIT_TIME_T' defined. I'm assuming it is a 64-bit integer for this project? Anyway, it is always casted to a uint64 when actually being written to the database. However, in AuctionHouseMgr::LoadAuctions(), I noticed this line: auction->moneyDeliveryTime = fields[7].GetUInt32();

Could that be a problem?

I managed to fix it, but it was a hacky not-really-a-fix. I just told it to always save a 0 instead of moneyDeliveryTime into the moneyTime data entry. Items now show up, and can be bought out, but this breaks bidding, and the bot always wins bids on its own stuff. Woo!

EDIT: Uh oh! I have also noticed that some items randomly get deleted after being purchased from the AH bot.

Link to comment
Share on other sites

@Dark_Oppressor, I'm 99% sure that AHBot doesn't alter the database, but the moneyTime field you referred to was added in 11391. I think the part of AHBot that adds the items needs to be fixed to handle the changes from mangos. Unfortunately the harddrive in my server died and i'm waiting for a replacement to arrive.

If someone else comes up with a patch before I can get my server back up and running i'll gladly push it to my repo

Also can I see some logs, db entries, etc so i can see exactly what and where everything seems to be messing up

Edit: also is this still happening when merged with the most current master?

Link to comment
Share on other sites

Hey guys,

your local GIT idiot is asking a stupid question again.

can someone please provide the basic bash commands to create a new patch from antiroot's repo? I used to use Xeross Instructions back in the day but it does not seem to work (it was Xeross branch specific).

Thanks for your help guys as I would like to create a current patch.

Link to comment
Share on other sites

The following will pull mangos/master and then merge new_ahbot with it, after the merge it creates a patch file that you can use.

Although on my server I tend to just merge the two repositories and not worry about making a patch

git clone git://github.com/mangos/mangos.git mangos
cd mangos
git pull git://github.com/antiroot/mangos.git new_ahbot
git diff HEAD^1 HEAD > ../new_ahbot.patch

* looks like there are some merge conflicts right now though, and i've not yet fixed my server to be able to test a fix

the conflicting file is src/game/Mail.cpp probably due to mangos commit 11485

so if you have to have ahbot you could pull mangos at revision 11484 and merge until a fix is pushed to my repo

if you've already pulled the most recent mangos/master you can reset it back to 11484 with

git reset --hard 1c43f279cf86f190a60d

and then pull new_ahbot into it and create your patch, or just compile from there

Link to comment
Share on other sites

Great, I did get it made for 11481 (since that was version I was working with at the time). So it is working good (I will create new patch when I decide to update core again).

I have one question, how do I get AHBOT to list Glyphs? I am using default config settings and there is 0 Glyphs listed (I know I had this problem with previous AHBOT versions as well). Would be nice if I could get that working.... Prob some setting required in config???

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