示例#1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                Item iOil = targeted as Item;

                if (from.Backpack.FindItemByType(typeof(OilCloth)) == null)
                {
                    from.SendMessage("You need an oil cloth to apply this.");
                }
                else if (iOil is BaseWeapon)
                {
                    BaseWeapon xOil = (BaseWeapon)iOil;

                    if (!iOil.IsChildOf(from.Backpack))
                    {
                        from.SendMessage("You can only use this oil on items in your pack.");
                    }
                    else if (iOil.IsChildOf(from.Backpack) && Server.Misc.MaterialInfo.IsMetalItem(iOil))
                    {
                        xOil.Resource = CraftResource.None;
                        MorphingItem.MorphMyItem(iOil, "IGNORED", "Jade", "IGNORED", MorphingTemplates.TemplateJade("weapons"));
                        from.RevealingAction();
                        from.PlaySound(0x23E);
                        from.AddToBackpack(new Bottle());
                        m_Oil.Consume();
                        from.Backpack.FindItemByType(typeof(OilCloth)).Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot rub this oil on that.");
                    }
                }
                else if (iOil is BaseArmor)
                {
                    BaseArmor xOil = (BaseArmor)iOil;

                    if (!iOil.IsChildOf(from.Backpack))
                    {
                        from.SendMessage("You can only use this oil on items in your pack.");
                    }
                    else if (iOil.IsChildOf(from.Backpack) && Server.Misc.MaterialInfo.IsMetalItem(iOil))
                    {
                        xOil.Resource = CraftResource.None;
                        MorphingItem.MorphMyItem(iOil, "IGNORED", "Jade", "IGNORED", MorphingTemplates.TemplateJade("armors"));
                        from.RevealingAction();
                        from.PlaySound(0x23E);
                        from.AddToBackpack(new Bottle());
                        m_Oil.Consume();
                        from.Backpack.FindItemByType(typeof(OilCloth)).Delete();
                    }
                    else
                    {
                        from.SendMessage("You cannot rub this oil on that.");
                    }
                }
                else
                {
                    from.SendMessage("You cannot rub this oil on that.");
                }
            }
示例#2
0
 public JadePlateLegs()
 {
     Name = "Jade Leggings";
     Hue  = Server.Misc.MaterialInfo.GetMaterialColor("jade", "", 0);
     MorphingItem.MorphMyItem(this, "IGNORED", "IGNORED", "IGNORED", MorphingTemplates.TemplateJade("armors"));
 }
示例#3
0
 public JadeFemalePlateChest()
 {
     Name = "Jade Female Tunic";
     Hue  = Server.Misc.MaterialInfo.GetMaterialColor("jade", "", 0);
     MorphingItem.MorphMyItem(this, "IGNORED", "IGNORED", "IGNORED", MorphingTemplates.TemplateJade("armors"));
 }