RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

How to make admins see hidden admins

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)
 
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
 
Top