Example #1
0
        public override bool OnSkillUse(Mobile from, int Skill)
        {
            if (from.IsPlayer())
                from.SendMessage("You may not use skills in jail.");

            return (from.IsStaff());
        }
Example #2
0
 public override bool AllowHousing(Mobile from, Point3D p)
 {
     if (from.IsPlayer())
         return false;
     else
         return base.AllowHousing(from, p);
 }
		public override void OnMovement(Mobile m, Point3D oldLocation)
		{
			if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
				Effects.PlaySound(this.Location, this.Map, m_Sounds[Utility.Random(m_Sounds.Length)]);
				
			base.OnMovement(m, oldLocation);
		}
Example #4
0
        public override bool OnBeginSpellCast(Mobile from, ISpell s)
        {
            if (from.IsPlayer())
                from.SendLocalizedMessage(502629); // You cannot cast spells here.

            return (from.IsStaff());
        }
Example #5
0
        public override bool AllowHarmful(Mobile from, Mobile target)
        {
            if (from.IsPlayer())
                from.SendMessage("You may not do that in jail.");

            return (from.IsStaff());
        }
Example #6
0
 public override void OnDoubleClick(Mobile from)
 {
     if (from.IsPlayer())
     {
         from.SendMessage("Your not a Staff member, you may not wear this Item..."); 
         this.Delete();
     }
 }
Example #7
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (this.m_TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
            {
                this.PlaySound(m);
            }

            base.OnMovement(m, oldLocation);
        }
Example #8
0
        }// Bone couch
        public override bool OnMoveOver(Mobile m)
        {
            bool allow = base.OnMoveOver(m);

            if (allow && m.Alive && m.Player && (m.IsPlayer() || !m.Hidden))
                Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x547, 0x54A));

            return allow;
        }
Example #9
0
 public override bool OnEquip(Mobile from)
 {
     if (from.IsPlayer())
     {
         from.SendMessage("Your not a Staff member, you may not wear this Item..."); 
         this.Delete();
     }
     return true;
 }
Example #10
0
        public override void OnLocationChanged(Mobile m, Point3D oldLocation)
        {
            base.OnLocationChanged(m, oldLocation);
			
            this.StopTimer(m);
			
            if (m.Player && m.Alive && m.IsPlayer())
                this.StartTimer(m);
        }
Example #11
0
        public override bool OnTarget(Mobile m, Target t, object o)
        {
            if (m.Spell != null && m.Spell is MarkSpell && m.IsPlayer())
            {
                m.SendLocalizedMessage(501800); // You cannot mark an object at that location.
                return false;
            }

            return base.OnTarget(m, t, o);
        }
Example #12
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
            {
                this.PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.RandomMinMax(1073207, 1073216));
                Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x5A, 0xE9));
            }
				
            base.OnMovement(m, oldLocation);
        }
Example #13
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)
        {
            if ((s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && m.IsPlayer())
            {
                m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
				
                return false;
            }
			
            return base.OnBeginSpellCast(m, s);
        }
Example #14
0
 public override bool OnBeginSpellCast(Mobile m, ISpell s)
 {
     if ((s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && m.IsPlayer())
     {
         m.SendMessage("You cannot cast that spell here.");
         return false;
     }
     else
     {
         return base.OnBeginSpellCast(m, s);
     }
 }
Example #15
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
            {
                this.PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.RandomList(1073326, 1073328, 1073329, 1073330, 1073331));

                if (Utility.RandomBool())
                    Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x30A, 0x313));
                else
                    Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x419, 0x422));
            }

            base.OnMovement(m, oldLocation);
        }
Example #16
0
        public override string OnIdentify(Mobile from)
        {
            if (from.IsPlayer())
                return null;

            if (this.Expiration > TimeSpan.Zero)
            {
                return String.Format("Quest '{2}' Completed {0} expires in {1} mins", this.Date, this.Expiration.TotalMinutes, this.Name);
            }
            else
            {
                return String.Format("Quest '{1}' Completed {0}", this.Date, this.Name);
            }
        }
Example #17
0
        public override string OnIdentify(Mobile from)
        {
            if (from == null || from.IsPlayer())
                return null;

            if (this.Expiration > TimeSpan.Zero)
            {
                return String.Format("{2} = {0} : expires in {1} mins", this.Data, this.Expiration.TotalMinutes, this.Name);
            }
            else
            {
                return String.Format("{1} = {0}", this.Data, this.Name);
            }
        }
Example #18
0
        public override void OnEnter(Mobile m)
        {
            base.OnEnter(m);
		
            if (m.Player && m.Alive && m.IsPlayer())
            {
                if (this.EnterSound > 0)
                    m.PlaySound(this.EnterSound);
				
                if (this.EnterMessage > 0)	
                    m.SendLocalizedMessage(this.EnterMessage); 
				
                this.StartTimer(m);
            }
        }
Example #19
0
        public override bool OnDoubleClick(Mobile m, object o)
        {
            if (o is Corpse)
            {
                // dont allow other players to loot corpses while a challenge game is present
                if ((this.ChallengeGame != null) && !this.ChallengeGame.Deleted && (m != null) && !(((Corpse)o).Owner is BaseCreature) &&
                    (((Corpse)o).Owner != m) && (m.IsPlayer()))
                {
                    XmlPoints.SendText(m, 100105); // "You are not allowed to open that here."
                    return false;
                }
            }

            return base.OnDoubleClick(m, o);
        }
Example #20
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (this.TurnedOn && this.IsLockedDown && (!m.Hidden || m.IsPlayer()) && Utility.InRange(m.Location, this.Location, 2) && !Utility.InRange(oldLocation, this.Location, 2))
            {
                int cliloc = Utility.RandomMinMax(1073266, 1073286);

                if (cliloc == 1073282)
                    cliloc -= 1;

                this.PublicOverheadMessage(MessageType.Regular, 0x3B2, cliloc);
                Effects.PlaySound(this.Location, this.Map, Utility.Random(0x17));
            }
				
            base.OnMovement(m, oldLocation);
        }
Example #21
0
        public override string OnIdentify(Mobile from)
        {
            base.OnIdentify(from);

            if (from == null || from.IsPlayer())
                return null;

            if (this.Expiration > TimeSpan.Zero)
            {
                return String.Format("Freeze expires in {1} secs", this.Expiration.TotalSeconds);
            }
            else
            {
                return String.Format("Frozen");
            }
        }
Example #22
0
        public override string OnIdentify(Mobile from)
        {
            base.OnIdentify(from);

            if (from == null || from.IsPlayer())
                return null;

            if (this.Expiration > TimeSpan.Zero)
            {
                return String.Format("Hue {0} expires in {1} mins", this.m_Hue, this.Expiration.TotalMinutes);
            }
            else
            {
                return String.Format("Hue {0}", this.m_Hue);
            }
        }
Example #23
0
        public override bool OnMoveOver(Mobile m)
        {
            if (m.Alive && (m.IsPlayer() || !m.Hidden))
            {
                if (m.Player)
                {
                    if (m.Female)
                        Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x53B, 0x53D));
                    else
                        Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x53E, 0x540));
                }

                if (this.m_Timer == null || !this.m_Timer.Running)
                    (this.m_Timer = new InternalTimer(m)).Start();
            }

            return true;
        }
Example #24
0
 public override bool OnMoveOver(Mobile m)
 {
     if (m is PlayerMobile && m.Alive && m.IsPlayer())
     {
         switch (Utility.Random(3))
         {
             case 0:
                 this.RunSequence(m, 1095160, false);
                 break; //You steadily walk over the slippery surface.
             case 1:
                 this.RunSequence(m, 1095161, true);
                 break; //You skillfully manage to maintain your balance.
             default:
                 this.RunSequence(m, 1095162, true);
                 break; //You lose your footing and ungracefully splatter on the ground.
         }
     }
     return base.OnMoveOver(m);
 }
Example #25
0
        public override bool OnMoveOver(Mobile m)
        {
            if (this.m_Target != null && !this.m_Target.Deleted)
            {
                if (this.CheckAccess(m))
                {
                    if (!m.Hidden || m.IsPlayer())
                        new EffectTimer(this.Location, this.Map, 2023, 0x1F0, TimeSpan.FromSeconds(0.4)).Start();

                    new DelayTimer(this, m).Start();
                }
                else
                {
                    m.SendLocalizedMessage(1061637); // You are not allowed to access this.
                }
            }

            return true;
        }
Example #26
0
        public override void OnMovement(Mobile m, Point3D old)
        {
            base.OnMovement(m, old);

            if (m.Alive && m.Player && (m.IsPlayer() || !m.Hidden))
            {
                if (!Utility.InRange(old, this.Location, 2) && Utility.InRange(m.Location, this.Location, 2))
                {
                    if (this.ItemID == 0x2A7B || this.ItemID == 0x2A7D)
                    {
                        Effects.PlaySound(this.Location, this.Map, Utility.RandomMinMax(0x551, 0x553));
                        this.ItemID += 1;
                    }
                }
                else if (Utility.InRange(old, this.Location, 2) && !Utility.InRange(m.Location, this.Location, 2))
                {
                    if (this.ItemID == 0x2A7C || this.ItemID == 0x2A7E)
                        this.ItemID -= 1;
                }
            }
        }
Example #27
0
 public override void OnMovement(Mobile m, Point3D old)
 {
     if (m.Alive && m.Player && (m.IsPlayer() || !m.Hidden))
     {
         if (!Utility.InRange(old, this.Location, 2) && Utility.InRange(m.Location, this.Location, 2))
         {
             if (this.ItemID == 0x2A69 || this.ItemID == 0x2A6D)
             {
                 this.Up();
                 Timer.DelayCall(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, new TimerCallback(Up));
             }
         }
         else if (Utility.InRange(old, this.Location, 2) && !Utility.InRange(m.Location, this.Location, 2))
         {
             if (this.ItemID == 0x2A6C || this.ItemID == 0x2A70)
             {
                 this.Down();
                 Timer.DelayCall(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, new TimerCallback(Down));
             }
         }
     }
 }
Example #28
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Item)
                {
                    Item item = (Item)targeted;

                    if (item.Movable == false && from.IsPlayer())
                        return;

                    Type type = targeted.GetType();

                    FlipableAttribute[] AttributeArray = (FlipableAttribute[])type.GetCustomAttributes(typeof(FlipableAttribute), false);

                    if (AttributeArray.Length == 0)
                    {
                        return;
                    }

                    FlipableAttribute fa = AttributeArray[0];

                    fa.Flip((Item)targeted);
                }
            }
Example #29
0
        public bool UseGate(Mobile from)
        {
            if (DuelContext.CheckCombat(from))
            {
                from.SendMessage(0x22, "You have recently been in combat with another player and cannot use this moongate.");
                return false;
            }
            else if (from.Spell != null)
            {
                from.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
                return false;
            }
            else
            {
                from.CloseGump(typeof(ArenaGump));
                from.SendGump(new ArenaGump(from, this));

                if (!from.Hidden || from.IsPlayer())
                    Effects.PlaySound(from.Location, from.Map, 0x20E);

                return true;
            }
        }
Example #30
0
        public bool UseGate(Mobile m)
        {
            if (m.Criminal)
            {
                m.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily.
                return false;
            }
            else if (SpellHelper.CheckCombat(m))
            {
                m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
                return false;
            }
            else if (m.Spell != null)
            {
                m.SendLocalizedMessage(1049616); // You are too busy to do that at the moment.
                return false;
            }
            else if (m.Holding != null)
            {
                m.SendLocalizedMessage(1071955); // You cannot teleport while dragging an object.
                return false;
            }
            else
            {
                m.CloseGump(typeof(MoongateGump));
                m.SendGump(new MoongateGump(m, this));

                if (!m.Hidden || m.IsPlayer())
                    Effects.PlaySound(m.Location, m.Map, 0x20E);

                return true;
            }
        }