Example #1
1
        public override bool CheckSuccess( Mobile from, ILockpickable target )
        {
            // Skeleton key gives +10.0 virtual bonus to Lockpicking skill
            double value = from.Skills[SkillName.Lockpicking].Value + 10.0;

            double minSkill = target.LockLevel;
            double maxSkill = target.MaxLockLevel;

            double chance = ( value - minSkill ) / ( maxSkill - minSkill );

            return from.CheckTargetSkill( SkillName.Lockpicking, target, chance );
        }
Example #2
0
 public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick)
     : base(TimeSpan.FromMilliseconds(200.0))
 {
     this.m_From     = from;
     this.m_Item     = item;
     this.m_Lockpick = lockpick;
 }
Example #3
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (this.m_Item.Deleted)
                {
                    return;
                }

                if (targeted is ILockpickable)
                {
                    ILockpickable item = (ILockpickable)targeted;
                    from.Direction = from.GetDirectionTo(item);

                    if (item.Locked)
                    {
                        from.PlaySound(0x241);

                        new InternalTimer(from, item, this.m_Item).Start();
                    }
                    else
                    {
                        // The door is not locked
                        from.SendLocalizedMessage(502069); // This does not appear to be locked
                    }
                }
                else
                {
                    from.SendLocalizedMessage(501666); // You can't unlock that!
                }
            }
Example #4
0
 public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick) : base(TimeSpan.FromSeconds(3.0))
 {
     m_From     = from;
     m_Item     = item;
     m_Lockpick = lockpick;
     Priority   = TimerPriority.TwoFiftyMS;
 }
Example #5
0
        protected override void BeginLockpick(Mobile from, ILockpickable item)
        {
            if (from is PlayerMobile &&
                item.Locked &&
                QuestHelper.HasQuest <TheTreasureChaseQuest>((PlayerMobile)from) &&
                item is TreasureMapChest &&
                ((TreasureMapChest)item).TreasureMap is BuriedRichesTreasureMap)
            {
                var chest = (TreasureMapChest)item;

                from.PlaySound(0x241);

                Timer.DelayCall(TimeSpan.FromMilliseconds(200), () =>
                {
                    if (item.Locked && from.InRange(chest.GetWorldLocation(), 1))
                    {
                        from.CheckTargetSkill(SkillName.Lockpicking, item, 0, 100);

                        // Success! Pick the lock!
                        from.PrivateOverheadMessage(MessageType.Regular, 1154, 1158252, from.NetState); // *Your recent study of Treasure Hunting helps you pick the lock...*
                        chest.SendLocalizedMessageTo(from, 502076);                                     // The lock quickly yields to your skill.
                        from.PlaySound(0x4A);
                        item.LockPick(from);
                    }
                });
            }
            else
            {
                base.BeginLockpick(from, item);
            }
        }
Example #6
0
 public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick)
     : base(TimeSpan.Zero)
 {
     m_From     = from;
     m_Item     = item;
     m_Lockpick = lockpick;
 }
Example #7
0
        public static bool IsLockedAndTrappedByPlayer(this ILockpickable item)
        {
            bool isTrapEnabled    = item is TrapableContainer && ((TrapableContainer)item).TrapEnabled;
            bool isLockedByPlayer = item.Locker != null && item.Locker.Player;

            return(isLockedByPlayer && isTrapEnabled);
        }
Example #8
0
 public InternalTimer(Mobile from, ILockpickable item, SFMasterSkeletonKey skey) : base(TimeSpan.FromSeconds(3.0))
 {
     m_From   = from;
     m_Item   = item;
     m_Skey   = skey;
     Priority = TimerPriority.TwoFiftyMS;
 }
        public virtual void OnFailure(Mobile from, ILockpickable target)
        {
            // When failed, a 25% chance to break the lockpick
            if (Utility.Random(4) == 0)
            {
                ((Item)target).SendLocalizedMessageTo(from, 502074); // You broke the lockpick.

                from.PlaySound(0x3A4);
                Consume();
            }
        }
Example #10
0
        public virtual void OnFailure(Mobile from, ILockpickable target)
        {
            // When failed, a 25% chance to break the lockpick
            if (Utility.Random(4) == 0)
            {
                ((Item)target).SendLocalizedMessageTo(from, 502074);                      // You broke the lockpick.

                from.PlaySound(0x3A4);
                Consume();
            }
        }
Example #11
0
                public InternalTimer(Mobile from, ILockpickable item, Lockpick lockpick) : base(TimeSpan.FromSeconds(3.5))
                {
                    m_From     = from;
                    m_Item     = item;
                    m_Lockpick = lockpick;
                    Priority   = TimerPriority.TwoFiftyMS;

                    if (from is PlayerMobile)
                    {
                        ((PlayerMobile)from).ResetPlayerAction(this);
                    }
                }
Example #12
0
        public override bool CheckSuccess(Mobile from, ILockpickable target)
        {
            // Skeleton key gives +10.0 virtual bonus to Lockpicking skill
            double value = from.Skills[SkillName.Lockpicking].Value + 10.0;

            double minSkill = target.LockLevel;
            double maxSkill = target.MaxLockLevel;

            double chance = (value - minSkill) / (maxSkill - minSkill);

            return(from.CheckTargetSkill(SkillName.Lockpicking, target, chance));
        }
Example #13
0
        protected virtual void BeginLockpick(Mobile from, ILockpickable item)
        {
            if (item.Locked)
            {
                from.PlaySound(0x241);

                Timer.DelayCall(TimeSpan.FromMilliseconds(200.0), EndLockpick, new object[] { item, from });
            }
            else
            {
                // The door is not locked
                from.SendLocalizedMessage(502069); // This does not appear to be locked
            }
        }
Example #14
0
 protected virtual void BeginLockpick(Mobile from, ILockpickable item)
 {
     if (item.Locked)
     {
         if (item is TreasureMapChest chest && !chest.Guardians.All(g => g.Deleted))
         {
             from.SendLocalizedMessage(1115991); // You must destroy all the guardians before you can unlock the chest.
         }
         else
         {
             from.PlaySound(0x241);
             Timer.DelayCall(TimeSpan.FromMilliseconds(200.0), EndLockpick, new object[] { item, from });
         }
     }
Example #15
0
            protected override void OnTarget(Mobile from, object target)
            {
                bool releaseLock = true;

                if (target is Mobile)
                {
                    from.SendAsciiMessage("You cannot target mobiles");

                    /*
                     *                  if ( from.CheckTargetSkill( SkillName.Forensics, target, 40.0, 100.0 ) )
                     *                  {
                     *                          if ( target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild )
                     *                                  from.SendLocalizedMessage( 501004 );//That individual is a thief!
                     *                          else
                     *                                  from.SendLocalizedMessage( 501003 );//You notice nothing unusual.
                     *                  }
                     *                  else
                     *                  {
                     *                          from.SendLocalizedMessage( 501001 );//You cannot determain anything useful.
                     *                  }
                     */
                }
                else if (target is Corpse)
                {
                    releaseLock = false;
                    new InternalTimer(from, (Corpse)target).Start();
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);                          //This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);                          //You notice nothing unusual.
                    }
                }

                if (releaseLock && from is PlayerMobile)
                {
                    ((PlayerMobile)from).EndPlayerAction();
                }
            }
Example #16
0
 protected virtual void BeginLockpick(Mobile from, ILockpickable item)
 {
     if (item.Locked)
     {
         if (item is TreasureMapChest && TreasureMapInfo.NewSystem && !((TreasureMapChest)item).Guardians.All(g => g.Deleted))
         {
             from.SendLocalizedMessage(1115991); // You must destroy all the guardians before you can unlock the chest.
         }
         else
         {
             from.PlaySound(0x241);
             Timer.DelayCall(TimeSpan.FromMilliseconds(200.0), EndLockpick, new object[] { item, from });
         }
     }
     else
     {
         // The door is not locked
         from.SendLocalizedMessage(502069); // This does not appear to be locked
     }
 }
Example #17
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Item.Deleted)
                {
                    return;
                }

                if (targeted is ILockpickable)
                {
                    ILockpickable item = (ILockpickable)targeted;
                    from.Direction = from.GetDirectionTo(item);

                    if (targeted is Item)
                    {
                        Item targetedItem = (Item)targeted;
                        if (!from.InRange((IPoint2D)targeted, 2))
                        {
                            if (targetedItem.RootParentEntity != from)
                            {
                                from.SendLocalizedMessage(500446);
                            }
                        }
                    }

                    if (item.Locked)
                    {
                        from.PlaySound(0x241);

                        new InternalTimer(from, item, m_Item).Start();
                    }
                    else
                    {
                        // The door is not locked
                        from.SendLocalizedMessage(502069);                           // This does not appear to be locked
                    }
                }
                else
                {
                    from.SendLocalizedMessage(501666);                       // You can't unlock that!
                }
            }
Example #18
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendAsciiMessage("That individual is a thief!");
                        }
                        else
                        {
                            from.SendAsciiMessage("You notice nothing unusual.");
                        }
                    }
                    else
                    {
                        from.SendAsciiMessage("You cannot determain anything useful.");
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (((Body)c.Amount).IsHuman)
                        {
                            c.LabelTo(from, 1042751, (c.Killer == null ? "no one" : c.Killer.Name));                                //This person was killed by ~1_KILLER_NAME~
                        }
                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            c.LabelTo(from, 1042752, sb.ToString());                              //This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            c.LabelTo(from, "The corpse has not be desecrated.");
                        }
                    }
                    else
                    {
                        from.SendAsciiMessage("You cannot determain anything useful.");
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendAsciiMessage("This lock was opened by " + p.Picker.Name);
                    }
                    else
                    {
                        from.SendAsciiMessage("You notice nothing unusual.");
                    }
                }
            }
Example #19
0
 public override void OnFailure( Mobile from, ILockpickable target )
 {
     ConsumeUse();
 }
Example #20
0
 public override void OnSuccess( Mobile from, ILockpickable target )
 {
     ConsumeUse();
 }
            protected override void OnTarget(Mobile from, object target)
            {
                if (from == null)
                {
                    return;
                }

                if (target is Mobile)
                {
                    from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.ForensicsCooldown * 1000);

                    if (from.CheckTargetSkill(SkillName.Forensics, target, 50.0, 120.0, 1.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendLocalizedMessage(501004);                               //That individual is a thief!
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);                               //You notice nothing unusual.
                        }
                    }

                    else
                    {
                        from.SendLocalizedMessage(501001);                           //You cannot determain anything useful.
                    }
                }

                else if (target is Head)
                {
                }

                else if (target is Corpse)
                {
                    Corpse corpse = target as Corpse;

                    if (corpse.Owner is BaseCreature && !corpse.Carved && from.Backpack != null)
                    {
                        BaseCreature bc_Creature = corpse.Owner as BaseCreature;

                        bool foundBladed = false;

                        Item oneHanded = from.FindItemOnLayer(Layer.OneHanded);
                        Item twoHanded = from.FindItemOnLayer(Layer.TwoHanded);

                        if (oneHanded is BaseSword || oneHanded is BaseKnife)
                        {
                            foundBladed = true;
                        }

                        if (twoHanded is BaseSword || twoHanded is BaseKnife)
                        {
                            foundBladed = true;
                        }

                        if (!foundBladed)
                        {
                            Item[] items = from.Backpack.FindItemsByType(typeof(BaseMeleeWeapon));

                            for (int a = 0; a < items.Length; a++)
                            {
                                if (items[a] is BaseSword || items[a] is BaseKnife)
                                {
                                    foundBladed = true;
                                    break;
                                }
                            }
                        }

                        if (!foundBladed)
                        {
                            from.SendMessage("You must have a cutting weapon equipped or in your pack in order to carve this.");
                            return;
                        }

                        bc_Creature.OnCarve(from, corpse);

                        return;
                    }

                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 120.0, 1.0))
                    {
                        Corpse c = (Corpse)target;

                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();

                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            c.LabelTo(from, 1042752, sb.ToString());//This body has been distrubed by ~1_PLAYER_NAMES~
                        }

                        else
                        {
                            c.LabelTo(from, 501002);//The corpse has not be desecrated.
                        }
                    }

                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }

                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;

                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);//This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                }

                else if (target is ResearchMaterials)
                {
                    ResearchMaterials researchMaterials = target as ResearchMaterials;
                    researchMaterials.AttemptResearch(from);
                }
            }
Example #22
0
 public override void OnSuccess(Mobile from, ILockpickable target)
 {
     ConsumeUse();
 }
Example #23
0
				public InternalTimer( Mobile from, ILockpickable item, Lockpick lockpick ) : base( TimeSpan.FromSeconds( 3.5 ) )
				{
					m_From = from;
					m_Item = item;
					m_Lockpick = lockpick;
					Priority = TimerPriority.TwoFiftyMS;

                    if (from is PlayerMobile)
                        ((PlayerMobile)from).ResetPlayerAction(this);
				}
            protected override void OnTarget(Mobile from, object target)
            {
                // Mobile from must have at least 50% of Mobile target's Stealing skill
                double targetstealing = 0;

                if (target is PlayerMobile)
                {
                    targetstealing = ((PlayerMobile)target).Skills[SkillName.Stealing].Value;
                }

                double skillvalue  = from.Skills[SkillName.Forensics].Value;
                double requiredFE  = targetstealing / 2;
                bool   wanted      = false;
                bool   bonusExists = false;
                int    amount      = 0;

                //10 second defualt delay, reset this if invalid target
                from.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds(10.0);

                if (target is Mobile)
                {
                    // Bounties ----
                    if (target is PlayerMobile)
                    {
                        if (skillvalue > 80)
                        {
                            //foreach( Bounty b in BountyKeeper.Bounties )
                            //{
                            //	if ( b.WantedPlayer == (PlayerMobile)target )
                            //	{
                            //		wanted = true;
                            //		amount = b.Reward;
                            //		bonusExists = b.LBBonus;
                            //	}
                            //}
                            if (BountyKeeper.BountiesOnPlayer((PlayerMobile)target) > 0)
                            {
                                wanted = true;
                            }
                            amount      = BountyKeeper.RewardForPlayer((PlayerMobile)target);
                            bonusExists = BountyKeeper.IsEligibleForLBBonus((PlayerMobile)target);

                            if (bonusExists)
                            {
                                amount += BountyKeeper.CurrentLBBonusAmount;
                            }

                            int infoAmount = 1;

                            if (skillvalue > 80)
                            {
                                infoAmount = 1;
                            }
                            if (skillvalue > 95)
                            {
                                infoAmount = Utility.Random(1, 2);
                            }
                            if (skillvalue > 98)
                            {
                                infoAmount = Utility.Random(2, 3);
                            }
                            if (skillvalue == 100)
                            {
                                infoAmount = 3;
                            }

                            string whoWants = bonusExists ? "Lord British" : "an Independant Party";

                            switch (infoAmount)
                            {
                            case 0:
                            {
                                from.SendMessage("You don't recall any bounties out on this person.");

                                break;
                            }

                            case 1:
                            {
                                if (wanted)
                                {
                                    from.SendMessage("That person is wanted.");
                                }
                                else
                                {
                                    from.SendMessage("That person is not wanted.");
                                }

                                break;
                            }

                            case 2:
                            {
                                if (wanted)
                                {
                                    from.SendMessage("That person is wanted by {0}.", whoWants);
                                }
                                else
                                {
                                    from.SendMessage("That person is not wanted.");
                                }

                                break;
                            }

                            case 3:
                            {
                                if (wanted)
                                {
                                    from.SendMessage("That person is wanted by {0} for {1} GP!", whoWants, amount.ToString());
                                }
                                else
                                {
                                    from.SendMessage("That person is not wanted.");
                                }
                                break;
                            }

                            default:
                            {
                                if (wanted)
                                {
                                    from.SendMessage("You don't recall any bounties out on this person.");
                                }
                                else
                                {
                                    from.SendMessage("That person is not wanted.");
                                }
                                break;
                            }
                            }
                        }
                        else
                        {
                            from.SendMessage("You fail to recall any bounties out on this person.");
                        }
                    }
                    else
                    {
                        from.SendMessage("You can not evaluate their status.");
                    }

                    // Theives' guild ----
                    // Plasma : Detection of perma grey in here too

                    // user FE must be at least half of target's stealing
                    if (from.CheckTargetSkill(SkillName.Forensics, target, requiredFE, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendMessage("That person is a scoundrel!");
                        }
                        //from.SendLocalizedMessage( 501004 );//That individual is a thief!
                        else
                        {
                            from.SendMessage("They look fairly honest..");
                            //pla: stop here as we don't do perma unless they are a thief
                            return;
                        }
                        //from.SendLocalizedMessage( 501003 );//You notice nothing unusual.

                        // plasma: detection routine for perma grey!
                        // -----------------------------------------
                        // a) Skill vs Skill check,  FE vs Staling
                        // b) Upon success, very small (scaled with FE) chance for false information
                        // c) Display their status

                        bool   bCriminal = false;                               // perma?
                        Mobile targ      = (Mobile)target;
                        if (targ == null)
                        {
                            return;                                             // just in case
                        }
                        // Grab steal and FE values with a bit of randomess (I stole this direct from DetectHidden.cs!)
                        double ss = from.Skills[SkillName.Forensics].Value + Utility.Random(21) - 10;
                        double ts = targ.Skills[SkillName.Stealing].Value + Utility.Random(21) - 10;

                        // compare skills
                        if (from.AccessLevel >= targ.AccessLevel && (ss >= ts))
                        {
                            // is the target perma?
                            bCriminal = (((PlayerMobile)targ).PermaFlags.Count > 0);

                            // now a small chance for false information, scaled 1% for each % from GM FE
                            if (Utility.RandomDouble() < (0.01 * (100 - from.Skills[SkillName.Forensics].Value + 1)))
                            {
                                bCriminal = !bCriminal;
                            }

                            // Display success message
                            if (bCriminal)
                            {
                                from.SendMessage("You identify them as a criminal!");
                            }
                            else
                            {
                                from.SendMessage("They appear to be a law abiding citizen");
                            }
                        }
                        else
                        {
                            //Display fail message
                            from.SendMessage("You cannot gather enough evidence to reach a reliable conclusion on their criminal status");
                        }                        //end perma
                    }
                    else
                    {
                        // changed from SendLocalizedMessage to be more intuative
                        from.SendMessage("You fail to determine anything useful about that individual's character.");
                    }
                }
                else if (target is Corpse)
                {
                    // Looters ----
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 25.0, 100.0))
                    {
                        Corpse c      = (Corpse)target;
                        Mobile killer = c.Killer;

                        if (killer != null)
                        {
                            c.LabelTo(from, "They were killed by {0}", killer.Name);
                        }
                        else
                        {
                            c.LabelTo(from, "They were killed by no one.");
                        }

                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (((Mobile)c.Looters[i]).AccessLevel <= from.AccessLevel)
                                {
                                    if (sb.ToString() != "")
                                    {
                                        sb.Append(", ");
                                    }
                                    sb.Append(((Mobile)c.Looters[i]).Name);
                                }
                            }
                            if (sb.ToString() != "")
                            {
                                c.LabelTo(from, 1042752, sb.ToString());                                //This body has been distrubed by ~1_PLAYER_NAMES~
                            }
                            else
                            {
                                c.LabelTo(from, 501002);
                            }
                        }
                        else
                        {
                            c.LabelTo(from, 501002);                            //The corpse has not been desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);                        //You cannot determain anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    // Lockables ----
                    ILockpickable p = (ILockpickable)target;

                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);                        //This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);                        //You notice nothing unusual.
                    }
                }
                else
                {
                    from.NextSkillTime = DateTime.Now + TimeSpan.FromSeconds(1.0);
                    from.SendMessage("You have specified an invalid target. Try again.");
                    from.Target = new ForensicTarget();
                    from.RevealingAction();
                }
            }
Example #25
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendAsciiMessage("That individual is a thief!");
                        }
                        //from.SendLocalizedMessage( 501004 );//That individual is a thief!
                        else
                        {
                            from.SendAsciiMessage("You notice nothing unusual.");
                        }
                        //from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                    else
                    {
                        from.SendAsciiMessage("You cannot determain anything useful.");
                        //from.SendLocalizedMessage( 501001 );//You cannot determain anything useful.
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (((Body)c.Amount).IsHuman)
                        {
                            from.Send(new AsciiMessage(c.Serial, c.ItemID, MessageType.Regular, 0, 3, "", String.Format("This person was killed by {0}", (c.Killer == null ? "no one." : c.Killer.Name + "."))));
                        }
                        //c.LabelTo( from, 1042751, ( c.Killer == null ? "no one" : c.Killer.Name ) );//This person was killed by ~1_KILLER_NAME~

                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            from.Send(new AsciiMessage(c.Serial, c.ItemID, MessageType.Regular, 0, 3, "", String.Format("This body has been distrubed by {0}", sb.ToString() + ".")));
                            //c.LabelTo( from, 1042752, sb.ToString() );//This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            from.Send(new AsciiMessage(c.Serial, c.ItemID, MessageType.Regular, 0, 3, "", "The corpse has not be desecrated."));
                            //c.LabelTo( from, 501002 );//The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendAsciiMessage("You cannot determain anything useful.");
                        //from.SendLocalizedMessage( 501001 );//You cannot determain anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendAsciiMessage(String.Format("This lock was opened by {0}", p.Picker.Name));
                        //from.SendLocalizedMessage(1042749, p.Picker.Name);//This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendAsciiMessage("You notice nothing unusual.");
                    }
                    //from.SendLocalizedMessage(501003);//You notice nothing unusual.
                }
            }
Example #26
0
 public InternalTimer( Mobile from, ILockpickable item, Lockpick lockpick )
     : base(TimeSpan.Zero)
 {
     m_From = from;
     m_Item = item;
     m_Lockpick = lockpick;
 }
Example #27
0
        protected virtual void EndLockpick(object state)
        {
            object[]      objs         = (object[])state;
            ILockpickable lockpickable = objs[0] as ILockpickable;
            Mobile        from         = objs[1] as Mobile;

            Item item = (Item)lockpickable;

            if (!from.InRange(item.GetWorldLocation(), 1))
            {
                return;
            }

            if (lockpickable.LockLevel == 0 || lockpickable.LockLevel == -255)
            {
                // LockLevel of 0 means that the door can't be picklocked
                // LockLevel of -255 means it's magic locked
                item.SendLocalizedMessageTo(from, 502073); // This lock cannot be picked by normal means
                return;
            }

            if (from.Skills[SkillName.Lockpicking].Value < lockpickable.RequiredSkill - SkillBonus)
            {
                /*
                 * // Do some training to gain skills
                 * from.CheckSkill( SkillName.Lockpicking, 0, lockpickable.LockLevel );*/
                // The LockLevel is higher thant the LockPicking of the player
                item.SendLocalizedMessageTo(from, 502072); // You don't see how that lock can be manipulated.
                return;
            }

            int maxlevel = lockpickable.MaxLockLevel;
            int minLevel = lockpickable.LockLevel;

            if (lockpickable is Skeletonkey)
            {
                minLevel -= SkillBonus;
                maxlevel -= SkillBonus; //regulars subtract the bonus from the max level
            }

            if (this is MasterSkeletonKey || from.CheckTargetSkill(SkillName.Lockpicking, lockpickable, minLevel, maxlevel))
            {
                // Success! Pick the lock!
                OnUse();

                item.SendLocalizedMessageTo(from, 502076); // The lock quickly yields to your skill.
                from.PlaySound(0x4A);
                lockpickable.LockPick(from);
            }
            else
            {
                // The player failed to pick the lock
                BrokeLockPickTest(from);
                item.SendLocalizedMessageTo(from, 502075); // You are unable to pick the lock.

                if (item is TreasureMapChest && ((Container)item).Items.Count > 0 && 0.25 > Utility.RandomDouble())
                {
                    Container cont = (Container)item;

                    Item toBreak = cont.Items[Utility.Random(cont.Items.Count)];

                    if (!(toBreak is Container))
                    {
                        toBreak.Delete();
                        Effects.PlaySound(item.Location, item.Map, 0x1DE);
                        from.SendMessage(0x20, "The sound of gas escaping is heard from the chest.");
                    }
                }
            }
        }
Example #28
0
 public virtual void OnSuccess(Mobile from, ILockpickable target)
 {
     from.PlaySound(0x4A);
 }
Example #29
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendLocalizedMessage(501004);                              //That individual is a thief!
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);                              //You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);                          //You cannot determain anything useful.
                    }
                }
                else if (target is Coffer)
                {
                    Coffer coffer = (Coffer)target;

                    if (coffer.CofferRobbed > 0)
                    {
                        from.SendMessage("It seems that " + coffer.CofferRobber + " has robbed this coffer of it's gold!");
                    }
                    else
                    {
                        from.SendMessage("That coffer has not been emptied by thieves.");
                    }
                }
                else if (target is LandChest && LandChest.isBody(((Item)target).ItemID))
                {
                    from.SendMessage("This adventurer looks to have been slain by some wild animal.");
                }
                else if (target is LandChest && !LandChest.isBody(((Item)target).ItemID))
                {
                    from.SendMessage("For some reason, this wagon was left behind.");
                }
                else if (target is WaterChest)
                {
                    from.SendMessage("Maybe the owner of this boat fell into the sea and drowned.");
                }
                else if (target is SunkenShip)
                {
                    from.SendMessage("This ship looks as though it seen better days.");
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (c.m_Forensicist != null)
                        {
                            from.SendLocalizedMessage(1042750, c.m_Forensicist);                                // The forensicist  ~1_NAME~ has already discovered that:
                        }
                        else
                        {
                            c.m_Forensicist = from.Name;
                        }

                        if (((Body)c.Amount).IsHuman)
                        {
                            from.SendLocalizedMessage(1042751, (c.Killer == null ? "no one" : c.Killer.Name));                                //This person was killed by ~1_KILLER_NAME~
                        }
                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            from.SendLocalizedMessage(1042752, sb.ToString());                              //This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            from.SendLocalizedMessage(501002);                              //The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);                          //You cannot determine anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);                          //This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);                          //You notice nothing unusual.
                    }
                }
            }
Example #30
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (from == null)
                {
                    return;
                }

                if (target is Mobile)
                {
                    from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.ForensicsCooldown * 1000);

                    if (from.CheckTargetSkill(SkillName.Forensics, target, 50.0, 120.0, 1.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendLocalizedMessage(501004);                               //That individual is a thief!
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);                               //You notice nothing unusual.
                        }
                    }

                    else
                    {
                        from.SendLocalizedMessage(501001);                           //You cannot determain anything useful.
                    }
                }

                else if (target is Head)
                {
                }

                else if (target is Corpse)
                {
                    Corpse corpse = target as Corpse;

                    if (corpse.Owner is BaseCreature && !corpse.Carved && from.Backpack != null)
                    {
                        BaseCreature bc_Creature = corpse.Owner as BaseCreature;

                        bool foundBladed = false;

                        Item oneHanded = from.FindItemOnLayer(Layer.OneHanded);
                        Item twoHanded = from.FindItemOnLayer(Layer.TwoHanded);

                        if (oneHanded is BaseSword || oneHanded is BaseKnife)
                        {
                            foundBladed = true;
                        }

                        if (twoHanded is BaseSword || twoHanded is BaseKnife)
                        {
                            foundBladed = true;
                        }

                        if (!foundBladed)
                        {
                            Item[] items = from.Backpack.FindItemsByType(typeof(BaseMeleeWeapon));

                            for (int a = 0; a < items.Length; a++)
                            {
                                if (items[a] is BaseSword || items[a] is BaseKnife)
                                {
                                    foundBladed = true;
                                    break;
                                }
                            }
                        }

                        if (!foundBladed)
                        {
                            from.SendMessage("You must have a cutting weapon equipped or in your pack in order to carve this.");
                            return;
                        }

                        bc_Creature.OnCarve(from, corpse);

                        return;
                    }

                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 120.0, 1.0))
                    {
                        Corpse c = (Corpse)target;

                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();

                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            c.LabelTo(from, 1042752, sb.ToString());//This body has been distrubed by ~1_PLAYER_NAMES~
                        }

                        else
                        {
                            c.LabelTo(from, 501002);//The corpse has not be desecrated.
                        }
                    }

                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }

                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;

                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);//This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                }

                else if (target is ResearchMaterials)
                {
                    ResearchMaterials researchMaterials = target as ResearchMaterials;
                    researchMaterials.AttemptResearch(from);
                }

                else if (target is SpellScroll)
                {
                    SpellScroll spellScroll = target as SpellScroll;

                    if (spellScroll.MasterStatus == 1 || spellScroll.MasterStatus == 2)
                    {
                        if (from.Skills.Forensics.Value < 95)
                        {
                            from.SendMessage("You do not have enough forensics evaluation skill to make an appropriate research attempt on that.");
                            return;
                        }

                        from.NextSkillTime = Core.TickCount + (int)(SkillCooldown.ForensicsCooldown * 1000);

                        if (from.CheckSkill(SkillName.Forensics, 95, 120, 1.0))
                        {
                            from.SendSound(0x652);
                            from.SendMessage("You learn many a great secret whilst scrying the words held within. You may now apply this researched master scroll to an ancient mystery scroll.");

                            spellScroll.Delete();
                            from.AddToBackpack(new ResearchedMasterScroll());

                            return;
                        }

                        else
                        {
                            if (Utility.RandomDouble() <= .33)
                            {
                                from.SendSound(0x5AE);
                                from.SendMessage("The scroll crumbles to dust before your very eyes and is lost!");

                                spellScroll.Delete();
                            }

                            else
                            {
                                from.SendSound(0x055);
                                from.SendMessage("You diligently sift through the words within the scroll, but are unable to glean any secrets held within.");
                            }

                            return;
                        }
                    }
                }
            }
Example #31
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendLocalizedMessage(501004);//That individual is a thief!
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);//You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (c.m_Forensicist != null)
                        {
                            from.SendLocalizedMessage(1042750, c.m_Forensicist);  // The forensicist  ~1_NAME~ has already discovered that:
                        }
                        else
                        {
                            c.m_Forensicist = from.Name;
                        }

                        if (((Body)c.Amount).IsHuman)
                        {
                            from.SendLocalizedMessage(1042751, (c.Killer == null ? "no one" : c.Killer.Name));//This person was killed by ~1_KILLER_NAME~
                        }
                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            from.SendLocalizedMessage(1042752, sb.ToString());//This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            from.SendLocalizedMessage(501002);//The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);//This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                }
                else if (target is Item)
                {
                    Item item = (Item)target;

                    if (item.HonestyItem && item.HonestyOwner != null)
                    {
                        string region = item.HonestyRegion == null ? "an unknown place" : item.HonestyRegion;

                        if (from.Skills.Forensics.Value >= 65)
                        {
                            from.SendLocalizedMessage(1151521, String.Format("{0}\t{1}", item.HonestyOwner.Name, region)); // This item belongs to ~1_val~ who lives in ~2_val~.
                        }
                        else if (from.Skills.Forensics.Value >= 40)
                        {
                            from.SendLocalizedMessage(1151522, region); // You find seeds from a familiar plant stuck to the item which suggests that this item is from ~1_val~.
                        }
                    }
                }
            }
            public LockPickTimer( Mobile from, ILockpickable item )
                : base(TimeSpan.FromSeconds( 3.0 ))
            {
                m_From = from;
                m_Item = item;
                Priority = TimerPriority.TwoFiftyMS;

                if( from.AccessLevel < AccessLevel.GameMaster )
                    from.RevealingAction();
            }
Example #33
0
 public virtual bool CheckSuccess( Mobile from, ILockpickable target )
 {
     return from.CheckTargetSkill( SkillName.Lockpicking, target, target.LockLevel, target.MaxLockLevel );
 }
Example #34
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        PlayerMobile pm  = target as PlayerMobile;
                        bool         msg = false;

                        if (pm != null)
                        {
                            if (pm.NpcGuild == NpcGuild.ThievesGuild)
                            {
                                from.SendLocalizedMessage(501004);//That individual is a thief!
                                msg = true;
                            }

                            if (pm.HasTempStatLoss)
                            {
                                from.SendMessage("That individual will receive temporary skill and stat loss if they are killed.");
                                msg = true;
                            }
                        }

                        if (!msg)
                        {
                            from.SendLocalizedMessage(501003);//You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (((Body)c.Amount).IsHuman)
                        {
                            c.LabelTo(from, 1042751, (c.Killer == null ? "no one" : c.Killer.Name));//This person was killed by ~1_KILLER_NAME~
                        }
                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(((Mobile)c.Looters[i]).Name);
                            }

                            c.LabelTo(from, 1042752, sb.ToString());//This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            c.LabelTo(from, 501002);//The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }
                else if (target is TrapableContainer)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 25.0, 100.0))
                    {
                        if (((TrapableContainer)target).Trapped)
                        {
                            from.SendAsciiMessage("That container looks very suspicious.");
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);//You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);//You cannot determain anything useful.
                    }
                }

                if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);//This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                }
            }
Example #35
0
                public InternalTimer( Mobile from, ILockpickable item, Lockpick lockpick )
                    : base(TimeSpan.FromSeconds( 30.0 - (from.RawInt / 10) ))
                {
                    m_From = from;
                    m_Item = item;
                    m_Lockpick = lockpick;
                    Priority = TimerPriority.TwoFiftyMS;

                    if( from.AccessLevel < AccessLevel.GameMaster )
                        from.RevealingAction();
                }
Example #36
0
 public virtual bool CheckSuccess(Mobile from, ILockpickable target)
 {
     return(from.CheckTargetSkill(SkillName.Lockpicking, target, target.LockLevel, target.MaxLockLevel));
 }
Example #37
0
 public override void OnFailure(Mobile from, ILockpickable target)
 {
     ConsumeUse();
 }
Example #38
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            if (from.Skills.Forensics.Value > ((PlayerMobile)target).Skills.Forensics.Value)
                            {
                                from.SendMessage("Your intuition tells you this person displays all the signs of a thief.");
                            }
                            else
                            {
                                from.SendLocalizedMessage(501003); //You notice nothing unusual.
                            }
                        }

                        else if (target is PlayerMobile && ((PlayerMobile)target).DisguiseTimeLeft > TimeSpan.FromSeconds(0))
                        {
                            if (from.Skills.Forensics.Value > ((PlayerMobile)target).Skills.Forensics.Value)
                            {
                                from.SendMessage("This person appears to be wearing a disguise.");
                            }
                            else
                            {
                                from.SendLocalizedMessage(501003); //You notice nothing unusual.
                            }
                        }

                        else
                        {
                            from.SendLocalizedMessage(501003); //You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001); //You cannot determine anything useful.
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (((Body)c.Amount).IsHuman)
                        {
                            if (c.Killer.NameMod != null)
                            {
                                c.LabelTo(from, 1042751, (c.Killer == null ? "no one" : c.Killer.NameMod));
                            }

                            else
                            {
                                c.LabelTo(from, 1042751, (c.Killer == null ? "no one" : c.Killer.RawName));
                            }
                        }

                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                if (c.Looters[i].NameMod != null)
                                {
                                    sb.Append(((Mobile)c.Looters[i]).NameMod);
                                }
                                else
                                {
                                    sb.Append(((Mobile)c.Looters[i]).RawName);
                                }
                            }

                            c.LabelTo(from, 1042752, sb.ToString()); //This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            c.LabelTo(from, 501002); //The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001); //You cannot determine anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null && p.Picker.NameMod != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.NameMod);
                    }

                    else if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.RawName);
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);//You notice nothing unusual.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(501003); //You notice nothing unusual.
                }

                EventSink.InvokeSkillUsed(new SkillUsedEventArgs(from, from.Skills[SkillName.Forensics]));
            }
Example #39
0
 public virtual void OnSuccess( Mobile from, ILockpickable target )
 {
     from.PlaySound( 0x4A );
 }
Example #40
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (target is Mobile)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 40.0, 100.0))
                    {
                        if (target is PlayerMobile && ((PlayerMobile)target).NpcGuild == NpcGuild.ThievesGuild)
                        {
                            from.SendLocalizedMessage(501004);                            //That individual is a thief!
                        }
                        else
                        {
                            from.SendLocalizedMessage(501003);                            //You notice nothing unusual.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);                        //You cannot determain anything useful.
                    }
                }
                else if (target is Corpse)
                {
                    if (from.CheckTargetSkill(SkillName.Forensics, target, 0.0, 100.0))
                    {
                        Corpse c = (Corpse)target;

                        if (c.m_Forensicist != null)
                        {
                            from.SendLocalizedMessage(1042750, c.m_Forensicist);                             // The forensicist  ~1_NAME~ has already discovered that:
                        }
                        else
                        {
                            c.m_Forensicist = from.Name;
                        }

                        if (((Body)c.Amount).IsHuman)
                        {
                            from.SendLocalizedMessage(1042751, (c.Killer == null ? "no one" : c.Killer.Name));                            //This person was killed by ~1_KILLER_NAME~
                        }
                        if (c.Looters.Count > 0)
                        {
                            StringBuilder sb = new StringBuilder();
                            for (int i = 0; i < c.Looters.Count; i++)
                            {
                                if (i > 0)
                                {
                                    sb.Append(", ");
                                }
                                sb.Append(c.Looters[i].Name);
                            }

                            from.SendLocalizedMessage(1042752, sb.ToString());                            //This body has been distrubed by ~1_PLAYER_NAMES~
                        }
                        else
                        {
                            from.SendLocalizedMessage(501002);                            //The corpse has not be desecrated.
                        }
                    }
                    else
                    {
                        from.SendLocalizedMessage(501001);                        //You cannot determain anything useful.
                    }
                }
                else if (target is ILockpickable)
                {
                    ILockpickable p = (ILockpickable)target;
                    if (p.Picker != null)
                    {
                        from.SendLocalizedMessage(1042749, p.Picker.Name);                        //This lock was opened by ~1_PICKER_NAME~
                    }
                    else
                    {
                        from.SendLocalizedMessage(501003);                        //You notice nothing unusual.
                    }
                }
            }
Example #41
0
 public InternalTimer( Mobile from, ILockpickable item, Lockpick lockpick )
     : base(TimeSpan.FromSeconds( 3.0 ))
 {
     m_From = from;
     m_Item = item;
     m_Lockpick = lockpick;
     Priority = TimerPriority.TwoFiftyMS;
 }