public override bool OnSkillUse(Mobile from, int Skill) { if (from.IsPlayer()) from.SendMessage("You may not use skills in jail."); return (from.IsStaff()); }
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); }
public override bool OnBeginSpellCast(Mobile from, ISpell s) { if (from.IsPlayer()) from.SendLocalizedMessage(502629); // You cannot cast spells here. return (from.IsStaff()); }
public override bool AllowHarmful(Mobile from, Mobile target) { if (from.IsPlayer()) from.SendMessage("You may not do that in jail."); return (from.IsStaff()); }
public override void OnDoubleClick(Mobile from) { if (from.IsPlayer()) { from.SendMessage("Your not a Staff member, you may not wear this Item..."); this.Delete(); } }
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); }
}// 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; }
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; }
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); }
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); }
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); }
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); }
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); } }
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); }
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); } }
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); } }
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); } }
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); }
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); }
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"); } }
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); } }
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; }
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); }
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; }
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; } } }
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)); } } } }
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); } }
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; } }
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; } }