Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Database/World Building

Archive::Database/World Building Archive area for General Discussion's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-25-2004, 04:24 PM
cabtiz
Fire Beetle
 
Join Date: May 2004
Posts: 15
Default MW_057DR2_alpha_1 (to make last names work)

Okay figured out how to make custom lastnames work so you can make your NPC's appear as Ex.

Dooly Jonkers
(Magician Guildmaster)



First off the latest CVS releases refer to a new AC field in the NPC_types table and refer to an mobacupdate.sql which i have not been able to locate in any of the CVS dumps.

SO... first step.. add a new row to your npc_types table called

ac make it an int and set allow nulls to yes.

this simple change will enable custom last names. why? well the zone server supports both an npc_types table with and without that AC field.. however the support for the old table without it does not read in the lastname fields, so they never get loaded. by adding the AC field it says oh your using the new format which then includes loading the lastname field.

now the defaults have to be dealt with if you want to use Custom last names for your trainers and such..

so

edit the following which starts at line 544 in mob.cpp
Code:
// Custom packet data
	NewSpawn_Struct* ns2 = (NewSpawn_Struct*)app->pBuffer;
	strcpy(ns2->spawn.name, ns->spawn.name);
	if (ns->spawn.class_==MERCHANT)
		strcpy(ns2->spawn.last_name, "EQEmu Shopkeeper");
	else if (ns->spawn.class_==TRIBUTE_MASTER)
		strcpy(ns2->spawn.last_name, "Tribute Master");
	else if (ns->spawn.class_==BANKER)
		strcpy(ns2->spawn.last_name, "EQEmu Banker");
	else if (ns->spawn.class_==ADVENTUREMERCHANT)
#ifdef GUILDWARS
		strcpy(ns->spawn.last_name,"GuildWars Merchant");
#else
		strcpy(ns->spawn.last_name,"Adventure Merchant");
#endif
	else
		strcpy(ns2->spawn.last_name, ns->spawn.last_name);
}
to look like

Code:
// Custom packet data
	NewSpawn_Struct* ns2 = (NewSpawn_Struct*)app->pBuffer;
	strcpy(ns2->spawn.name, ns->spawn.name);

		strcpy(ns2->spawn.last_name, ns->spawn.last_name);
}
or just comment out the missing lines.


Then starting at line 629 edit the following

Code:
if(IsNPC())
		ns->spawn.aa_title = 0xFF;
	
	if (ns->spawn.class_==MERCHANT)
		strcpy(ns->spawn.last_name, "EQEmu Shopkeeper");
	else if (ns->spawn.class_==BANKER)
		strcpy(ns->spawn.last_name, "EQEmu Banker");
	else if (ns->spawn.class_==ADVENTUREMERCHANT)
#ifdef GUILDWARS
		strcpy(ns->spawn.last_name,"GuildWars Merchant");
#else
		strcpy(ns->spawn.last_name,"Adventure Merchant");
#endif
	else
		strncpy(ns->spawn.last_name, lastname, 32);

to be

Code:
if(IsNPC())
		ns->spawn.aa_title = 0xFF;
		strncpy(ns->spawn.last_name, lastname, 32);

or again just comment out the lines in between.

used in conjunction with the SQL scripts in this post:

http://www.eqemulator.net/forums/viewtopic.php?t=15086

will make alot of guildmasters, spell vendors and various merchans appear with their fucntion in ()
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 11:28 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3