Exemplo n.º 1
0
 public MarblePlateLegs()
 {
     Name = "Marble Leggings";
     Hue  = Server.Misc.MaterialInfo.GetMaterialColor("marble", "", 0);
     MorphingItem.MorphMyItem(this, "IGNORED", "IGNORED", "IGNORED", MorphingTemplates.TemplateMarble("armors"));
 }
Exemplo n.º 2
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", "Marble", "IGNORED", MorphingTemplates.TemplateMarble("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", "Marble", "IGNORED", MorphingTemplates.TemplateMarble("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.");
                }
            }