当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.PlaySound方法代码示例

本文整理汇总了C#中Server.Mobile.PlaySound方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.PlaySound方法的具体用法?C# Mobile.PlaySound怎么用?C# Mobile.PlaySound使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.PlaySound方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnMoveOver

		public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;
			
			if( m.Alive)
					{
					m.SendMessage( "You must be dead to use this portal." );
					m.Say("Duh... I am not dead... Hello? Use a Rune book..");
					m.PlaySound( 0x440 );
					return true;
					}
			if( m_TelePets)
				{
				Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
				}
				
				m.Say("Have mercy on my soul.");
				World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as Dracula has consumed another victim. May {0} rest in peace.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );

				return false;
				
			

		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:28,代码来源:DraculasDeadOnlyTeleportalOut.cs

示例2: DoCure

        public void DoCure( Mobile from )
        {
            bool cure = false;

            CureLevelInfo[] info = LevelInfo;

            for ( int i = 0; i < info.Length; ++i )
            {
                CureLevelInfo li = info[i];

                if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
                {
                    cure = true;
                    break;
                }
            }

            if ( cure && from.CurePoison( from ) )
            {
                from.SendAsciiMessage( "You feel cured of poison!" ); // You feel cured of poison!

                from.FixedEffect( 0x373A, 10, 15 );
                from.PlaySound( 0x1E0 );
            }
            else if ( !cure )
            {
                from.SendAsciiMessage( "That potion was not strong enough to cure your ailment!" ); // That potion was not strong enough to cure your ailment!
            }
        }
开发者ID:Godkong,项目名称:Origins,代码行数:29,代码来源:BaseCurePotion.cs

示例3: Abrir

        public override void Abrir( Mobile from )
        {
            PlagueBeastLord m = RootParent as PlagueBeastLord;
            if ( m == null ) return;

            from.Direction = from.GetDirectionTo( m );
            if ( Abierto )
            {
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[21] );
            }
            else
            {
                from.LocalOverheadMessage( MessageType.Emote, 0x66B, false, Plague_Texts.Line[22] );
                from.PlaySound( 0x248 );
                from.PlaySound( 0x2AC );
                Agujero.Visible = true;

                base.Abrir( from );
                //Si no hay cerebro, la herida empieza a sangrar directamente
                if ( HoldBrain == BrainTypes.Brain_None )
                {
                    PlagueBrain pb = Mybrain as PlagueBrain;
                    pb.Sangrar( from );
                }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:26,代码来源:Organo_Pulpo.cs

示例4: OnDoubleClick

     		public override void OnDoubleClick( Mobile from ) 
		{ 
			
                        if ( Parent != from ) 
                        { 
                                from.SendMessage( "The costume must be equiped to be used." ); 
                        } 

			else if ( from.Mounted == true )
			{
				from.SendMessage( "You cannot be mounted while wearing your costume!" );
			}
			
			else if ( from.BodyMod == 0x0 )
                        { 
				
				LootType = LootType.Blessed;
               			from.SendMessage( "You pull the mask over your head." );
				from.PlaySound( 0x440 );
				from.BodyMod = 769;
				from.DisplayGuildTitle = false; 
				ItemID = 9860;
                        
			}
			else
			{
				from.SendMessage( "You lower the mask." );
				from.PlaySound( 0x440 );
				from.BodyMod = 0x0;		
				from.DisplayGuildTitle = true;
				ItemID = 0x1F03;
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:33,代码来源:BlackthorneCostume.cs

示例5: Drink

        public override void Drink(Mobile from)
        {
            Item am = from.Backpack.FindItemByType(typeof(RecluseStingMarker));
            if (am != null)
            {
                from.BodyMod = 0;
                from.Hue = -1;
                from.YellowHealthbar = false;

                from.PlaySound(0xF6);
                from.PlaySound(0x1F7);
                from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head);

                    BasePotion.PlayDrinkEffect(from);

                    this.Consume();
                    from.SendGump(new RecluseAntidoteGump());
                    //am.Delete();
                }
                else if (am == null )
                {
                    from.SendGump(new RecluseCuredGump());
                    
                }
            }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:25,代码来源:RecluseStingAntidotePotion.cs

示例6: OnDoubleClick

     		public override void OnDoubleClick( Mobile from ) 
		{ 
			
                        if ( Parent != from ) 
                        { 
                                from.SendMessage( "The costume must be equiped to be used." ); 
                        } 

			else if ( from.Mounted == true )
			{
				from.SendMessage( "You cannot be mounted while wearing your costume!" );
			}


			else if ( from.BodyMod == 0x0 )
                        { 
				

               			from.SendMessage( "You pull the mask over your head." );
				from.PlaySound( 0x440 );
				from.BodyMod = 75;
				from.DisplayGuildTitle = false; 
                        
			}
			else
			{
				from.SendMessage( "You lower the mask." );
				from.PlaySound( 0x440 );
				from.BodyMod = 0x0;
				from.DisplayGuildTitle = true;
				this.Transformed = false;
			}
		}
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:33,代码来源:CyclopsCostume.cs

示例7: OnCompleted

        public void OnCompleted( Mobile from )
        {
            Mobile creature = new ClockworkCreature( CreatureDef );
            Point3D p = from.Location;

            creature.MoveToWorld( p, from.Map );

            Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerCallback(
                delegate
                {
                    from.PlaySound( 0xFA );
                    from.PlaySound( 0x5BC );
                    from.PlaySound( 0x5C7 );

                    Effects.SendLocationEffect( p, from.Map, 0x1FD4, 30, 16, 0x21, 4 );

                    for ( int j = 0; j < 5; j++ )
                    {
                        Point3D loc = new Point3D( p.X, p.Y, 10 + p.Z + ( j * 20 ) );

                        Effects.SendLocationEffect( loc, from.Map, 0x1AA1, 17, 16, 0x481, 4 );
                        Effects.SendLocationEffect( loc, from.Map, 0x1A9F, 10, 16, 0x481, 4 );
                        Effects.SendLocationEffect( loc, from.Map, 0x1A8, 25, 16, 0x47E, 4 );
                    }

                    // The training clockwork fails and the creature vanishes.
                    from.PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1112987, from.Client );

                    Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerCallback(
                        delegate
                        {
                            creature.Delete();
                        } ) );
                } ) );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:35,代码来源:ClockworkMechanism.cs

示例8: OnDoubleClick

        public override void OnDoubleClick( Mobile m )
      {
         if( Parent != m )
         {
            m.SendMessage( "You must be wearing the robe to use it!" );
         }
         else
         {
            if ( ItemID == 0x2683 || ItemID == 0x2684 )
            {
               m.SendMessage( "You lower the hood." );
               m.PlaySound( 0x57 );
               ItemID = 0x1F03;
               m.NameMod = null;
               m.RemoveItem(this);
               m.EquipItem(this);

            }
            else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
            {
               m.SendMessage( "You pull the hood over your head." );
               m.PlaySound( 0x57 );
               ItemID = 0x2683;
               m.RemoveItem(this);
               m.EquipItem(this);

            }
         }
      }
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:29,代码来源:RamaRobe.cs

示例9: Use

		public override bool Use( Mobile from ) {
			if ( from.BeginAction( typeof( ClarityPotion ) ) ) {
				int amount = Utility.Dice( 3, 3, 3 );
				int time = Utility.RandomMinMax( 5, 30 );

				from.PlaySound( 0x2D6 );

				if ( from.Body.IsHuman ) {
					from.Animate( 34, 5, 1, true, false, 0 );
				}

				from.FixedParticles( 0x375A, 10, 15, 5011, EffectLayer.Head );
				from.PlaySound( 0x1EB );

				StatMod mod = from.GetStatMod( "Concussion" );

				if ( mod != null ) {
					from.RemoveStatMod( "Concussion" );
					from.Mana -= mod.Offset;
				}

				from.PlaySound( 0x1EE );
				from.AddStatMod( new StatMod( StatType.Int, "clarity-potion", amount, TimeSpan.FromMinutes( time ) ) );

				Timer.DelayCall( TimeSpan.FromMinutes( time ), delegate() {
					from.EndAction( typeof( ClarityPotion ) );
				} );

				return true;
			}

			return false;
		}
开发者ID:jackuoll,项目名称:Pre-AOS-RunUO,代码行数:33,代码来源:ClarityPotion.cs

示例10: OnBeforeDamage

		public override bool OnBeforeDamage( Mobile attacker, Mobile defender )
		{
			if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
				return false;

			ClearCurrentAbility( attacker );

			attacker.SendMessage( "You become one with you weapon, allowing it to guide you hand. The effects of this attack are unpredictable, but effective." );
			defender.SendMessage( "You enemie become one with their weapon and the effects of his attack are unpredictable" );

				attacker.PlaySound( 0x20C );
				attacker.PlaySound( 0x56 );
				attacker.FixedParticles( 0x3779, 1, 30, 9964, 3, 3, EffectLayer.Waist );

				IEntity from = new Entity( Serial.Zero, new Point3D( attacker.X, attacker.Y, attacker.Z ), attacker.Map );
				IEntity to = new Entity( Serial.Zero, new Point3D( attacker.X, attacker.Y, attacker.Z + 50 ), attacker.Map );
				Effects.SendMovingParticles( from, to, 0xF5F, 1, 0, false, false, 33, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );

			int damage = 10; 

			damage += Math.Min( 5, (int)(Math.Abs( attacker.Skills[SkillName.Anatomy].Value + attacker.Skills[SkillName.ArmsLore].Value ) / 8));

			defender.Damage( damage, attacker );

			return true;
		}
开发者ID:greeduomacro,项目名称:uodarktimes-1,代码行数:26,代码来源:Bladeweave.cs

示例11: OnDoubleClick

 public override void OnDoubleClick( Mobile m )
 {
    if( Parent != m )
    {
       m.SendMessage( "You can not use this item from your pack!" );
    }
    else
    {
       if ( ItemID == 0x2683 || ItemID == 0x2684 )
       {
          m.SendMessage( "You lower the hood." );
          m.PlaySound( 0x57 );
          ItemID = 0x1F03;
          m.NameMod = null;
          LootType=LootType.Blessed;
          m.RemoveItem(this);
          m.EquipItem(this);
       }
       else if ( ItemID == 0x1F03 || ItemID == 0x1F04 )
       {
          m.SendMessage( "You pull the hood over your head." );
          m.PlaySound( 0x57 );
          ItemID = 0x2683;
          LootType=LootType.Blessed;
          m.RemoveItem(this);
          m.EquipItem(this);
       }
    }
 }
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:29,代码来源:BaseHoodedShroud.cs

示例12: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if (!IsChildOf(from.Backpack))
            {
                from.SendMessage("This must be in your backpack."); return;
            }

            from.SendMessage("You consume the thick liquid; it makes you nauseous.");
            from.Poison = Poison.Regular;

            if (from.Female) from.PlaySound(0x32D);
            else from.PlaySound(0x43F);

            Consume();

            if (from.StatCap >= from.RawStatTotal + 15)
            {
                if (from.RawStr + 5 < 125)
                    from.RawStr += 5;

                else from.RawStr = 125;

                if (from.RawInt + 5 < 125)
                    from.RawInt += 5;

                else from.RawInt = 125;

                if (from.RawDex + 5 < 125)
                    from.RawDex += 5;

                else from.RawDex = 125;
            }
        }
开发者ID:ITLongwell,项目名称:Ulmeta,代码行数:33,代码来源:DaemonBlood.cs

示例13: LightCombo

		// Healing Ki
		// Activate to heal all nearby allies for 1d4 (1 to 4), plus an additional 
		// 1d4 (1 to 4) for every two monk levels. (Does not harm undead)
		public static void LightCombo( Mobile from )
		{
			from.SendMessage( 2075, "You execute the maneuver: Healing Ki" );

			List<Mobile> mobiles = new List<Mobile>();

			foreach ( Mobile m in from.GetMobilesInRange( 4 ) )
			{
				if ( m != null )
					if ( NotorietyHandlers.Mobile_AllowBeneficial( from, m ) )
						mobiles.Add( m );
			}

			MonkFists mf = from.FindItemOnLayer( Layer.Gloves ) as MonkFists;
			int amount = 0;	

			if ( mf != null )
				amount = Utility.Dice( mf.Teir, 3, (3 * mf.Teir) );
			else
				amount = Utility.Dice( 2, 6, 0 );

			for ( int i = 0; i < mobiles.Count; i++ )
			{
				mobiles[i].FixedParticles( 0x3967, 10, 30, 5013, 36, 4, EffectLayer.CenterFeet, 0 );
				mobiles[i].Heal( amount, from );
			}

			if ( from.Female )
				from.PlaySound( 0x339 );
			else
				from.PlaySound( 0x44B );
		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:35,代码来源:MonkCombos+Light.cs

示例14: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, int damage )
		{
			if ( !CheckMana( attacker, true ) )
				return;

			ClearCurrentAbility( attacker );

			IMount mount = defender.Mount;

			if ( mount != null && !(defender is ChaosDragoonElite) )
			{
				defender.SendLocalizedMessage( 1062315 ); // You fall off your mount!

				defender.PlaySound( 0x140 );
				defender.FixedParticles( 0x3728, 10, 15, 9955, EffectLayer.Waist );

				mount.Rider = null;

				BaseMount.SetMountPrevention( defender, BlockMountType.Dazed, TimeSpan.FromSeconds( 10.0 ) );

				if( Core.ML && attacker is BaseCreature && ((BaseCreature)attacker).ControlMaster != null )
					BaseMount.SetMountPrevention( ((BaseCreature)attacker).ControlMaster, BlockMountType.DismountRecovery, TimeSpan.FromSeconds( 3.0 ) );
				else
					BaseMount.SetMountPrevention( attacker, BlockMountType.DismountRecovery, TimeSpan.FromSeconds( 3.0 ) );
			}
			else
			{
				//if ( WeaponAbility.ParalyzingBlow.IsImmune( defender ) )
				//{
					//attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
					//defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.

				//}
				//else
				//{
					defender.FixedEffect( 0x376A, 9, 32 );
					defender.PlaySound( 0x204 );
					attacker.SendLocalizedMessage( 1060163 ); // You deliver a paralyzing blow!
					defender.SendLocalizedMessage( 1060164 ); // The attack has temporarily paralyzed you!
					TimeSpan duration = defender.Player ? TimeSpan.FromSeconds( 3.0 ) : TimeSpan.FromSeconds( 6.0 );
					defender.Paralyze( duration );
					//WeaponAbility.ParalyzingBlow.BeginImmunity( defender, duration + TimeSpan.FromSeconds( 8.0 ) );
				//}
			}

			int amount = 15;

			switch( Utility.Random( 5 ) )
			{
				case 0: AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0 ); break;
				case 1: AOS.Damage( defender, attacker, amount, 0, 100, 0, 0, 0 ); break;
				case 2: AOS.Damage( defender, attacker, amount, 0, 0, 100, 0, 0 ); break;
				case 3: AOS.Damage( defender, attacker, amount, 0, 0, 0, 100, 0 ); break;
				case 4: AOS.Damage( defender, attacker, amount, 0, 0, 0, 0, 100 ); break;
			}

		}
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:57,代码来源:InfusedThrow.cs

示例15: OnTarget

        protected override void OnTarget(Mobile from, object targeted)
        {
            if (targeted is Item)
            {
                Item targ = (Item)targeted;

                if (!targ.IsChildOf(from.Backpack))
                {
                    //if (from.Region is HouseRegion)
                    //{
                    //    targ.Hue = m_Item.Hue;
                    //    from.PlaySound(0x23F);
                    //}
                    //else
                    //{
                    //    from.SendLocalizedMessage(1062617); //	You can only hue objects that are in your backpack.
                    //    // You don't have room for the item in your pack, so you stop working on it.
                    //    //1042001	That must be in your pack for you to use it.
                    //    //1045112	You cannot hue that item
                    //    //1062617	You can only hue objects that are in your backpack.
                    //    //1042083	You cannot dye that.
                    //}
                    BaseHouse house = BaseHouse.FindHouseAt(from);

                    if (house == null || !house.IsCoOwner(from))
                    {
                        from.SendLocalizedMessage(502092); //You must be in your house to do this.
                    }
                    else
                    {
                        if (!house.IsInside(targ))
                        {
                            from.SendLocalizedMessage(1042270);  //That is not in your house.
                        }
                        else
                        {
                            if (!(from.InRange(targ.GetWorldLocation(), 2)))
                            {
                                from.SendLocalizedMessage(500295);  //You are too far away to do that.
                            }
                            else
                            {
                                targ.Hue = m_Item.Hue;
                                from.PlaySound(0x23F);
                                //from.SendLocalizedMessage(1062617); //	You can only hue objects that are in your backpack.
                            }
                        }
                    }
                }
                else
                {
                    targ.Hue = m_Item.Hue;
                    from.PlaySound(0x23F);
                }
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:56,代码来源:UniversalDyeTub.cs


注:本文中的Server.Mobile.PlaySound方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。