Esempio n. 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is FlyingCarpetComponent)
                {
                    FlyingCarpet carpet = (FlyingCarpet)((FlyingCarpetComponent)targeted).Addon;

                    if (carpet != null && carpet.HasKey(from))
                    {
                        from.PlaySound(0x23E);
                        carpet.SetHue(_Tub.DyedHue);
                    }
                    else
                    {
                        from.SendMessage("You cannot dye this carpet");
                    }
                }
                else
                {
                    from.SendMessage("You cannot dye that.");
                }
            }