コード例 #1
0
            public override void OnResponse(Mobile from, string text)
            {
                if (m_Bracelet.Deleted)
                {
                    return;
                }

                if (!m_Bracelet.IsChildOf(from))
                {
                    from.SendLocalizedMessage(1042664); // You must have the object in your backpack to use it.
                }
                else
                {
                    from.SendLocalizedMessage(1054011); // You mark the bracelet with your inscription.
                    m_Bracelet.Inscription = text;
                }
            }
コード例 #2
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Bracelet.Deleted)
                {
                    return;
                }

                if (!m_Bracelet.IsChildOf(from))
                {
                    from.SendLocalizedMessage(1042664); // You must have the object in your backpack to use it.
                }
                else if (targeted is BraceletOfBinding)
                {
                    BraceletOfBinding bindBracelet = (BraceletOfBinding)targeted;

                    if (bindBracelet == m_Bracelet)
                    {
                        from.SendLocalizedMessage(1054012); // You cannot bind a bracelet of binding to itself!
                    }
                    else if (!bindBracelet.IsChildOf(from))
                    {
                        from.SendLocalizedMessage(1042664); // You must have the object in your backpack to use it.
                    }
                    else
                    {
                        from.SendLocalizedMessage(1054003); // You bind the bracelet to its counterpart. The bracelets glow with power.
                        from.PlaySound(0x1FA);

                        m_Bracelet.Bound = bindBracelet;
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1054002); // You can only bind this bracelet to another bracelet of binding!
                }
            }