Ejemplo n.º 1
0
        public override void OnDoubleClick(Mobile from)
        {
            bool anvil, forge;

            Server.Engines.Craft.DefBlacksmithy.CheckAnvilAndForge(from, 2, out anvil, out forge);

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1060640);                   // The item must be in your backpack to use it.
            }
            else if (!forge)
            {
                from.SendMessage("You need to be near a forge to smelt that.");
            }
            else if (from.Skills[SkillName.Blacksmith].Value >= 50)
            {
                if (this.Name == "onyx stones")
                {
                    Item ingot = new OnyxIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "quartz stones")
                {
                    Item ingot = new QuartzIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "ruby stones")
                {
                    Item ingot = new RubyIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "sapphire stones")
                {
                    Item ingot = new SapphireIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "spinel stones")
                {
                    Item ingot = new SpinelIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "topaz stones")
                {
                    Item ingot = new TopazIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "amethyst stones")
                {
                    Item ingot = new AmethystIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "emerald stones")
                {
                    Item ingot = new EmeraldIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "garnet stones")
                {
                    Item ingot = new GarnetIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "star ruby stones")
                {
                    Item ingot = new StarRubyIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "gargish marble stones")
                {
                    Item ingot = new MarbleIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "jade stones")
                {
                    Item ingot = new JadeIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "mystical ice stones")
                {
                    Item ingot = new IceIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "silver stones")
                {
                    Item ingot = new ShinySilverIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "copper stones")
                {
                    Item ingot = new CopperIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "verite stones")
                {
                    Item ingot = new VeriteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "valorite stones")
                {
                    Item ingot = new ValoriteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "agapite stones")
                {
                    Item ingot = new AgapiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "bronze stones")
                {
                    Item ingot = new BronzeIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "dull copper stones")
                {
                    Item ingot = new DullCopperIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "gold stones")
                {
                    Item ingot = new GoldIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "shadow iron stones")
                {
                    Item ingot = new ShadowIronIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "mithril stones")
                {
                    Item ingot = new MithrilIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "xormite stones")
                {
                    Item ingot = new XormiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "obsidian stones")
                {
                    Item ingot = new ObsidianIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "nepturite stones")
                {
                    Item ingot = new NepturiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }

                from.PlaySound(0x208);
                from.SendMessage("You smelt the stones and put the ingots in your backpack.");
                this.Delete();
            }
            else
            {
                from.SendMessage("Only an apprentice blacksmith can smelt that.");
            }
        }
Ejemplo n.º 2
0
        public override void OnDoubleClick(Mobile from)
        {
            bool anvil, forge;

            Server.Engines.Craft.DefBlacksmithy.CheckAnvilAndForge(from, 2, out anvil, out forge);

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1060640);                   // The item must be in your backpack to use it.
            }
            else if (!forge)
            {
                from.SendMessage("You need to be near a forge to smelt that.");
            }
            else if (from.Skills[SkillName.Blacksmith].Value >= 50)
            {
                if (this.Name == "crystalline dull copper")
                {
                    Item ingot = new DullCopperIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline shadow iron")
                {
                    Item ingot = new ShadowIronIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline copper")
                {
                    Item ingot = new CopperIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline bronze")
                {
                    Item ingot = new BronzeIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline gold")
                {
                    Item ingot = new GoldIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline agapite")
                {
                    Item ingot = new AgapiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline verite")
                {
                    Item ingot = new VeriteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline valorite")
                {
                    Item ingot = new ValoriteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline caddellite")
                {
                    Item ingot = new CaddelliteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline onyx")
                {
                    Item ingot = new OnyxIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline quartz")
                {
                    Item ingot = new QuartzIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline ruby")
                {
                    Item ingot = new RubyIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline sapphire")
                {
                    Item ingot = new SapphireIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline spinel")
                {
                    Item ingot = new SpinelIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline topaz")
                {
                    Item ingot = new TopazIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline amethyst")
                {
                    Item ingot = new AmethystIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline emerald")
                {
                    Item ingot = new EmeraldIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (this.Name == "crystalline garnet")
                {
                    Item ingot = new GarnetIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline silver")
                {
                    Item ingot = new ShinySilverIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline star ruby")
                {
                    Item ingot = new StarRubyIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline marble")
                {
                    Item ingot = new MarbleIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline jade")
                {
                    Item ingot = new JadeIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline ice")
                {
                    Item ingot = new IceIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline obsidian")
                {
                    Item ingot = new ObsidianIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline nepturite")
                {
                    Item ingot = new NepturiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline steel")
                {
                    Item ingot = new SteelIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline brass")
                {
                    Item ingot = new BrassIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline mithril")
                {
                    Item ingot = new MithrilIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else if (Name == "crystalline xormite")
                {
                    Item ingot = new XormiteIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }
                else
                {
                    Item ingot = new IronIngot();
                    ingot.Amount = this.Amount;
                    from.AddToBackpack(ingot);
                }

                from.PlaySound(0x208);
                from.SendMessage("You smelt the crystalline metal the and put the ingots in your backpack.");
                this.Delete();
            }
            else
            {
                from.SendMessage("Only an apprentice blacksmith can smelt that.");
            }
        }