Jump to content

[Patch] Auction House Bot (Xeross' Branch)


Recommended Posts

  • Replies 717
  • Created
  • Last Reply

Top Posters In This Topic

I like your idea Cyberium. Numbers rather than percentages is ALWAYS (no matter what anyone says) going to be easier in the long run, so if you can implement such a system, that would be fantastic.

Anyone who says managing percentages is easier, is either a mathematician, someone showing off or just clinically insane :P

Link to comment
Share on other sites

@cyberium i have one error by pulling your ahbot

git reported me that my local changes of dbcediter/searchfrm.dfm would be overwritten and says than aborting

so i can´t make a patch file

If you pay a little more attention and read, you'll see that a few posts up Cyberium released a patch and a download link, so you don't have to make one.

http://www.mediafire.com/file/9w43nn3lbfw69i6/AHBot_10363.patch

Link to comment
Share on other sites

git reported me that my local changes of dbcediter/searchfrm.dfm would be overwritten and says than aborting

I used to have this same issue with many repositories, until I learned how to properly configure my Git for working with cross-platform code, like the MaNGOS project.

Either you or cyberium does not have their Git properly configured to handle line endings between Unix and Windows. Depending on which OS you use, Git can interpret these line endings as changes to the code.

To prevent this issue and have Git automatically convert between the two different line ending formats use these Git commands:

  • * For Windows users: gitconfig --global core.autocrlf true
    * For Linux/Mac/FreeBSD: git config --global core.autocrlf input

Unfortunately, this will not work on existing working trees. You will need to remove affected trees and then check them out again. You can do this by deleting all files and folders in your repository, except for the .git directory/folder, and then using git checkout <branchname> to correct line endings.

Link to comment
Share on other sites

I too get the same error (using patch provided by Earthwalker):

In file included from ../../../src/game/AuctionHouseBot.cpp:1:
../../../src/game/AuctionHouseBot.h:945: error: ‘ObjectGuid’ does not name a type
../../../src/game/AuctionHouseBot.h:958: error: ‘ObjectGuid’ does not name a type
../../../src/game/AuctionHouseBot.cpp: In member function ‘void AuctionHouseBot::addNewAuctions(AHBConfig*)’:
../../../src/game/AuctionHouseBot.cpp:413: error: ‘GetAHBplayerGUID’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp: In member function ‘void AuctionHouseBot::addNewAuctionBuyerBotBid(AHBConfig*, WorldSession*)’:
../../../src/game/AuctionHouseBot.cpp:578: warning: format ‘%f’ expects type ‘double’, but argument 3 has type ‘long double’
../../../src/game/AuctionHouseBot.cpp:632: warning: format ‘%f’ expects type ‘double’, but argument 3 has type ‘long double’
../../../src/game/AuctionHouseBot.cpp:639: warning: format ‘%f’ expects type ‘double’, but argument 3 has type ‘long double’
../../../src/game/AuctionHouseBot.cpp:658: warning: format ‘%f’ expects type ‘double’, but argument 3 has type ‘long double’
../../../src/game/AuctionHouseBot.cpp:679: error: ‘GetAHBplayerGUID’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp:691: error: ‘GetAHBplayerGUID’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp:700: error: ‘GetAHBplayerGUID’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp:712: error: ‘GetAHBplayerGUID’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp: In member function ‘void AuctionHouseBot::Initialize()’:
../../../src/game/AuctionHouseBot.cpp:780: error: ‘m_FakeGuid’ was not declared in this scope
../../../src/game/AuctionHouseBot.cpp:783: warning: format not a string literal and no format arguments
../../../src/game/AuctionHouseBot.cpp:810: warning: format not a string literal and no format arguments
../../../src/game/AuctionHouseBot.cpp: In member function ‘void AuctionHouseBot::Commands(uint32, uint32, uint32, char*)’:
../../../src/game/AuctionHouseBot.cpp:1074: error: ‘GetAHBplayerGUID’ was not declared in this scope
make[3]: *** [AuctionHouseBot.o] Error 1

git apply src/bindings/ScriptDev2/patches/MaNGOS-9519-ScriptDev2.patch
git apply ../AHBot_10363.patch
autoreconf --install --force
mkdir objdir
cd objdir
../configure --prefix=/opt/mangos --sysconfdir=/opt/mangos/etc --enable-cli --datadir=/opt/mangos/data --with-python --enable-ra
make

I will pull from you Cyberium. Will let you know if it compiles.

Link to comment
Share on other sites

Hello, i pushed new tree with new version of ahbot on my repo.

I need some beta tester to improve it.

What's new :

- Completly rewrited addAuction method.

- Completly rewrited AHBConfig class.

- More selective on what item needed to be added.

- Add items by amount instead by percent.

- All items selled will be replaced by another one of same quality in next scan.

- And some more improvement like new auction speedup.

What i need?

Some feedback about object in AH. Iam not sure if it was a good idea to group itemsTradeGood with normal items. So i need to know if all usual items are still present and in good percentage.

Olso the price of items need to be checked. ( anyway you still can modify de percentage of it in DB )

Warning this version need a new database structure so i rename it to let you keep old one for reversing...

The code is probably not cleaned (trailing space, or indent problem) don't be rude it's still in devellopement :)

See you.

http://github.com/cyberium/mangos/commits/new_ahbot

Link to comment
Share on other sites

i have tested the compile of the Branch on my Debian Lenny

and get this error.

I fix it, to test the rest again. so my question anyone else the same problem?

In file included from ../../../src/game/AuctionHouseBot.cpp:1:

../../../src/game/AuctionHouseBot.h:320: error: expected â,â or â...â before â*â token

../../../src/game/AuctionHouseBot.h:320: error: ISO C++ forbids declaration of âItemâ with no type

../../../src/game/AuctionHouseBot.cpp:70: error: prototype for âvoid AuctionHouseBot::SetPricesOfItem(const Item*, AHBConfig&, uint32&, uint32&, uint32&, e_ahb_quality)â does not match any in class âAuctionHouseBotâ

../../../src/game/AuctionHouseBot.h:320: error: candidate is: void AuctionHouseBot::SetPricesOfItem(int)

../../../src/game/AuctionHouseBot.cpp: In member function âvoid AuctionHouseBot::addNewAuctions(AHBConfig&)â:

../../../src/game/AuctionHouseBot.cpp:145: error: no matching function for call to âAuctionHouseBot::SetPricesOfItem(Item*&, AHBConfig&, uint32&, uint32&, uint32&, e_ahb_quality)â

../../../src/game/AuctionHouseBot.h:320: note: candidates are: void AuctionHouseBot::SetPricesOfItem(int)

Link to comment
Share on other sites

Xeross' Branch Update

The AHBot is functional again, I'm now optimizing it, 1 single optimization got rid of 40 lines of code, after this is done and final test has been ran I will upload it.

Update 2

Everything is functioning, some bugs fixed, merging with latest mangos, after that need to check some formulas.

Update 3

Some more optimizing and renaming. merge is completed. found bugs in the formulas, fixing now.

Update 4

Testing...

Link to comment
Share on other sites

Once the branches are merged than we should get under review, my branch has a lot of new optimizations and stuff, in other words better code quality than it was before.

Updated to 10385

ok are we using

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

if so i tryed to make patch file

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

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

cd ahbot

git checkout -b ahbot origin/ahbot

git diff master ahbot > ../ahbot.patch

Got patch file size 11,135 kb. try to apply it to core Rev. 10391 and get ton of errors.. relly to many to post here.. where did i go wrong at ?

Link to comment
Share on other sites

1/

Once the branches are merged than we should get under review, my branch has a lot of new optimizations and stuff, in other words better code quality than it was before.

Updated to 10385

perfect :) did you implement the generic seller like cyberyum ?

2/ I have compiled

and also I have some strange errors on the console:

AHBOT> Running seller loop

AHBOT> Running buyer loop

AHBOT> Running seller loop

AHBOT> Running buyer loop

AHBOT> Running seller loop

AHBOT> Running buyer loop

AHBOT> Running seller loop

AHBOT> Running buyer loop

SQL: UPDATE auctionhouse SET buyguid = '135',lastbid = '946' WHERE id = '1026094

'

SQL ERROR: Table 'characters_tlk.auctionhouse' doesn't exist

auctionhouse' has been changed do we have to do something ?

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