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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 09-05-2004, 06:58 PM
monalin crusader
Hill Giant
 
Join Date: May 2004
Posts: 238
Default

Ok now if u dont want red titles do this, Forget about branks code (no offence i just dont use it since mine is a complete different way of doing it)

goto mob.cpp
search for // if they're dueling they can go at it

*EDIT** This is the one around line 2129 there are 2 places in this code where its got it make sure to get the right one or it will not work.

go a couple lines down and after

Code:
				else if	// if they're dueling they can go at it
				(
					c1->IsDueling() &&
					c2->IsDueling() &&
					c1->GetDuelTarget() == c2->GetID() &&
					c2->GetDuelTarget() == c1->GetID()
				)
					return true;
insert in this

Code:
		// Monalin: PvP in certian zones only replace zone ID's with zones you want
				else if ((zone->GetZoneID() == 21) || (zone->GetZoneID() == 6))
				{
					int c1_level = c1->GetLevel(); // Level of client 1
					int c2_level = c2->GetLevel(); // Level of client 2

					// If they are within 4 levels of each other fight.
					if(((c1_level + 4) >= c2_level) && ((c2_level + 4) >= c1_level))
						return true;
					else 
						return false;
				}
Insert in whatever zoneid's ou like u can have as many as you like also, if u want to change the level ranges u can attack in.

Alternate code
if u would like to use it instead it hasent been tested but its a little easier to change the level range u can attack in i dont care what you use.

Code:
					// Monalin: PvP in certian zones only replace zone ID's with zones you want
				else if ((zone->GetZoneID() == 21) || (zone->GetZoneID() == 6))
				{
					int c1_level = c1->GetLevel(); // Level of client 1
					int c2_level = c2->GetLevel(); // Level of client 2
					unsigned int level_diff;

					level_diff = c1_level - c2_level;

					// If they are within 4 levels of each other fight.
					if(level_diff > 4)
						return true;
					else 
						return false;
				}
__________________
Ascending Dawn Server Op
Coder/Quester/Mysql
Reply With Quote
 


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:32 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