Tool to populate AH with items

Applications/Tools written to make running DarkStar easier for the rest of us.
warlord1352
Posts: 34
Joined: Sat Feb 10, 2018 1:52 am

Re: Tool to populate AH with items

Post by warlord1352 » Sat Feb 10, 2018 1:54 am

Is this still up and running? Do I need to run this from a specific location. I keep getting it freezing every time I try to use it.

*edit: nevermind, I guess it just took a longer time than I thought.*

warlord1352
Posts: 34
Joined: Sat Feb 10, 2018 1:52 am

Re: Tool to populate AH with items

Post by warlord1352 » Sat Feb 10, 2018 4:10 pm

Okay now I have another issue, I woke up this morning finding that my search-server has thousands of errors. And the list just keeps on going....what can I do to fix this?
Attachments
search-server-error.JPG

Thanos
Posts: 2
Joined: Fri Feb 23, 2018 1:00 pm

Re: Tool to populate AH with items

Post by Thanos » Fri Feb 23, 2018 1:02 pm

Thought I had this working and just ran into the same issue where there are thousands of errors now. Did you figure out the fix for this?

EDIT: Fixed it by clearing out all of the DSPAH seller items from the auction_house SQL table. rule syntax that worked for me in navicat is SELECT * FROM auction_house; delete from auction_house where seller = 0

warlord1352
Posts: 34
Joined: Sat Feb 10, 2018 1:52 am

Re: Tool to populate AH with items

Post by warlord1352 » Fri Feb 23, 2018 4:50 pm

Okay yea. That's what I thought I was going to have to do but I just didn't want to delete everything yet haha. Thanks for the update though!

Thanos
Posts: 2
Joined: Fri Feb 23, 2018 1:00 pm

Re: Tool to populate AH with items

Post by Thanos » Mon Feb 26, 2018 7:34 am

New item that is holding me up is removing all items over level 75. I deleted them from the item,_armor SQL table though that just moved them to populate UNDER the lowest level gear in the AH list. Have not found anywhere else where this data lives so am sort of stumped. Anyone that can point me in the right direction to fix this? Thanks in advance!

cipherx
Developer
Posts: 26
Joined: Fri Aug 03, 2012 3:18 am

Re: Tool to populate AH with items

Post by cipherx » Tue Feb 27, 2018 4:34 am

The errors you get are from Search Server trying to remove items from AH with sellerID of 0 when it runs ExpireAHItems() function in data_loader.cpp
and All Items that are added to the AH have sellerID 0 should never be removed from the AH since they do not expire at all until they are purchased as you can't send them back to seller.

Here is the fix;
in \src\search\data_loader.cpp find line 471 or this section inside [ void CDataLoader::ExpireAHItems() ] function and at this to the end of the query " AND T0.seller != 0 "

Code: Select all

	std::string qStr = "SELECT T0.id,T0.itemid,T1.stacksize, T0.stack, T0.seller FROM auction_house T0 INNER JOIN item_basic T1 ON \
					   		T0.itemid = T1.itemid WHERE datediff(now(),from_unixtime(date)) >=%u AND buyer_name IS NULL;";
	int32 ret = Sql_Query(SqlHandle, qStr.c_str(), search_config.expire_days);
	int64 expiredAuctions = Sql_NumRows(SqlHandle);
then modify the query with this code, so all items with SellerID 0 will never be removed from AH and you will never see the errors again

Code: Select all

	std::string qStr = "SELECT T0.id,T0.itemid,T1.stacksize, T0.stack, T0.seller FROM auction_house T0 INNER JOIN item_basic T1 ON \
					   		T0.itemid = T1.itemid WHERE datediff(now(),from_unixtime(date)) >=%u AND buyer_name IS NULL AND T0.seller != 0;";
	int32 ret = Sql_Query(SqlHandle, qStr.c_str(), search_config.expire_days);
	int64 expiredAuctions = Sql_NumRows(SqlHandle);
Now as to not adding items pass certain level to AH like 75 some one will have to update the tool, if I find the sources I'll post them or you ask Whasf for the sources since all sources were left with the team before I left.

Cheers

User avatar
TeoTwawki
Developer
Posts: 527
Joined: Mon Jul 15, 2013 9:50 pm

Re: Tool to populate AH with items

Post by TeoTwawki » Tue Feb 27, 2018 4:46 am

Alternatively you can edit the datestamps on the items. Set them far into the future and they never expire.
(1 AH query on the seller ID or seller name, hit all its item listings in one go)
Hi, I run The Demiurge server.


Image
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. - Martin Golding
PLS USE [ code ] CODE TAGS [ /code ] WHEN POSTING CODE
DO NOT PRIVATE MESSAGE ME ABOUT BUGS

cipherx
Developer
Posts: 26
Joined: Fri Aug 03, 2012 3:18 am

Re: Tool to populate AH with items

Post by cipherx » Sun Mar 04, 2018 6:27 pm

v1.6 updated as requested w/sources
Attachments
AHTool_v1.6 with SourceCode.7z
(16.86 KiB) Downloaded 1048 times

Dwingvatt
Posts: 4
Joined: Wed Apr 04, 2018 12:57 pm

Re: Tool to populate AH with items

Post by Dwingvatt » Wed Apr 04, 2018 1:10 pm

Hi, I have been building my own server. However, I been using this tool and every time I use it. It freezes and only populate some of the AuctionHouse items. Then it will say Error Connecting to MySQL
Server! Please Check connection settings. I have tried all the troubleshooting That I can. I check to my sure I am using the right password and the right port and DB name and username. I need help with this.

warlord1352
Posts: 34
Joined: Sat Feb 10, 2018 1:52 am

Re: Tool to populate AH with items

Post by warlord1352 » Wed Apr 04, 2018 2:14 pm

Dwingvatt wrote:Hi, I have been building my own server. However, I been using this tool and every time I use it. It freezes and only populate some of the AuctionHouse items. Then it will say Error Connecting to MySQL
Server! Please Check connection settings. I have tried all the troubleshooting That I can. I check to my sure I am using the right password and the right port and DB name and username. I need help with this.

I am not sure if you have tried this, but when I first started using this program I thought mine froze as well. It is just the program loading. Honestly thought it was broken but it literally took over 20 minutes to load because I added everything and I think took over 40-45 min the first time I did it because I kept pressing the add button because I thought it wasn't working. If this isn't what you were looking for I apologize, I just know for the most part that is what I was doing wrong.

Post Reply