Go Back   RunUO - Ultima Online Emulation > RunUO > Server Support on Windows

Server Support on Windows Get (and give) support on general questions related to the RunUO server itself.

Reply
 
Thread Tools Display Modes
Old 03-12-2006, 10:06 AM   #1 (permalink)
Account Terminated
 
Join Date: Nov 2004
Age: 22
Posts: 22
Default Need help with certain type of monster

I have tryed the CanSee property, but havnt succeded, the whole thing im trying to do is making a monster only visible to dead people. So its hidden when your alive as a player, but when your dead you can see it.

hmm ops wrong part of the forum, should be in script support isntead of server support, someone could move?

Last edited by nokofp; 03-12-2006 at 11:26 AM.
nokofp is offline   Reply With Quote
Old 03-13-2006, 01:38 AM   #2 (permalink)
ConnectUO Creator
 
Jeff's Avatar
 
Join Date: Jan 2004
Age: 28
Posts: 4,891
Default

Quote:
Originally Posted by nokofp
I have tryed the CanSee property, but havnt succeded, the whole thing im trying to do is making a monster only visible to dead people. So its hidden when your alive as a player, but when your dead you can see it.

hmm ops wrong part of the forum, should be in script support isntead of server support, someone could move?
what you want is kinda advanced i would download the runuo source and look at how players are seen and not seen as a ghost and how they can see other ghosts when they are a ghost.
__________________
Jeff Boulanger
ConnectUO - Core Developer

Want to help make ConnectUO better? Click here to submit your ideas/requests
Use your talent to compete against other community members in RunUO hosted coding competitions

If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team.


Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO
Jeff is offline   Reply With Quote
Old 03-13-2006, 02:03 AM   #3 (permalink)
Forum Expert
 
Greystar's Avatar
 
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
Default

for PM stuff

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

			if ( m is PlayerMobile && !( ( (PlayerMobile)m ).AccessLevel > AccessLevel.Player ) && ( !( (PlayerMobile)m ).Alive && this.Skills[SkillName.SpiritSpeak].Value >= 100 ) )
				return true;

			return base.CanSee( m );
		}

		public override bool CanSee( Item item )
		{
			if ( m_DesignContext != null && m_DesignContext.Foundation.IsHiddenToCustomizer( item ) )
				return false;

			return base.CanSee( item );
		}
for core stuff
Code:
		public virtual bool CanSee( object o )
		{
			if ( o is Item )
			{
				return CanSee( (Item) o );
			}
			else if ( o is Mobile )
			{
				return CanSee( (Mobile) o );
			}
			else
			{
				return true;
			}
		}

		public virtual bool CanSee( Item item )
		{
			if ( m_Map == Map.Internal )
				return false;
			else if ( item.Map == Map.Internal )
				return false;

			if ( item.Parent != null )
			{
				if ( item.Parent is Item )
				{
					if ( !CanSee( (Item) item.Parent ) )
						return false;
				}
				else if ( item.Parent is Mobile )
				{
					if ( !CanSee( (Mobile) item.Parent ) )
						return false;
				}
			}

			if ( item is BankBox )
			{
				BankBox box = item as BankBox;

				if ( box != null && m_AccessLevel <= AccessLevel.Counselor && (box.Owner != this || !box.Opened) )
					return false;
			}
			else if ( item is SecureTradeContainer )
			{
				SecureTrade trade = ((SecureTradeContainer)item).Trade;

				if ( trade != null && trade.From.Mobile != this && trade.To.Mobile != this )
					return false;
			}

			return !item.Deleted && item.Map == m_Map && (item.Visible || m_AccessLevel > AccessLevel.Counselor);
		}

		public virtual bool CanSee( Mobile m )
		{
			if ( m_Deleted || m.m_Deleted || m_Map == Map.Internal || m.m_Map == Map.Internal )
				return false;

			return this == m || (
				m.m_Map == m_Map && 
				(!m.Hidden || m_AccessLevel > m.AccessLevel) &&
				(m.Alive || !Alive || m_AccessLevel > AccessLevel.Player || m.Warmode) );
		}
think that pretty much covers where you need to change things

you shouldnt need to touch the core stuff I just figured I'd post it for comparison

PS I removed some edits I had in mine that made it so death and its deathgate showed to dead people only.
__________________
Quote:
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Killable Guards (GS Version)
Just a Simple Staff Tool
You can leave me messages.
Ernest Gary Gygax - Quote "I would like the world to remember me as the guy who really enjoyed playing games and sharing his knowledge and his fun pastimes with everybody else."
Greystar is offline   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