Jump to content

[PATCH] AuctionHouse Bot


Recommended Posts

  • Replies 702
  • Created
  • Last Reply

Top Posters In This Topic

@Shaan: Try this ahbot.diff: http://gist.github.com/311334

I just created it out of my branch, haven't tested it as I'm right now compiling. (If your patch is successful I advise you to create a branch and update/merge it manually. Thats no big deal and even people that have barly no clue of C++, like me, can do it.)

@kugel did you succeed? If you create a new branch with the patched files, the corruption message should go away. If not you have to ask everyones good friend google.

Good luck

Skirnir

Link to comment
Share on other sites

@kugel did you succeed? If you create a new branch with the patched files, the corruption message should go away. If not you have to ask everyones good friend google.

Good luck

Skirnir

Thanks a lot for your kind support Skirnir, git is not my cup of tea I must admit. I have not yet time to go and learn git subtilities ie merge a repo with no link with the master (because I didn't found how to pull a specific revision, tutorials around are not very verbose about this, people are trying more acrobatic things, this should be beginner action but pfuuui can't find a clue anywhere, maybe I should try the git manual =)).

Anyway I have more urgent things to do and will just go without auctionbot for now, I really appreciated your help, take care.

Link to comment
Share on other sites

@Shaan: Try this ahbot.diff: http://gist.github.com/311334

I just created it out of my branch, haven't tested it as I'm right now compiling. (If your patch is successful I advise you to create a branch and update/merge it manually. Thats no big deal and even people that have barly no clue of C++, like me, can do it.)

@kugel did you succeed? If you create a new branch with the patched files, the corruption message should go away. If not you have to ask everyones good friend google.

Good luck

Skirnir

Also thank you. But one problem. I'm a N00B at GIT. Could you explain me how to apply the ahbot.diff? Do I have to apply it to my mangos GIT or to the AHBOT git. Sorry if I ask very stupid questions... Bit I'm newb at GIT :(

Link to comment
Share on other sites

@Kugel for your 9310 Ahbot: What you need is my updated 9310 ahbot.patch file you get it here: http://gist.github.com/310405 (i've had two game.vcproj messed up, that's why you need the updated file).

Now I show you the commands needed to get 9310 mangos with ahbot: If your on GNU/Linux you should be able to copy paste the lines, for windows I don't know.

First cd to a dir of your choice, then pull mangos. If you already have done that, switch to your mangos directory. With git checkout e8... we get mangos rev9310. Git checkout -b ahbot creates our AuctionhouseBot branch, and lets us swith to it. Now we are at rev9310. NOW you copy the downloaded ahbot9310.patch file in your mangos dir. With git apply ahbot9310.patch mangos sources are patched. With git add * we add every file inside our branch to our upcoming commit. With git commit -a (for all) -m (message) "ahbot for 9310" we commit the files to our ahbot branch. Now you can compile mangos the way your used to do. Maybe you first apply the scriptdev2 patch if your on linux, just do it like your used to do. If your tired of 9310 and want to see whats master branch is doing just: $ git checkout master to switch back to the master branch. With git pull, you get the latest updates.

cd mangos  
git checkout e8af832ac20f75de313f39b8f9f7d3724299c311  
git checkout -b ahbot
git apply ahbot9310.patch
git add *
git commit -a -m "ahbot.patch"

@shaan: you basicaly do the same: create a new branch. patch the source with "git apply ahbot.patch" or "patch -p1 < ahbot.patch", "git add *" to apply all files to your commit and "git commit -a -m "message"" commit your stuff. If you have any further questions about git feel free to send me a personal board message, as this isn't related to this thread.

Hope that helps

Good luck

Skirnir

Link to comment
Share on other sites

Hello.

Excuse my bad english. (google helps me)

I have a question.

how do I create a patch for mangos revision 8994?

I have read so much but it still failed.

whenever I get an error I run the patch.

My system is ubuntu9.10 with putty access

step by step manual please ...

here are my steps

git clone git://github.com/mangos/mangos.git

cd mangos

git clone git://github.com/Naicisum/mangos.git ahbot

cd ahbot

git checkout origin/ahbot

git checkout -b ahbot

git diff master ahbot > auctionhousebot.patch

git reset --mixed d04b1344d3a9f68614d71804aa988dc7bd120fe0 <-- 8994

git am < auctionhousebot.patch <--error

cd ..

svn co -r 1516 https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2/ src/bindings/ScriptDev2

git apply src/bindings/ScriptDev2/patches/MaNGOS-*

autoreconf --install --force;mkdir objdir;cd objdir;

../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --enable-ra --datadir=/opt/mangos

make

make install

Nobody have a clue for maxmax27 problem ? I'm very interested by !

Link to comment
Share on other sites

@belfedia and maxmax27:

most of the things you need is shown at the fist post of this thread.

git clone git://github.com/Naicisum/mangos.git ahbot

cd ahbot

git checkout origin/ahbot

git checkout -b ahbot

do this to get ahbot for Naicisums ahbot branch. Now find here: http://github.com/Naicisum/mangos/commits/ahbot the commit id.

after that "git checkout git_commit_id"

in ahbot branch. After that switch to master branch (git checktout master)

checkout the needed commit id http://github.com/Naicisum/mangos/commits/master and create the patch

git diff master ahbot > auctionhousebot.patch

@wowquebec: it works, compiled 9439 and no problems

Link to comment
Share on other sites

Thanks to help skirnir :)

I make that for [8994] AHbot :

git clone git://github.com/Naicisum/mangos.git ahbot
cd ahbot
git checkout origin/ahbot
git checkout -b ahbot
git checkout d04b1344d3a9f68614d71804aa988dc7bd120fe0
git checkout master
git checkout d04b1344d3a9f68614d71804aa988dc7bd120fe0

git diff master ahbot > auctionhousebot.patch

of course "d04b1344d3a9f68614d71804aa988dc7bd120fe0" is hash for [8994]

after i try a :

git clone git://github.com/mangos/mangos.git
cd mangos
git checkout -b 8994 d04b1344d3a9f68614d71804aa988dc7bd120fe0
svn co -r1513 $SCRIPTDEV_SVN $SCRIPTDEV_PATH/
git am $SCRIPTDEV_PATH/patches/MaNGOS-*

echo "test auctionhouse patch 8994"
patch --dry-run -p1 < /home/mangos/sources/auctionhousebot.patch

read -p "Press any key to apply patchs."
patch -p1 < /home/mangos/sources/auctionhousebot.patch
sleep 2 

And i have :

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
Hunk #1 FAILED at 463.
1 out of 1 hunk FAILED -- saving rejects to file src/game/AuctionHouseMgr.cpp.rej
patching file src/game/AuctionHouseMgr.h
patching file src/game/Chat.cpp
Hunk #1 succeeded at 664 (offset -4 lines).
patching file src/game/Chat.h
patching file src/game/Level3.cpp
patching file src/game/Mail.cpp
Hunk #2 FAILED at 901.
1 out of 2 hunks FAILED -- saving rejects to file src/game/Mail.cpp.rej
patching file src/game/Makefile.am
Hunk #1 succeeded at 38 (offset 1 line).
patching file src/game/Player.cpp
Hunk #1 succeeded at 14312 (offset -115 lines).
patching file src/game/Player.h
Hunk #1 succeeded at 1423 (offset 4 lines).
patching file src/game/World.cpp
Hunk #1 succeeded at 62 (offset 1 line).
Hunk #2 succeeded at 1520 (offset 247 lines).
Hunk #3 succeeded at 1595 (offset 247 lines).
patching file src/mangosd/mangosd.conf.dist.in
Hunk #1 succeeded at 1342 (offset -7 lines).
patching file win/VC100/game.vcxproj
Hunk #2 succeeded at 499 with fuzz 2 (offset 1 line).
patching file win/VC80/game.vcproj
Hunk #1 succeeded at 1034 (offset -96 lines).
patching file win/VC90/game.vcproj
Hunk #1 succeeded at 1035 (offset -96 lines).
Press any key to apply patchs.

Just when i test the patch... any help ?

ps : i don't know C or C++ !

Link to comment
Share on other sites

The only difference between the latest AHBot-004-Hotfix-07, revision 9400+, and the previous hotfix version is the addition of BOOL to the declaration:

CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_AUCTION

For older revisions of MaNGOS, prior to about 9380 (I think), you're just as well off to stick with AHBot-004-Hotfix-006 as it does not use BOOL in the above declaration.

Link to comment
Share on other sites

check where the errors appear:

here:

patching file src/game/AuctionHouseMgr.cpp
Hunk #1 FAILED at 463.
1 out of 1 hunk FAILED -- saving rejects to file  src/game/AuctionHouseMgr.cpp.rej

and here:

patching file src/game/Mail.cpp
Hunk #2 FAILED at 901.
1 out of 2 hunks FAILED -- saving rejects to file src/game/Mail.cpp.rej

have a look at the patch file in a text editor. open the two files in a text editor and merge the patch manually. maybe in the files some lines were added/removed and now "patch" isn't able to patch correctly. hard to say w/o having a look at the files. also it's quite difficult to tell someone, w/o any knowledge and w/o the will to have a look on his own, how to do things properly. I've seen in another thread, that you already patched your sources. Maybe that explains your patch errors, who knows. You have to try it on your own until someone popps out and tries to patch the same sources and hands over a solution.

Skirnir

Link to comment
Share on other sites

AHBot is THE most useful of all the core mods. It certainly would be a sad shame if circumstances have conspired against Naicisum to cause AHBot for MaNGOS to die.

I doubt that's the case. Sometimes, real life has a way of getting even the most dedicated developer sidetracked for a time. It may also be that our friendly neighborhood AHBot dev has sequestered himself to work on major improvements to the code.

Let's try to be patient and remain content to stick with a server revision that is compatible with AHBot until Naicisum manages to resurface here with an update. <crosses fingers>

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