Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2004, 02:54 PM
Draupner
Hill Giant
 
Join Date: Jul 2004
Location: In my basement
Posts: 131
Default XP bonuses per zone

Heres the code for adding seperate xp bonuses to each zone. It defaults at 100 which is no bonus. For 2x experience rate set it to 200 for that particular zone.

Source this into your database
Code:
alter table zone add column xpmod int(4) NOT NULL default 100;
database.cpp Line 3295
Code:
int32 Database::SetZoneXPBonus(int32 zoneid) {
	char errbuf[MYSQL_ERRMSG_SIZE];
	char *query = 0;
	MYSQL_RES *result;
	MYSQL_ROW row;

	if (RunQuery(query, MakeAnyLenString(&query, "select distinct xpmod from zone where zoneidnumber=%i", zoneid), errbuf, &result)) {
		safe_delete_array(query);
		if (mysql_num_rows(result) == 1) {
			row = mysql_fetch_row(result);
			int32 ret = 0;
			if (row[0])
				ret = atoi(row[0]);
			mysql_free_result(result);
			return ret;
		}
		mysql_free_result(result);
	}
	else {
		cerr << "Error in GetZoneXPBonus Query '" << query << "' " << errbuf << endl;
		safe_delete_array(query);
		return 0;
	}
	
	return 0;	
}
database.h Line 206
Code:
int32   SetZoneXPBonus(int32);
Client.cpp

Replace
Code:
 
int32 exp = GetEXP() + (int32)((zone->GetEXPMod()) *  (add_exp - add_aaxp));
with
Code:
int32 exp = GetEXP() + (int32)((zone->GetEXPMod()) * (database.SetZoneXPBonus(zone->GetZoneID())/100) * (add_exp - add_aaxp));
Reply With Quote
  #2  
Old 07-09-2004, 03:25 PM
Xabob's Avatar
Xabob
Discordant
 
Join Date: Feb 2004
Location: On your desktop
Posts: 387
Default

Once again man you are a god and are in deserve of Jr Dev
__________________
[12:38] <RangerDown> I watched Napoleon Dynamite the other day
[12:39] <Xabob> omg
[12:39] <Xabob> want me to shoot you now?
[12:39] <RangerDown> and the first words out of my mouth at the start were:
[12:39] <RangerDown> Hey I bet Rog looks like that

Reply With Quote
  #3  
Old 07-09-2004, 04:12 PM
Draupner
Hill Giant
 
Join Date: Jul 2004
Location: In my basement
Posts: 131
Default

Thanks for that comment Xabob, knowing that I'm making peoples servers a more enjoyable experience to play on is why I make these fixes/additions and makes it more enjoyable to continue making them.
Reply With Quote
  #4  
Old 07-09-2004, 04:46 PM
Richardo
Banned
 
Join Date: Oct 2003
Location: Mattmecks Basement
Posts: 546
Default

Roxor
Reply With Quote
  #5  
Old 07-09-2004, 04:46 PM
Draupner
Hill Giant
 
Join Date: Jul 2004
Location: In my basement
Posts: 131
Default

&lt;3 Rich
Reply With Quote
  #6  
Old 07-09-2004, 04:48 PM
Richardo
Banned
 
Join Date: Oct 2003
Location: Mattmecks Basement
Posts: 546
Default

&lt;3
Reply With Quote
Reply


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 08:07 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