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


C# Mobile.Say方法代码示例

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


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

示例1: Target

        public void Target(Mobile m)
        {
            SlayerEntry undead = SlayerGroup.GetEntryByName(SlayerName.Silver);
            SlayerEntry demon = SlayerGroup.GetEntryByName(SlayerName.DaemonDismissal);

            if (!Caster.CanSee(m))
            {
                Caster.SendLocalizedMessage(500237); // Target can not be seen.
            }
            else if (m is PlayerMobile)
            {
                Caster.SendMessage("You cannot banish another player!");
            }
            else if ((undead != null && !undead.Slays(m)) || (demon != null && !demon.Slays(m)))
            {
                Caster.SendMessage("This spell cannot be used on this type of creature.");
            }
            else if (CheckHSequence(m))
            {
                SpellHelper.Turn(Caster, m);

                m.FixedParticles(0x3709, 10, 30, 5052, 0x480, 0, EffectLayer.LeftFoot);
                m.PlaySound(0x208);

                m.Say("No! I musn't be banished!");
                new InternalTimer(m).Start();
            }

            FinishSequence();
        }
开发者ID:evildude807,项目名称:kaltar,代码行数:30,代码来源:BanishEvilSpell.cs

示例2: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {

            if (Parent != from)
                if (from.AccessLevel < AccessLevel.GameMaster)
                    from.SendMessage("When you touch, it vanishes without trace...");
            if (from.AccessLevel < AccessLevel.GameMaster)
                this.Consume();
            if (from.AccessLevel < AccessLevel.GameMaster)
                return;
            {
                if (!IsChildOf(from.Backpack))
                {
                    from.Say("That must be in your pack for you to use it");
                    return;
                }
                if (!from.Hidden == true)
                {
                    from.Emote("*" + from.Name + " goes to ethereal world*");
                    from.BoltEffect(0);
                    from.Hidden = true;

                }
                else
                {
                    from.Hidden = false;
                    from.Emote("*" + from.Name + " strikes the earth*");
                    from.BoltEffect(0);

                }
            }
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:32,代码来源:ThunderHide.cs

示例3: SayALotTimer

         public SayALotTimer( string[] s, Mobile m, TimeSpan delay ) : base( delay, delay ) 
         { 
            m_Mode = 0; 
            m_Owner = m; 
            m_Say = s; 

            Priority = TimerPriority.TwoFiftyMS; 
            m_Owner.Say( m_Say[m_Mode++] ); //Say the first line right away 
         } 
开发者ID:FreeReign,项目名称:imaginenation,代码行数:9,代码来源:SpeechHelper.cs

示例4: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (from.InRange(this.Location, 2))
     {
         if (!this.m_Locked && this.m_Active)
         {
             from.MoveToWorld(this.m_PointDest, this.m_MapDest);
             from.SendLocalizedMessage(1072790); // The wall becomes transparent, and you push your way through it.
         }
         else
             from.Say(502684); // This door appears to be locked.
     }
 }
开发者ID:Crome696,项目名称:ServUO,代码行数:13,代码来源:SecretWallTeleporters.cs

示例5: OnMovement

 public override void OnMovement(Mobile from, Point3D oldLocation)
 {
     if (from.InRange(this, 3) && from is PlayerMobile) //chooses the area around the bannana
     {
         from.PlaySound(from.Female ? 791 : 1063); //sound
         from.Say("*slipped on " + Name + "*"); //message
         if (!from.Mounted)  //if not on a horse do the following...
         {
             from.Freeze(TimeSpan.FromSeconds(4.0)); //stops player from running
             from.Animate(22, 5, 1, true, false, 0); //show the player falling
             from.Freeze(TimeSpan.FromSeconds(4.0)); //stops the player just a bit longer.
         }
     }
 }
开发者ID:greeduomacro,项目名称:annox,代码行数:14,代码来源:SlippedOn.cs

示例6: OnDoubleClick

 public override void OnDoubleClick(Mobile from) //testing to make sure it works.
 {
     if (from.InRange(this, 3) && from is PlayerMobile)
     {
         from.PlaySound(from.Female ? 791 : 1063);
         from.Say("*slipped on " + Name + "*");
         if (!from.Mounted)
         {
             from.Freeze(TimeSpan.FromSeconds(4.0));
             from.Animate(22, 5, 1, true, false, 0);
             from.Freeze(TimeSpan.FromSeconds(4.0));
         }
     }
 }
开发者ID:greeduomacro,项目名称:annox,代码行数:14,代码来源:SlippedOn.cs

示例7: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
            switch (Utility.Random(5))
            {
            	case 0:
            		{
            			defender.FixedParticles(0x37CC, 1, 40, 97, 3, 9917, 0);
            			attacker.Say("Suffer my fury!!!");
            			SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 30, 0, 0, 0);
            			break;
            		}
            }
            
            base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:15,代码来源:FistsOfPainandFury.cs

示例8: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042001 );
            }
            else if ( from.Region.Name == "Tele Center Tram" || from.Region.Name == "Tele Center Fel" )
            {
                from.SendMessage( "You are not allowed to do that in the Tele Center" );
            }
            else
            {
                from.SendMessage( "You eat the cake and begin to feel sick..." );
                from.Poison = Poison.Lesser;
                from.Say( "*cough cough*" );

                this.Delete();
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:19,代码来源:CreepyCake.cs

示例9: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			PlaySwingAnimation( attacker );
			PlayHurtAnimation( defender );

			attacker.PlaySound( GetHitAttackSound( attacker, defender ) );
			defender.PlaySound( GetHitDefendSound( attacker, defender ) );

            switch (Utility.Random(5))
            {
                case 0:
                    defender.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot);
                    attacker.Say("Feel the hate Hell holds for you!!!");
                    SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 20, 20, 20, 20);
                    break;
            }
		
			base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:19,代码来源:MaceOfHell.cs

示例10: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (DateTime.UtcNow >= LastUsed)
     {
         LastUsed = DateTime.UtcNow + TimeSpan.FromMinutes(20);
         Effects.SendIndividualFlashEffect(from, (FlashType) 2);
         from.SolidHueOverride = 2498;
         Timer.DelayCall(TimeSpan.FromSeconds(1), () =>
         {
             from.BoltEffect(2049);
             from.Say("I HAVE THE POWER!");
             Timer.DelayCall(TimeSpan.FromSeconds(3), () => { from.SolidHueOverride = -1; });
         });
     }
     else
     {
         TimeSpan nextuse = LastUsed - DateTime.UtcNow;
         from.SendMessage("You cannot use this again for another " + nextuse.Minutes + " minutes.");
     }
     base.OnDoubleClick(from);
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:21,代码来源:DecorativeSword.cs

示例11: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			PlaySwingAnimation( attacker );
			PlayHurtAnimation( defender );

			attacker.PlaySound( GetHitAttackSound( attacker, defender ) );
			defender.PlaySound( GetHitDefendSound( attacker, defender ) );

            switch (Utility.Random(5))
            {
            	case 0:
            		{
            			defender.FixedParticles(0x3789, 10, 25, 5032, EffectLayer.Head);
            			attacker.Say("Death will Always Triumph!!!");
            			SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 0, 30, 0);
            			break;
            		}
            }
            
            base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:21,代码来源:BowOfTheBlackPlague.cs

示例12: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			PlaySwingAnimation( attacker );
			PlayHurtAnimation( defender );

			attacker.PlaySound( GetHitAttackSound( attacker, defender ) );
			defender.PlaySound( GetHitDefendSound( attacker, defender ) );

			switch ( Utility.Random( 5 ) )
			{
					case 0:
					{
						defender.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist );
						attacker.Say( "Sacrafice your life to me!!!" );
						SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 0, 0, 30);
						break;
					}
			}
			
			base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:21,代码来源:VampiresFang.cs

示例13: OnDoubleClick

		public override void OnDoubleClick( Mobile from ) 
      { 
      
      if ( Parent != from ) 
      if (from.AccessLevel < AccessLevel.GameMaster)
          from.SendMessage( "When you touch, it vanishes without trace..." );
      if (from.AccessLevel < AccessLevel.GameMaster)
      	  this.Consume() ;
      if (from.AccessLevel < AccessLevel.GameMaster)
      	  return ;
      {
         if ( !IsChildOf( from.Backpack ) )
			{
				from.Say ( "That must be in your pack for you to use it" );
				return;
			}           	 
      	 if ( !from.Hidden == true )
            { 
           from.Emote( "*" + from.Name + "* Disapears in a rage of magical fury *" );
           from.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist );
           from.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist );
           from.PlaySound( 0x20F );
           from.PlaySound( 0x44A );
	       from.Hidden = true;
           
            } 
            else 
            { 
           from.Hidden=false;
           from.Emote( "*" + from.Name + "* Apears in a rage of magical fury  *");
             from.FixedParticles(0x376A, 1, 31, 9961, 1160, 0, EffectLayer.Waist );
           from.FixedParticles( 0x37C4, 1, 31, 9502, 43, 2, EffectLayer.Waist );
           from.PlaySound( 0x20F );
           from.PlaySound(0x44A );
                      
            } 
      } 

      
      } 
开发者ID:ITLongwell,项目名称:aedilis2server,代码行数:40,代码来源:DivinemaleHide.cs

示例14: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			PlaySwingAnimation( attacker );
			PlayHurtAnimation( defender );

			attacker.PlaySound( GetHitAttackSound( attacker, defender ) );
			defender.PlaySound( GetHitDefendSound( attacker, defender ) );

            switch (Utility.Random(5))
            {
            		case 0:
            		{
            			defender.FixedParticles(0x37CC, 1, 40, 97, 3, 9917, 0);
            			attacker.Say("Lord Defend me from this evil!!!");
            			SpellHelper.Damage(TimeSpan.Zero, defender, attacker, 15, 0, 0, 30, 0, 0);
            			break;
            		}
            }
            
		
			base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:22,代码来源:ScytheOfFaith.cs

示例15: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {

            if (Parent != from)
                if (from.AccessLevel < AccessLevel.GameMaster)
                    from.SendMessage("When you touch, it vanishes without trace...");
            if (from.AccessLevel < AccessLevel.GameMaster)
                this.Consume();
            if (from.AccessLevel < AccessLevel.GameMaster)
                return;
            {
                if (!IsChildOf(from.Backpack))
                {
                    from.Say("That must be in your pack for you to use it");
                    return;
                }
                if (!from.Hidden == true)
                {
                    from.Emote("*" + from.Name + " evaporates into a watery mist*");
                    from.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist);
                    from.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist);
                    from.PlaySound(0x244);
                    from.Hidden = true;

                }
                else
                {
                    from.Hidden = false;
                    from.Emote("*" + from.Name + " retakes shape from the magical watery mist*");
                    from.FixedParticles(0x3709, 1, 30, 9965, 5, 7, EffectLayer.Waist);
                    from.FixedParticles(0x376A, 1, 30, 9502, 5, 3, EffectLayer.Waist);
                    from.PlaySound(0x244);

                }
            }


        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:38,代码来源:NobleHide.cs


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