|
||
|
|||||||
| Server Support on Windows Get (and give) support on general questions related to the RunUO server itself. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Account Terminated
Join Date: Nov 2004
Age: 22
Posts: 22
|
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. |
|
|
|
|
|
#2 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Age: 28
Posts: 4,891
|
Quote:
__________________
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 |
|
|
|
|
|
|
#3 (permalink) | |
|
Forum Expert
Join Date: Mar 2004
Location: NorthCentral IL, USA
Age: 35
Posts: 3,848
|
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 );
}
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) );
}
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:
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." |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|