Example #1
0
            protected override void OnTarget(Mobile from, object target)
            {
                if (!(target is AllDyeTubsAll))
                {
                    from.SendMessage("Can be used only for Dye Tub [*Everything*]!");
                    return;
                }

                AllDyeTubsAll tub = (AllDyeTubsAll)target;

                if (tub == null || !tub.Charged)
                {
                    from.SendMessage("You cannot use it on uncharged dye tub!");
                }
                else if (!tub.IsChildOf(from.Backpack) || !m_Thinner.IsChildOf(from.Backpack))
                {
                    from.SendMessage("You must have thinner and dye tub in you backpack");
                }
                else
                {
                    m_Thinner.Consume();
                    tub.Charges++;
                    from.FixedParticles(14120, 1, 10, 0x1F78, tub.DyedHue, 5, EffectLayer.Waist);
                    from.PlaySound(32);
                    from.PlaySound(574);
                    from.SendMessage("Hue has been thinned");
                }
            }
 public AllDyeTubsAllTarget( AllDyeTubsAll dyetub )
     : base(12, false, TargetFlags.None)
 {
     m_Tub = dyetub;
 }
 public AllDyeTubsAllTarget(AllDyeTubsAll dyetub) : base(12, false, TargetFlags.None)
 {
     m_Tub = dyetub;
 }