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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-28-2004, 04:11 AM
LucidTheStick
Fire Beetle
 
Join Date: Jul 2004
Posts: 12
Default Require a GM_KEY for GM lvl 250 and below

file zone/doors.cpp

after:
Code:
extern Database database;
extern EntityList entity_list;
add:
Code:
//Define GM key item_id:
#define GM_KEY 100001
change:
Code:
if (sender->GetGM())		// GM can always open locks - should probably be changed to require a key
		{
			sender->Message_StringID(4,DOORS_GM);
			if( !IsDoorOpen() || opentype == 58 )
			{ 
				md->action = 0x02; 
			} 
			else
			{ 
				md->action = 0x03; 
			} 
		}
		else if (playerkey)
		{	// they have something they are trying to open it with
			if (keyneeded && keyneeded == playerkey)
			{	// key required and client is using the right key 
				sender->Message(4,"You got it open!");		// more debug spam
				if( !IsDoorOpen() || opentype == 58 )
				{ 
					md->action = 0x02; 
				} 
				else
				{ 
					md->action = 0x03; 
				} 
			}
to:
Code:
if (sender->Admin() > 250)		// GM higher than 250 can always open doors
		{
			sender->Message_StringID(4,DOORS_GM);
			if( !IsDoorOpen() || opentype == 58 )
			{ 
				md->action = 0x02; 
			} 
			else
			{ 
				md->action = 0x03; 
			} 
		}
		else if (playerkey)
		{	// they have something they are trying to open it with
			if (keyneeded && keyneeded == playerkey)
			{	// key required and client is using the right key 
				sender->Message(4,"You got it open!");		// more debug spam
				if( !IsDoorOpen() || opentype == 58 )
				{ 
					md->action = 0x02; 
				}
				else
				{ 
					md->action = 0x03; 
				} 
			}
			else if (GM_KEY == playerkey)		// Player using GM key
			{
				sender->Message_StringID(4,DOORS_GM);
				if( !IsDoorOpen() || opentype == 58 )
				{ 
					md->action = 0x02; 
				} 
				else
				{ 
					md->action = 0x03; 
				} 
			}
There you go.
Not much but I was bored and saw a note about it should require a key not just GM =)

EDIT: Should be fixed to read lvl instead if GM (was REALLY tired. lol)
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 04:02 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3