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


C# Mobile.Say方法代码示例

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


在下文中一共展示了Mobile.Say方法的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: SimpleFlame

        public static void SimpleFlame(Mobile from, Mobile target, int damage, bool skip)
        {
            if (!CanUse(from, target))
                return;

            if (!skip)
            {
                from.Say("*Ul Flam*");

                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X - 1, from.Y - 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X - 1, from.Y + 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X + 1, from.Y - 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
                Effects.SendLocationParticles(
                    EffectItem.Create(new Point3D(from.X + 1, from.Y + 1, from.Z), from.Map, EffectItem.DefaultDuration),
                    0x3709, 10, 30, 0, 4, 0, 0);
            }

            new SimpleFlameTimer(from, target).Start();
        }
开发者ID:m309,项目名称:ForkUO,代码行数:25,代码来源:Ability+TheSix.cs

示例3: OnMoveOver

		public override bool OnMoveOver( Mobile m )
		{
			if( !m_AllowCreatures && !m.Player )
				return true;

			if( m.Backpack.ConsumeTotal( typeof( DracsKey ), 1 ) )
			{
				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 {0} has Entered Draculas inner room.", m.Name );
				m.PlaySound(0x1F7);

				m.MoveToWorld( m_DestLoc, m_DestMap );
				

				return false;
			}

			m.SendMessage( " You must have the Key to Draculas chamber to use this gate." );
			return true;
		}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:25,代码来源:DraculasTeleporter.cs

示例4: Abrir

		public override void Abrir( Mobile from )
		{
			if ( RootParent.Equals( from ) )
			{
				Agujero.Visible = true;
				Mybrain.Visible = true;
				from.Say( false, Plague_Texts.Line[14] );
			}
		}
开发者ID:xrunuo,项目名称:xrunuo,代码行数:9,代码来源:OrganoCentral.cs

示例5: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( Location, 2 ) )
			{
				if ( !m_Locked && m_Active )
				{
					from.MoveToWorld( m_PointDest, 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:romeov007,项目名称:imagine-uo,代码行数:13,代码来源:Teleporters.cs

示例6: OnComponentUsed

 public override void OnComponentUsed(AddonComponent ac, Mobile from)
  {
      if (!from.InRange(GetWorldLocation(), 2))  
          from.SendMessage("You are too far away.");
      else
      {
          from.Emote("*stirs the brew*");
          from.Say("hihihihiiii!");
          from.PlaySound(32);
          if (!from.Mounted)
              from.Animate(33, 5, 1, true, false, 0);
      }
  }
开发者ID:greeduomacro,项目名称:annox,代码行数:13,代码来源:CauldronEastAddon.cs

示例7: OnDroppedToMobile

        public override bool OnDroppedToMobile( Mobile from, Mobile target )
        {
            if ( !base.OnDroppedToMobile( from, target ) )
                return false;

            if ( target is Parrot )
            {
                int msg = Utility.RandomMinMax( 1072599, 1072607 );

                if ( msg != 1072602 )
                    target.Say( msg );
                else
                    target.Say( msg, m_Towns[Utility.RandomMinMax( 0, m_Towns.Length - 1 )] ); // I just flew in from ~1_CITYNAME~ and boy are my wings tired!

                target.PlaySound( Utility.RandomMinMax( 0xBF, 0xC3 ) );
                Spells.SpellHelper.Turn( target, from );

                Delete();

                return false;
            }

            return true;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:24,代码来源:ParrotWafers.cs

示例8: Drink

		public override void Drink( Mobile from )
		{
            from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
            from.PlaySound(0x1E3);

            BasePotion.PlayDrinkEffect(from);
           
            from.BodyValue = 0x51;
            if(from.Female)
                from.SendMessage("Trouvez-vous un Prince");
            else
                from.SendMessage("Trouvez-vous une Princesse");
            
            from.Say("*Lâche la potion, une grimace de douleur défigurant son visage*");
            this.Delete();
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:16,代码来源:FrogMorph.cs

示例9: OnHit

		public override void OnHit( Mobile attacker, Mobile defender, double damageBonus )
		{
			if ( this.Charges >= 1 && Utility.RandomDouble() <= .25 )
			{
				Map map = this.Map;
				if ( map == null || map == Map.Internal ) return;
				TimeSpan duration = TimeSpan.FromMinutes( 5 );
				EnslavedEntrappedSoul minion = new EnslavedEntrappedSoul( attacker, defender, duration );
				minion.MoveToWorld( defender.Location, defender.Map );
				attacker.Say( "Those I kill become my slaves!" );
				minion.Combatant = defender;
				this.Charges -= 1;
				attacker.Karma -= 25;
			}
			base.OnHit( attacker, defender, damageBonus );
		}
开发者ID:greeduomacro,项目名称:annox,代码行数:16,代码来源:EntrappedSoulKatana.cs

示例10: OnTarget

            protected override void OnTarget(Mobile from, object o)
            {
                if (o is PlayerMobile)
                {
                    Mobile mobile = (Mobile)o;

                    if (from.InRange(mobile, 8))
                    {
                        from.Say("*Murmure à l'oreille de " + mobile.Name + " *");
                        mobile.SendMessage(from.Name + " vous murmure: " + m_text);
                    }
                    else from.SendMessage("Il est trop loin pour vous entendre...");
                }
                else
                    from.SendMessage("Il ne comprend rien à ce que vous lui murmurez!");
            }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:16,代码来源:Murmurer.cs

示例11: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( from.InRange( Location, 2 ) )
			{
				BaseHouse house = BaseHouse.FindHouseAt( this );  
				
				if ( house != null && house.IsOwner( from ) )
				{
					from.CloseGump( typeof( RewardDemolitionGump ) );
					from.SendGump( new RewardDemolitionGump( this, 1018329 ) ); // Do you wish to re-deed this skull?
				}
				else
					from.SendLocalizedMessage( 1018328 ); // You can only re-deed a skull if you placed it or you are the owner of the house.
			}
			else
				from.Say( 1019045 ); // I can't reach that.
		}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:17,代码来源:FlamingHead.cs

示例12: Drink

		public override void Drink( Mobile from )
		{
            from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
            from.PlaySound(0x1E3);

            BasePotion.PlayDrinkEffect(from);
           
            if (from.Female == this.Female)
            {
                from.SendMessage("Vous buvez le tout et attendez... vous pourriez attendre très longtemps...");
                this.Delete();
                from.AddToBackpack(new AlchemyVial());
                return;
            }
            
            from.Female = this.Female;
            
            from.Say("*Lâche la potion, une grimace de douleur défigurant son visage*");
            this.Delete();
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:20,代码来源:GenderPotion.cs

示例13: SayRandomTranslate

 public void SayRandomTranslate( Mobile mob, params string[] sentancesInEnglish )
 {
     SaySentance( mob, Utility.RandomMinMax( 2, 3 ) );
     mob.Say( sentancesInEnglish[Utility.Random( sentancesInEnglish.Length )] );
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:5,代码来源:InhumanSpeech.cs

示例14: Say

 public static void Say( Mobile m, object message )
 {
     if ( message is int )
         m.Say( (int) message );
     else if ( message is string )
         m.Say( (string) message );
 }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:7,代码来源:HeritageQuester.cs

示例15: OnSpeech

        public bool OnSpeech( Mobile mob, Mobile speaker, string text )
        {
            if ( ( m_Flags & IHSFlags.OnSpeech ) == 0 || m_Keywords == null || m_Responses == null || m_KeywordHash == null )
                return false; // not enabled

            if ( !speaker.Alive )
                return false;

            if ( !speaker.InRange( mob, 3 ) )
                return false;

            if ( ( speaker.Direction & Direction.Mask ) != speaker.GetDirectionTo( mob ) )
                return false;

            if ( ( mob.Direction & Direction.Mask ) != mob.GetDirectionTo( speaker ) )
                return false;

            string[] split = text.Split( ' ' );
            List<string> keywordsFound = new List<string>();

            for ( int i = 0; i < split.Length; ++i )
            {
                string keyword;
                m_KeywordHash.TryGetValue( split[i], out keyword );

                if ( keyword != null )
                    keywordsFound.Add( keyword );
            }

            if ( keywordsFound.Count > 0 )
            {
                string responseWord;

                if ( Utility.RandomBool() )
                    responseWord = GetRandomResponseWord( keywordsFound );
                else
                    responseWord = keywordsFound[Utility.Random( keywordsFound.Count )];

                string secondResponseWord = GetRandomResponseWord( keywordsFound );

                StringBuilder response = new StringBuilder();

                switch ( Utility.Random( 6 ) )
                {
                    default:
                    case 0:
                        {
                            response.Append( "Me " ).Append( responseWord ).Append( '?' );
                            break;
                        }
                    case 1:
                        {
                            response.Append( responseWord ).Append( " thee!" );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 2:
                        {
                            response.Append( responseWord ).Append( '?' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 3:
                        {
                            response.Append( responseWord ).Append( "! " ).Append( secondResponseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 );
                            break;
                        }
                    case 4:
                        {
                            response.Append( responseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            break;
                        }
                    case 5:
                        {
                            response.Append( responseWord ).Append( "? " ).Append( secondResponseWord ).Append( '.' );
                            response.Replace( responseWord[0], Char.ToUpper( responseWord[0] ), 0, 1 );
                            response.Replace( secondResponseWord[0], Char.ToUpper( secondResponseWord[0] ), responseWord.Length + 2, 1 );
                            break;
                        }
                }

                int maxWords = ( split.Length / 2 ) + 1;

                if ( maxWords < 2 )
                    maxWords = 2;
                else if ( maxWords > 6 )
                    maxWords = 6;

                SaySentance( mob, Utility.RandomMinMax( 2, maxWords ) );
                mob.Say( response.ToString() );

                return true;
            }

            return false;
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:99,代码来源:InhumanSpeech.cs


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