Go Back   RunUO - Ultima Online Emulation > RunUO > FAQ Forum

FAQ Forum A place to find answers to the most frequently asked questions, and a place to post said answers. Do NOT use this forum to ask questions.

Reply
 
Thread Tools Display Modes
Old 04-09-2006, 11:33 AM   #1 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,034
Send a message via Yahoo to Lord_Greywolf
Default How to make admins see hidden admins

i thought i would share this for all of you shard owners out there

(i have this posted is script support - so you may see it there too)

As the owner of a shard - i feel i should be able to see all hidden players, even fellow admins, but they should not be able to see me

so i came up with a fix

it requires a slight edit to the playermobile.cs file
but it does not cause a player wipe or anything

just change:

Code:
		public override bool CanSee( Mobile m )
		{
			if ( m is PlayerMobile && ((PlayerMobile)m).m_VisList.Contains( this ) )
				return true;
			return base.CanSee( m );
		}
to this:

Code:
		public override bool CanSee( Mobile m )
		{
			if ( m is PlayerMobile && ((PlayerMobile)m).m_VisList.Contains( this ) )
				return true;
//added by greywolf
			string AccountName = "XXXXX";
			string AccountPlayer = "aaa";
			if ( this is PlayerMobile) AccountPlayer = Convert.ToString( this.Account);
			if ( this is PlayerMobile && AccountPlayer == AccountName )
				return true;
//end add
			return base.CanSee( m );
		}
the XXXXX is the name of your account

this way - you can "spy" on anybody and they can not spy on you

(the aaa is in there only to stop it from having a null pointer --- so just leave it as is)
Lord_Greywolf is online now   Reply With Quote
Old 04-15-2006, 06:02 PM   #2 (permalink)
Master of the Internet
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,034
Send a message via Yahoo to Lord_Greywolf
Default

ooops - missed one thing in there - using it as it is works - except you see ALL items that are hidden - including internal map items and other junk lol

below is the full part fixed - just needed to add in a chack that is was a mobil you were looking at

Code:
		public override bool CanSee( Mobile m )
		{
			if ( m is PlayerMobile && ((PlayerMobile)m).m_VisList.Contains( this ) )
				return true;
//added by greywolf
			string AccountName = "XXXXX";
			string AccountPlayer = "aaa";
			if ( this is PlayerMobile) AccountPlayer = Convert.ToString( this.Account);
			if ( this is PlayerMobile && AccountPlayer == AccountName && m is PlayerMobile )
				return true;
//end add
			return base.CanSee( m );
		}
sorry about that guys
Lord_Greywolf is online now   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5