Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-24-2015, 12:25 AM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

There is a known issue being addressed with the 2015_09_30_bots.sql file.

The update script will report errors at these lines:
- #675
- #735
- #755
- #768
- #779

It was traced to the conditional check for `bot_inventories` regarding the 6th augment slot.

If you're having issues with this, please ask for a solution in this thread.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #2  
Old 11-04-2015, 11:22 PM
dfusion111
Fire Beetle
 
Join Date: Jun 2010
Posts: 15
Default

I updated to latest bot code and found there is a nasty bug with loading bots.
The HP values don't match with the rows its referencing, thus HP is always set to 75 when they are loaded/spawned
(bc it references atk and loads it into the hp field).
I was wondering why every time I spawned a bot it would have low health.
So in bots.cpp LoadBot function, change the atoi(row[27]) to atoi(row[28]) and its fixed!

Figured you guys would want to know.
Here is the whole function(fixed) so you can see what I mean.
Code:
Bot* Bot::LoadBot(uint32 botID, std::string* errorMessage)
{
	if(botID == 0)
		return nullptr;
	
	std::string query = StringFormat(
		"SELECT"
		" `owner_id`,"
		" `spells_id`,"
		" `name`,"
		" `last_name`,"
		" `title`,"				/*planned use[4]*/
		" `suffix`,"			/*planned use[5]*/
		" `zone_id`,"
		" `gender`,"
		" `race`,"
		" `class`,"
		" `level`,"
		" `deity`,"				/*planned use[11]*/
		" `creation_day`,"		/*not in-use[12]*/
		" `last_spawn`,"		/*not in-use[13]*/
		" `time_spawned`,"
		" `size`,"
		" `face`,"
		" `hair_color`,"
		" `hair_style`,"
		" `beard`,"
		" `beard_color`,"
		" `eye_color_1`,"
		" `eye_color_2`,"
		" `drakkin_heritage`,"
		" `drakkin_tattoo`,"
		" `drakkin_details`,"
		" `ac`,"				/*not in-use[26]*/
		" `atk`," // 27 is atk not hp, bug below
		" `hp`,"  // 28 is hp
		" `mana`,"				/*not in-use[29]*/
		" `str`,"				/*not in-use[30]*/
		" `sta`,"				/*not in-use[31]*/
		" `cha`,"				/*not in-use[32]*/
		" `dex`,"				/*not in-use[33]*/
		" `int`,"				/*not in-use[34]*/
		" `agi`,"				/*not in-use[35]*/
		" `wis`,"				/*not in-use[36]*/
		" `fire`,"				/*not in-use[37]*/
		" `cold`,"				/*not in-use[38]*/
		" `magic`,"				/*not in-use[39]*/
		" `poison`,"			/*not in-use[40]*/
		" `disease`,"			/*not in-use[41]*/
		" `corruption`,"		/*not in-use[42]*/
		" `show_helm`,"
		" `follow_distance`"
		" FROM `bot_data`"
		" WHERE `bot_id` = '%u'",
		botID
	);

	auto results = database.QueryDatabase(query);
	if(!results.Success()) {
		*errorMessage = std::string(results.ErrorMessage());
		return nullptr;
	}

	if (results.RowCount() == 0)
		return nullptr;
	
	// TODO: Consider removing resists and basic attributes from the load query above since we're using defaultNPCType values instead
	auto row = results.begin();
	NPCType defaultNPCTypeStruct = CreateDefaultNPCTypeStructForBot(std::string(row[2]), std::string(row[3]), atoi(row[10]), atoi(row[8]), atoi(row[9]), atoi(row[7]));
	NPCType tempNPCStruct = FillNPCTypeStruct(
		atoi(row[1]), //spells id
		std::string(row[2]), //name
		std::string(row[3]), //lastname
		atoi(row[10]), //level
		atoi(row[8]), //race
		atoi(row[9]), //class
		atoi(row[7]), //gender
		atof(row[15]), //size
		atoi(row[16]), //face
		atoi(row[18]), //hairstyle
		atoi(row[17]), //haircolor
		atoi(row[21]), //eyecolor
		atoi(row[22]), //eyecolor2
		atoi(row[20]), //beardcolor
		atoi(row[19]), //beard
		atoi(row[23]), //drakkinheritage
		atoi(row[24]), //drakkingtattoo
		atoi(row[25]), //drakkingdetails
		atoi(row[28]), // HP, bug this should be 28 not 27, row 27 from above is atk not hp!
		atoi(row[29]), // mana
		defaultNPCTypeStruct.MR,
		defaultNPCTypeStruct.CR,
		defaultNPCTypeStruct.DR,
		defaultNPCTypeStruct.FR,
		defaultNPCTypeStruct.PR,
		defaultNPCTypeStruct.Corrup,
		defaultNPCTypeStruct.AC,
		defaultNPCTypeStruct.STR,
		defaultNPCTypeStruct.STA,
		defaultNPCTypeStruct.DEX,
		defaultNPCTypeStruct.AGI,
		defaultNPCTypeStruct.INT,
		defaultNPCTypeStruct.WIS,
		defaultNPCTypeStruct.CHA,
		defaultNPCTypeStruct.ATK
	);

	Bot* loadedBot = new Bot(botID, atoi(row[0]), atoi(row[1]), atof(row[14]), atoi(row[6]), tempNPCStruct);
	if (loadedBot) {
		loadedBot->SetShowHelm((atoi(row[43]) > 0 ? true : false));
		loadedBot->SetFollowDistance(atoi(row[44]));
	}

	return loadedBot;
}
Other than that, I am enjoying the bot updates, I like how they keep their buffs now instead of wasting the mana every time they get spawned
Reply With Quote
  #3  
Old 11-06-2015, 06:35 PM
Sublin
Fire Beetle
 
Join Date: Aug 2010
Posts: 11
Default

Quote:
Originally Posted by Uleat View Post
There is a known issue being addressed with the 2015_09_30_bots.sql file.

The update script will report errors at these lines:
- #675
- #735
- #755
- #768
- #779

It was traced to the conditional check for `bot_inventories` regarding the 6th augment slot.

If you're having issues with this, please ask for a solution in this thread.
I'm running into these errors and a couple more when running the update in the script for bots.

Code:
Running Update: 9000 - 2015_09_30_bots.sql
ERROR 1728 (HY000) at line 18: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 19: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 20: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 22: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 27: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 675: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 677: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 684: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1728 (HY000) at line 700: Cannot load from mysql.proc. The table is probably corrupted
ERROR 1146 (42S02) at line 735: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 755: Table 'peq.bot_groups' doesn't exist
ERROR 1146 (42S02) at line 768: Table 'peq.bot_data' doesn't exist
ERROR 1146 (42S02) at line 779: Table 'peq.bot_guild_members' doesn't exist
Missing DB Update 9000 '2015_09_30_bots.sql'
 [URL] :: https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/git/bots/required/2015_09_30_bots.sql
        [Saved] :: db_update/2015_09_30_bots.sql
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:54 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3