Esempio n. 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is Item)
                {
                    Item examine = (Item)targeted;

                    if (Server.Misc.RelicItems.IsRelicItem(examine) == true)
                    {
                        Container packs = from.Backpack;
                        int       nCost = 25;

                        if (BeggingPose(from) > 0)                           // LET US SEE IF THEY ARE BEGGING
                        {
                            nCost = nCost - (int)((from.Skills[SkillName.Begging].Value * 0.005) * nCost); if (nCost < 1)
                            {
                                nCost = 1;
                            }
                        }
                        int toConsume = nCost;

                        if (packs.ConsumeTotal(typeof(Gold), toConsume))
                        {
                            string toSay = Server.Misc.RelicItems.IdentifyRelicValue(m_Provisioner, from, examine);
                            if (toSay != "")
                            {
                                from.SendMessage(String.Format("You pay {0} gold.", toConsume));
                                m_Provisioner.SayTo(from, toSay);
                            }
                            else
                            {
                                m_Provisioner.SayTo(from, "I cannot put a value on that.");
                            }
                        }
                        else
                        {
                            m_Provisioner.SayTo(from, "It would cost you {0} gold for me to examine that.", toConsume);
                            from.SendMessage("You do not have enough gold.");
                        }
                    }
                    else
                    {
                        m_Provisioner.SayTo(from, "I cannot put a value on that.");
                    }
                }
                /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                else
                {
                    m_Provisioner.SayTo(from, "I cannot put a value on that.");
                }
            }