示例#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", "Caddellite", "IGNORED", MorphingTemplates.TemplateCaddellite("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", "Caddellite", "IGNORED", MorphingTemplates.TemplateCaddellite("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 CaddellitePlateLegs()
 {
     Name = "Caddellite Leggings";
     Hue  = Server.Misc.MaterialInfo.GetMaterialColor("caddellite", "", 0);
     MorphingItem.MorphMyItem(this, "IGNORED", "IGNORED", "IGNORED", MorphingTemplates.TemplateCaddellite("armors"));
 }