public override void OnClick()
            {
                if (m_Vendor == null || m_Vendor.Deleted || !m_Vendor.EraML)
                {
                    return;
                }

                WeaponEngravingTool tool = WeaponEngravingTool.Find(m_From);

                if (tool != null && tool.UsesRemaining <= 0)
                {
                    if (Banker.GetBalance(m_From, m_Vendor.TypeOfCurrency) >= 100000)
                    {
                        m_From.SendGump(new WeaponEngravingTool.ConfirmGump(tool, m_Vendor));
                    }
                    else
                    {
                        m_Vendor.Say(1076167);                         // You need a 100,000 gold and a blue diamond to recharge the weapon engraver.
                    }
                }
                else
                {
                    m_Vendor.Say(1076164);                     // I can only help with this if you are carrying an engraving tool that needs repair.
                }
            }
Exemple #2
0
            protected override void OnTick()
            {
                if (m_From != null && m_Vendor != null)
                {
                    if (m_Vendor.FocusMob == m_From)
                    {
                        if (Utility.RandomDouble() >= 0.5)
                        {
                            m_Vendor.Say(true, string.Format("Nice speaking to you {0}.", m_From.Name));
                        }
                        else
                        {
                            m_Vendor.Say(true,
                                         string.Format(
                                             "Well it was nice speaking to you {0} but i must go about my business.",
                                             m_From.Name));
                        }

                        m_Vendor.FocusMob = null;
                    }
                }
            }
        public static bool RefillBag(BaseVendor vendor, Mobile from, Item dropped)
        {
            if (dropped is QuestReagentBag)
            {
                QuestReagentBag regBag = (QuestReagentBag)dropped;
                List<RefillEntry> refillEntryList = ERefillUtility.Refill(regBag, regBag.ReagentTypes, vendor, from, false, regBag.BagRefillAmount);
                //int cost = 0;
                int amount = 0;

                foreach (RefillEntry entry in refillEntryList)
                    amount += entry.AmountToRefill;
                    //cost += entry.TotalCost;

                if (amount <= 0)
                    vendor.Say("That bag seems to be full.");
                else
                    from.SendGump(new RefillGump(vendor, from, (QuestReagentBag)dropped, refillEntryList));
                return true;
            }
            return false;
        }