コード例 #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.");
                }
            }
コード例 #2
0
        //this performs the creation of the magic carpet, based on the specs in the magic lamp
        public override void FinishCreation(Mobile from, Point3D point)
        {
            _Addon = new FlyingCarpet(_CarpetLength, _CarpetWidth, _CarpetType, AddonHue);

            base.FinishCreation(from, point);
        }