Example #1
0
		protected override void OnTarget( Mobile from, object targeted ) 
		{ 
			if ( from.Name == null)
			{
				from.SendMessage("Your name is not valid fix it now");
				return;
			}
           
			if ( targeted is Mobile )
			{ 
				Mobile m_target = (Mobile)targeted;
				from.PublicOverheadMessage(MessageType.Emote ,20, true,"*" + from.Name + " Points at*");
            	
				if ( m_target.Name != null)
					m_target.PublicOverheadMessage(MessageType.Emote ,20,true, "*" + m_target.Name + "*");
				else
					m_target.PublicOverheadMessage(MessageType.Emote ,20,true,"*"+ from.Name + " whatever it is!*");
			}
			else if ( targeted is Item ) 
			{ 
				Item m_target = (Item)targeted;
				from.PublicOverheadMessage(MessageType.Emote ,20, true,"*" + from.Name + " Points at*");
				if (m_target.Name != null)
					m_target.PublicOverheadMessage(MessageType.Emote ,20,true, "* " + m_target.Name + "*");
				else
					m_target.PublicOverheadMessage(MessageType.Emote ,20,true, "*Points Here*");
			}
			else 
			{
				IPoint3D p = targeted as IPoint3D; 

				if ( p != null ) 
				{
					Map map = from.Map;
					Item pointer = new Item (8302);
					Point3D m_point = new Point3D(p);
					pointer.MoveToWorld(m_point,map);
					pointer.Movable = false;
					PointTimer p_time = new PointTimer(pointer);
					from.PublicOverheadMessage(MessageType.Emote ,20, true, "*" + from.Name.ToString() + " Points at*");
					pointer.PublicOverheadMessage(MessageType.Emote ,20, true, "*This Spot*" );
				}
				else
				{ 
					from.SendMessage( "Cannot point at this for some reason!" ); 
				} 
			}     
		}
Example #2
0
		public void ReleaseSecure( Mobile m, Item item )
		{
			if ( m_Secures == null || !IsOwner( m ) || item is StrongBox || !IsActive )
				return;

			for ( int i = 0; i < m_Secures.Count; ++i )
			{
				SecureInfo info = (SecureInfo)m_Secures[i];

				if ( info.Item == item && HasSecureAccess( m, info.Level ) )
				{
					item.IsLockedDown = false;
					item.IsSecure = false;

					#region Mondain's Legacy
					if ( item is BaseAddonContainer )
						item.Movable = false;
					else
					#endregion

					item.Movable = true;
					item.SetLastMoved();
					item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, 501656 );//[no longer secure]
					m_Secures.RemoveAt( i );
					return;
				}
			}

			m.SendLocalizedMessage( 501717 );//This isn't secure...
		}
Example #3
0
		public void Release( Mobile m, Item item )
		{
			if ( !IsCoOwner( m ) || !IsActive )
				return;

			if ( IsLockedDown( item ) )
			{
				item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, 501657 );//[no longer locked down]
				SetLockdown( item, false );
				//TidyItemList( m_LockDowns );
			}
			else if ( IsSecure( item ) )
			{
				ReleaseSecure( m, item );
			}
			else
			{
				m.SendLocalizedMessage( 501722 );//That isn't locked down...
			}
		}
Example #4
0
        public void Release( Mobile m, Item item )
        {
            if ( !IsCoOwner( m ) || !IsActive )
                return;

            if ( IsLockedDown( item ) )
            {
                item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, 501657 );//[no longer locked down]
                SetLockdown( item, false );
                //TidyItemList( m_LockDowns );

                if ( item is RewardBrazier )
                    ((RewardBrazier) item).TurnOff();
            }
            else if ( IsSecure( item ) )
            {
                ReleaseSecure( m, item );
            }
            else
            {
                m.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1010416 ); // This is not locked down or secured.
            }
        }
Example #5
0
        public void ReleaseSecure( Mobile m, Item item )
        {
            if ( m_Secures == null || item is StrongBox || !IsActive )
                return;

            for ( int i = 0; i < m_Secures.Count; ++i )
            {
                SecureInfo info = (SecureInfo)m_Secures[i];

                if ( info.Item == item )
                {
                    item.IsLockedDown = false;
                    item.IsSecure = false;
                    item.Movable = true;
                    item.SetLastMoved();
                    item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, true, "no longer secure" );//no longer secure
                    m_Secures.RemoveAt( i );

                    //disable protection
                    if ( this.LockDownCount == 0 && this.SecureCount == 0 )
                    {
                        DisableProtection( m );
                    }
                    return;
                }
            }

            m.SendAsciiMessage( "This isn't secure..." );//This isn't secure...
        }
Example #6
0
        public void Release( Mobile m, Item item )
        {
            if ( !IsKeyOwner( m ) || !IsActive )
                return;

            if ( IsLockedDown( item ) )
            {
                item.PublicOverheadMessage( Server.Network.MessageType.Label, 0x3B2, true, "no longer locked down" );//[no longer locked down]
                SetLockdown( item, false );

                //disable protection
                if ( this.LockDownCount == 0 && this.SecureCount == 0 )
                {
                    DisableProtection( m );
                }

                if ( item is RewardBrazier )
                    ((RewardBrazier) item).TurnOff();
            }
            else if ( IsSecure( item ) )
            {
                ReleaseSecure( m, item );
            }
            else
            {
                m.LocalOverheadMessage( MessageType.Regular, 0x3E9, true, "This is not locked down or secured." ); // This is not locked down or secured.
            }
        }
 public override void Carve( Mobile from, Item with )
 {
     if ( IsAccessibleTo( from ) )
         with.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071896 ); // This is too crude an implement for such a procedure.
 }
Example #8
0
		public PointTarget(Mobile from, Item targeted) : base( -1, true, TargetFlags.None ) 
		{
			from.PublicOverheadMessage(MessageType.Emote ,20, true, from.Name.ToString() + " Points There");
			targeted.PublicOverheadMessage(MessageType.Emote ,20,true, from.Name.ToString() + " Points Here"); 	
		}
Example #9
0
        public bool LockDown( Mobile m, Item item, bool checkIsInside )
        {
            if ( !IsCoOwner( m ) || !IsActive )
                return false;

            if ( item.Movable && !IsSecure( item ) )
            {
                Item rootItem = item.RootParent as Item;

                if ( checkIsInside && item.RootParent is Mobile )
                {
                    m.SendLocalizedMessage( 1005525 ); // That is not in your house
                }
                else if ( checkIsInside && !IsInside( item.GetWorldLocation(), item.ItemData.Height ) )
                {
                    m.SendLocalizedMessage( 1005525 ); // That is not in your house
                }
                else if ( IsSecure( rootItem ) )
                {
                    m.SendLocalizedMessage( 501737 ); // You need not lock down items in a secure container.
                }
                else if ( rootItem != null )
                {
                    m.SendLocalizedMessage( 1005525 ); // That is not in your house
                }
                else if ( item.Stackable && ( ( !(item is Gold) && item.Amount > 2 ) || item.Amount > 10 ) )
                {
                    m.SendMessage( "You can not lock this down." );
                }
                else if (this.LockDownCount + 1 > m_MaxLockDowns)
                {
                    m.SendLocalizedMessage( 1005379 );//That would exceed the maximum lock down limit for this house
                }
                else
                {
                    // TODO: better way of restricting placement near stairs?
                    int range = (this is Tower) ? 2 : 1;
                    for ( int i = 0; m_Doors != null && i < m_Doors.Count; ++i )
                    {
                        BaseDoor door = m_Doors[i] as BaseDoor;
                        Point3D p = door.Location;

                        if ( door.Open )
                            p = new Point3D( p.X - door.Offset.X, p.Y - door.Offset.Y, p.Z - door.Offset.Z );

                        //if ( item.Z + 16 >= p.Z && p.Z + 16 >= item.Z )
                        if ( item.Z + 16 >= p.Z && item.Z - 16 <= p.Z )
                        {
                            if ( Utility.InRange( item.Location, p, range ) )
                            {
                                m.SendAsciiMessage( "You cannot lock down items near a door or near stairs." );
                                return false;
                            }
                        }
                    }

                    SetLockdown( item, true );

                    if ( IsLockedDown( item ) )
                        item.PublicOverheadMessage( MessageType.Label, 0x3B2, true, "(locked down)" );

                    return true;
                }
            }
            else if ( m_LockDowns.IndexOf( item ) != -1 )
            {
                m.SendLocalizedMessage( 1005526 );//That is already locked down
                return true;
            }
            else
            {
                m.SendLocalizedMessage( 1005377 );//You cannot lock that down
            }

            return false;
        }