Jump to content

[PATCH] AuctionHouse Bot


Recommended Posts

  • Replies 702
  • Created
  • Last Reply

Top Posters In This Topic

It should take approximately 1 minute to start its first run. Make sure you configured it properly in both the config file and the database tables.

Ok thanks. I have gone over the settings many times to no avail, but I'll keep looking.

Link to comment
Share on other sites

Ah I see, no don't have that prob. I can't find the problem, everything looks as it should be, AHBot compiles, and loads fine in consol. Items are shown as loaded, a new bot character was created, logged in, logged out, changed config to accomodate the char GUID and Acc, restarted server, but no items. Thanks for your efforts, much appreciated :D

Link to comment
Share on other sites

BASH script to generate AHbot patch file. I originally wrote this for playerbot, but it works for AHbot as well with a couple of modifications.

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git ahbot
cd ahbot
git fetch git://github.com/xeross/mangos.git ahbot:ahbot
HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
git diff $HASH ahbot > ../ahbot.patch

skinlayers

Link to comment
Share on other sites

Can't we copy the existing code for adding an item to the auctionhouse and mod the check for player ID (and thus the name of the player that puts it on the AH) to use a preconfigured name (like Ahbot) and preconfigured ID (like 90000) that way the patch won't need database support does it :o

Link to comment
Share on other sites

I basically replaced MinimalLoad with the following code (Which still works)

Code C++:

void Player::Initialize(uint32 guid )

{

Object::_Create( guid, 0, HIGHGUID_PLAYER );

}

So it's not yet at the point where the devs want it, but it's a step forward from MinimalLoadFromDB

Link to comment
Share on other sites

Tried that and after doing this line:-

HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`

I got this error:-

EARTHWALKER@THEBEAST c:/mangos/ahbot (master)
$ HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d "
" -f 1`
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

Any clues?

BASH script to generate AHbot patch file. I originally wrote this for playerbot, but it works for AHbot as well with a couple of modifications.

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git ahbot
cd ahbot
git fetch git://github.com/xeross/mangos.git ahbot:ahbot
HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
git diff $HASH ahbot > ../ahbot.patch

skinlayers

Link to comment
Share on other sites

Tried that and after doing this line:-

HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`

I got this error:-

EARTHWALKER@THEBEAST c:/mangos/ahbot (master)
$ HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d "
" -f 1`
grep: invalid option -- m
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

Any clues?

Hi,

Looking at your first code box, I noticed that the commandline

$ HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d "

and

" -f 1`

are broken with what looks like a carriage return.

try removing it, to look like this

HASH=`git log ahbot --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`

I can confirm that it works on my linux box

#!/bin/bash -x
git clone git://github.com/mangos/mangos.git auction
cd auction
git fetch git://github.com/xeross/mangos.git ahbot:auction
git checkout auction
HASH=`git log --pretty=oneline | grep -m 1 '\\[9[0-9]\\{3\\}]' | cut -d " " -f 1`
git diff $HASH > ahbot.patch

I also note from your command prompt, that your using windows. Maybe the bash shell that your running the script in does not support this '-m' option for grep.

Hope this helps

Link to comment
Share on other sites

These are the config variables I have on my testserver, and they work, dunno what can be wrong, maybe your merge is messing up ?

AuctionHouseBot.Seller.Enabled = 1
AuctionHouseBot.Buyer.Enabled = 1
AuctionHouseBot.Account = 5
AuctionHouseBot.Character = 2
AuctionHouseBot.Items.Vendor = 0
AuctionHouseBot.Items.Loot = 1
AuctionHouseBot.Items.Misc = 0
AuctionHouseBot.Bind.No = 1
AuctionHouseBot.Bind.Pickup = 0
AuctionHouseBot.Bind.Equip = 1
AuctionHouseBot.Bind.Use = 1
AuctionHouseBot.Bind.Quest = 0
AuctionHouseBot.ItemsPerCycle = 200
AuctionHouseBot.BuyPrice.Seller = 0
AuctionHouseBot.BuyPrice.Buyer = 0

Link to comment
Share on other sites

I tried it without the -m and even more errors popped up so can't continue to get the patch, not that I would have a clue how to integrate the patch anyway.

Thanks for trying though, but now I know this is for linux anyway, I won't waste hours trying it over and over again thinking I'd typed something wrong.

Hopefully someone will either come up with some windows commands or just a patch and a way to SVN it as I can do that. I wouldn't have a clue how to integrate a patch with this git thing. I'd have a better time translating outer-mongolian :P

Link to comment
Share on other sites

Thanks m8... WOOT.

I grabbed a patch from further up, did what you wrote and bingo!

EARTHWALKER@THEBEAST c:/mangos/ahbot (master)
$ patch -p1 < 9652_AHBbot.patch
patching file `README.AHBOT'
patching file `sql/characters_auctionhousebot.sql'
patching file `sql/characters_auctionhousebot_update.sql'
patching file `src/game/AuctionHouseBot.cpp'
patching file `src/game/AuctionHouseBot.h'
patching file `src/game/AuctionHouseHandler.cpp'
patching file `src/game/AuctionHouseMgr.cpp'
patching file `src/game/AuctionHouseMgr.h'
patching file `src/game/Chat.cpp'
Hunk #1 succeeded at 669 (offset 1 line).
patching file `src/game/Chat.h'
patching file `src/game/Level3.cpp'
patching file `src/game/Mail.cpp'
patching file `src/game/Makefile.am'
patching file `src/game/Player.h'
Hunk #1 succeeded at 1422 (offset 9 lines).
patching file `src/game/World.cpp'
patching file `src/game/World.h'
patching file `src/mangosd/mangosd.conf.dist.in'
patching file `win/VC100/game.vcxproj'
patching file `win/VC80/game.vcproj'
patching file `win/VC90/game.vcproj'

Now to get the bugger working on the server. Should be easy now the difficult part is out of the way :)

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