コード例 #1
0
        protected override void OnTarget(Mobile from, object o)
        {
            if (o is SorcerersRewardChest)
            {
                SorcerersRewardChest chest = (SorcerersRewardChest)o;

                Container box = (Container)chest;

                box.DropItem(new SalvagerSuitPlans());

                m_From.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154228); // *You insert the key into the mechanism and turn it. To your delight the lock opens with a click and you remove the contents*

                chest.Locked = false;

                m_Key.Delete();
            }
        }
コード例 #2
0
        protected override void OnTarget(Mobile from, object o)
        {
            if (o is SorcerersRewardChest)
            {
                Item      item = new SalvagerSuitPlans();
                Container pack = from.Backpack;

                if (pack == null || !pack.TryDropItem(from, item, false))
                {
                    from.BankBox.DropItem(item);
                }

                m_From.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154228); // *You insert the key into the mechanism and turn it. To your delight the lock opens with a click and you remove the contents*

                m_Key.Delete();
            }
            else
            {
                from.SendLocalizedMessage(501668); // This key doesn't seem to unlock that.
            }
        }