• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# SpeechEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中SpeechEventArgs的典型用法代码示例。如果您正苦于以下问题:C# SpeechEventArgs类的具体用法?C# SpeechEventArgs怎么用?C# SpeechEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SpeechEventArgs类属于命名空间,在下文中一共展示了SpeechEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 5))
            {
                string speech = e.Speech.Trim().ToLower();


                if ((speech.IndexOf("help") > -1 || speech.IndexOf("amount") > -1 || speech.IndexOf("need") > -1 ||
                     speech.IndexOf("quest") > -1) && NotesAquired < 500)
                {
                    e.Handled = true;

                    Say(
                        "I need a reference to decipher the Tome of Chaos. Rumors have been floating about that agents of Lord Blackthorn have been seen occupying the dungeons of Britannia.");
                    Say(
                        "I would start looking there. Bring me anything that looks like it might help decipher this infernal tome.");
                }
                else if (speech.IndexOf("scroll") > -1 && NotesAquired < 500)
                {
                    e.Handled = true;

                    Say(
                        "If you have a chaos scroll, hand it over here already so we can get this forsaken book deciphered!");
                }
                else if (NotesAquired == 500)
                {
                    Say(
                        "The Tome of Chaos has already been deciphered. The words of power to open the Marble Keep's gates are Ex Por Rel Uus.");
                }
            }

            base.OnSpeech(e);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:RoyalArchivist.cs


示例2: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            var from = e.Mobile as PlayerMobile;

            if (from != null && from == RootParentEntity && !from.Alive)
            {
                if (e.Speech.ToLower().IndexOf("i seek forgiveness") > -1 && DateTime.UtcNow >= from.RingofForgiveness)
                {
                    if (from.Map == Map.ZombieLand)
                    {
                        from.SendMessage(54, "You cannot use this item while in the zombie event.  Please log out of the event first.");
                        return;
                    }
                    Effects.SendIndividualFlashEffect(e.Mobile, (FlashType)2);
                    if (from.Kills >= 5 && !(from.Region is HouseRegion))
                    {
                        from.SendMessage("You have been forgiven.");
                        BaseCreature.TeleportPets(from, new Point3D(2707, 2145, 0), Map.Felucca, false);
                        from.MoveToWorld(new Point3D(2707, 2145, 0), Map.Felucca);
                    }
                    else if (!(from.Region is HouseRegion))
                    {
                        from.SendMessage("You have been forgiven.");
                        BaseCreature.TeleportPets(from, new Point3D(1475, 1612, 20), Map.Felucca, false);
                        from.MoveToWorld(new Point3D(1475, 1612, 20), Map.Felucca);
                    }
                    from.RingofForgiveness = DateTime.UtcNow + TimeSpan.FromHours(12);
                }
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:32,代码来源:RingofForgiveness.cs


示例3: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            if (!e.Handled && InRange(e.Mobile, 6))
            {
                string text = e.Speech.ToLower();
                Mobile m = e.Mobile;

                if (text == "go" && AdvertSystem.CurrentPublicAdd != null)
                    AdvertSystem.UseAdvert(m, AdvertSystem.CurrentPublicAdd);

                else if (text == "show adds")
                {
                    if (!m.HasGump(typeof(AdvertCategoriesGump)) && !m.HasGump(typeof(AdvertEntriesGump)))
                        m.SendGump(new AdvertCategoriesGump());
                }

                else if (text == "i wish to place a new advertisement")
                {
                    if (!m.HasGump(typeof(AddVendorGump)))
                    m.SendGump(new AddVendorGump(m));
                }

                else if (text == "i wish to review my advertisements")
                {
                    if (!m.HasGump(typeof(AdvertCategoriesGump)) && !m.HasGump(typeof(AdvertEntriesGump)))
                    m.SendGump(new AdvertEntriesGump(null, 0, m));
                }
            }
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:31,代码来源:AdvertMobile.cs


示例4: EventSink_Speech

		public static void EventSink_Speech( SpeechEventArgs args )
		{
			Mobile from = args.Mobile;
			int[] keywords = args.Keywords;

			for ( int i = 0; i < keywords.Length; ++i )
			{
				switch ( keywords[i] )
				{
					case 0x002A: // *i resign from my guild*
					{
						if ( from.Guild != null )
							((Guild)from.Guild).RemoveMember( from );

						break;
					}
					case 0x0032: // *i must consider my sins*
					{
						from.SendMessage( "Short Term Murders : {0}", from.ShortTermMurders );
						from.SendMessage( "Long Term Murders : {0}",  from.Kills );

						break;
					}
				}
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:26,代码来源:Keywords.cs


示例5: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 5))
            {
                string speech = e.Speech.Trim().ToLower();


                if ((speech.IndexOf("help") > -1 || speech.IndexOf("amount") > -1 || speech.IndexOf("need") > -1 ||
                     speech.IndexOf("quest") > -1) && ShardsAquired < 500)
                {
                    e.Handled = true;

                    Say(
                        "I require material from the Crippled King's plane of existence. I have seen strange stone warriors that appear to be alien to our world working in concert with the Blackthorn Coven.");
                    Say(
                        "Bring me pristine shards from their bodies and I'll see what I can conjure up for you.");
                }
                else if ((speech.IndexOf("shard") > -1 || speech.IndexOf("shards") > -1) && ShardsAquired < 500)
                {
                    e.Handled = true;

                    Say(
                        "Do I sense stone shards on you? If that is what I think it is, hand it over here and we'll get you on your way.");
                }
                else if (ShardsAquired == 10)
                {
                    Say(
                        "We have already opened a portal to the Marble Keep. Enter through the portal in front of me if you wish to travel there.");
                }
            }

            base.OnSpeech(e);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:RoyalWizard.cs


示例6: OnSpeech

		public override void OnSpeech(SpeechEventArgs e)
		{
			if (XmlScript.HasTrigger(this, TriggerName.onSpeech) &&
				UberScriptTriggers.Trigger(this, e.Mobile, TriggerName.onSpeech, null, e.Speech))
			{
				return;
			}

			Mobile m = e.Mobile;
			Faction fact = Faction.Find(m);

			if (!e.Handled && m.Alive && e.HasKeyword(0x38)) // *appraise*
			{
				if (FactionAllegiance != null && fact != null && FactionAllegiance != fact)
				{
					Say("I will not do business with the enemy!");
				}
				else if (!TestCenter.Enabled)
				{
					PublicOverheadMessage(MessageType.Regular, 0x3B2, 500608); // Which deed would you like appraised?
					m.BeginTarget(12, false, TargetFlags.None, Appraise_OnTarget);
					e.Handled = true;
				}
			}

			base.OnSpeech(e);
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:27,代码来源:RealEstateBroker.cs


示例7: OnSpeech

        public override void OnSpeech( SpeechEventArgs e )
        {
            base.OnSpeech( e );

            PlayerMobile pm = e.Mobile as PlayerMobile;

            if ( pm != null && pm.InRange( this, 3 ) && e.Speech == "unorus" )
            {
                pm.PlaySound( 0xF9 );

                if ( pm.SacredQuest )
                {
                    // You enter a state of peaceful contemplation, focusing on the meaning of Singularity.
                    pm.SendLocalizedMessage( 1112697 );
                }
                else
                {
                    if ( pm.SacredQuestNextChance > DateTime.Now )
                    {
                        // You need more time to contemplate the Book of Circles before trying again.
                        PublicOverheadMessage( MessageType.Regular, 0x47E, 1112685 );
                    }
                    else
                    {
                        if ( !pm.HasGump( typeof( GenericQuestGump ) ) && !pm.HasGump( typeof( QuestQuestionGump ) ) )
                            pm.SendGump( new LaInsepOmGump() );
                    }
                }
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:30,代码来源:ShrineOfSingularity.cs


示例8: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 2))
            {
                string speech = e.Speech.Trim().ToLower();

                if ((speech.IndexOf("no arms", System.StringComparison.OrdinalIgnoreCase) > -1))
                {
                    Say("It's just a flesh wound.");
                }
                else if ((speech.IndexOf("fart", System.StringComparison.OrdinalIgnoreCase) > -1))
                {
                    Say(Utility.RandomBool() ? "I fart in your general direction" : "Your mother was a hamster and your father smelt of elderberries");
                }
                else if ((speech.IndexOf("ni", System.StringComparison.OrdinalIgnoreCase) > -1))
                {
                    Say("We are the Knights who say... NI.");
                }
                else if ((speech.IndexOf("unladen swallow", System.StringComparison.OrdinalIgnoreCase) > -1))
                {
                    Say("What do you mean? An African or European swallow?");
                }
                else if ((speech.IndexOf("king", System.StringComparison.OrdinalIgnoreCase) > -1))
                {
                    Say("Must be a king, only one that hasn't got crap all over 'im");
                }
            }

            base.OnSpeech(e);
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:32,代码来源:HeraldofEasterPet.cs


示例9: EventSink_Speech

        public static void EventSink_Speech(SpeechEventArgs args)
        {
            Mobile from = args.Mobile;

            if (args.Speech.ToLower().IndexOf("all release") >= 0)
            {
                foreach (Mobile m in from.GetMobilesInRange(15))
                {
                    if (m is BaseCreature && from != m && from.InLOS(m))
                    {
                        BaseCreature p = m as BaseCreature;

                        if (p.Controlled && p.Commandable)
                        {
                            bool isOwner = (from == p.ControlMaster);
                            bool isFriend = (!isOwner && p.IsPetFriend(from));

                            if (!p.Deleted && from.Alive && (isOwner || isFriend) && p.CheckControlChance(from))
                            {
                                p.ControlTarget = null;
                                p.ControlOrder = OrderType.Release;
                            }
                        }
                    }
                }
            }
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:27,代码来源:AllRelease.cs


示例10: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;
            PlayerMobile pm = from as PlayerMobile;

            if (pm is PlayerMobile && !e.Handled && from.InRange(Location, 2) && e.Speech.ToLower().Trim() == "unorus")
            {
                e.Handled = true;
                e.Mobile.PlaySound(0xF9);

                QuestOfSingularity quest = GetSingularityQuest(pm);

                if (HasDelay(pm) && pm.AccessLevel == AccessLevel.Player)
                    pm.SendLocalizedMessage(1112685); //You need more time to contemplate the Book of Circles before trying again.
                else if (pm.AbyssEntry)
                    pm.SendLocalizedMessage(1112697);  //You enter a state of peaceful contemplation, focusing on the meaning of Singularity.
                else if (quest == null)
                {
                    quest = new QuestOfSingularity();

                    quest.Owner = pm;
                    quest.Quester = this;

                    pm.SendGump(new MondainQuestGump(quest));
                }
                else if (quest.Completed)
                    from.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
                else if (!pm.HasGump(typeof(QAndAGump)))
                    pm.SendGump(new QAndAGump(pm, quest));
            }
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:31,代码来源:ShrineOfSingularity.cs


示例11: OnSpeech

		public override void OnSpeech( SpeechEventArgs m )
		{
			if ( m.Mobile.InRange( this, 5 ) )
			{
					Say( String.Format( "Hi {0}! My name is Jamal. I am supposed to be a Quest NPC.", m.Mobile.Name ) );
					Say( String.Format( "Sorry, but this Quest is currently not working." ) );
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:8,代码来源:Jamal.cs


示例12: OnSpeech

        } // Tell the core that we implement OnMovement

        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!e.Handled && from.InRange(this, 10) && e.Speech.ToLower() == "active" && !Active)
            {
                PublicOverheadMessage(MessageType.Emote, 2049, false, "The Battle for Bucaneer's Den will begin in " + NextProximityTime.ToString(CultureInfo.InvariantCulture) + "minutes.");
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:11,代码来源:CapturePoint.cs


示例13: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            var from = e.Mobile;

            if (!e.Handled && from.InRange(this, 5) && e.Speech.ToLower() == "vendor buy")
            {
                if (from is PlayerMobile)
                    from.SendGump(new ValorBoardGumpChangeTitle(from, 0));
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:10,代码来源:TitleChanger.cs


示例14: EventSink_Speechhandler

 public static void EventSink_Speechhandler(SpeechEventArgs e)
 {
     if (e.Mobile.FindItemOnLayer(Layer.Helm) is ConquestOrcMask)
     {
         e.Blocked = true;
         int words = e.Speech.Split(' ').Length;
         string speech = InhumanSpeech.Orc.ConstructSentance(words);
         e.Mobile.PublicOverheadMessage(MessageType.Label, 33, true, speech);
     }
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:10,代码来源:ConquestOrcMask.cs


示例15: EventSink_Speech

		private static void EventSink_Speech( SpeechEventArgs e )
		{

			if( Insensitive.Contains( e.Speech, "trick or treat" ) )
			{
				e.Mobile.Target = new TrickOrTreatTarget();

				e.Mobile.SendLocalizedMessage( 1076764 );  /* Pick someone to Trick or Treat. */
			}
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:10,代码来源:TrickOrTreat.cs


示例16: EventSink_Speech

        private static void EventSink_Speech( SpeechEventArgs e )
        {
            Mobile from = e.Mobile;

            if ( from.AccessLevel > AccessLevel.Player )
                return;

            if ( !NameVerification.Validate( e.Speech, 0, int.MaxValue, true, true, false, false, int.MaxValue, m_Exceptions, m_Disallowed, m_StartDisallowed ) )
                e.Blocked = !OnProfanityDetected( from, e.Speech );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:10,代码来源:ProfanityProtection.cs


示例17: OnSpeech

        private static void OnSpeech(SpeechEventArgs args)
        {
            string msg;

            if (args.Mobile == null)
            {
                return;
            }

            if (args.Mobile.Region != null && !string.IsNullOrEmpty(args.Mobile.Region.Name))
            {
                msg = String.Format("{0} ({1}): {2}", args.Mobile.RawName, args.Mobile.Region.Name, args.Speech);
            }
            else
            {
                msg = String.Format("{0}: {1}", args.Mobile.RawName, args.Speech);
            }

            ArrayList rem = null;

            foreach (object t in m_HearAll)
            {
                if (t is Mobile)
                {
                    var m = (Mobile) t;

                    if (m.NetState == null)
                    {
                        if (rem == null)
                        {
                            rem = new ArrayList(1);
                        }

                        rem.Add(m);
                    }
                    else
                    {
                        if (m.InRange(args.Mobile.Location, 14))
                        {
                            continue;
                        }

                        m.SendMessage(msg);
                    }
                }
            }

            if (rem != null)
            {
                foreach (object t in rem)
                {
                    m_HearAll.Remove(t);
                }
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:55,代码来源:HearAll.cs


示例18: OnSpeech

		public override void OnSpeech( SpeechEventArgs e )
		{
			if ( !e.Handled && e.Mobile.Alive && e.HasKeyword( 0x38 ) ) // *appraise*
			{
				PublicOverheadMessage( MessageType.Regular, 0x3B2, 500608 ); // Which deed would you like appraised?
				e.Mobile.BeginTarget( 12, false, TargetFlags.None, Appraise_OnTarget );
				e.Handled = true;
			}

			base.OnSpeech( e );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:11,代码来源:RealEstateBroker.cs


示例19: EventSink_Speech

		static void EventSink_Speech(SpeechEventArgs e)
		{
			string cmd = ((e.Speech.Length > 1) ? e.Speech.Substring(1) : "");

			for (int i = 0; i < prefixes.Length && !e.Blocked; i++) {
				if (e.Speech[0] == prefixes[i]) {
					Server.Commands.CommandSystem.Handle(e.Mobile, Server.Commands.CommandSystem.Prefix + cmd);
					e.Blocked = true;
				}
			}
		}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:11,代码来源:MultiplePrefixes.cs


示例20: OnSpeech

        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled)
            {
                Mobile m = e.Mobile;

                if (m == null || !m.Player) return;

                string speech = e.Speech.ToLower();

                    if (speech.IndexOf("bonjour") >= 0)
                        Say("Bonjour moussaillon! Toi aussi tu viens pour la légende?");

                    else if ((speech.IndexOf("légende") >= 0)||(speech.IndexOf("legende") >= 0))
                    {
                        Say("Et ben oui, le pirate qui a esquivé un boulet de 35, du jamais vu!");
                    }
                    else if (speech.IndexOf("boulet") >= 0)
                    {
                        Say("Ca demande de l'entrainement mais c'est faisable tu peux me croire! Si tu as le cran de regarder la mort en face.");
                    }
                    else if ((speech.IndexOf("entrainement") >= 0) || (speech.IndexOf("entrainer") >= 0))
                    {
                        Say("Je pourrais peut être te l'apprendre ouais...Mais va falloir me prouver que t'as du cran.");
                    }
                    else if (speech.IndexOf("cran") >= 0)
                    {
                        Say("Ben viens me montrer que t'en as moussaillon!");
                        QuestPlayer = (PlayerMobile)e.Mobile;
						this.Blessed = false;
                        this.Attack(e.Mobile);
                        this.Warmode = true;
                    }
                    else if (speech.IndexOf("revoir") >= 0)
                    {
                        Say("Au revoir moussaillon!");
                    }
                    else if (speech.IndexOf("je renonce au bushido") >= 0)
                    {
                        
                        BookOfBushido rb = (BookOfBushido)e.Mobile.Backpack.FindItemByType(typeof(BookOfBushido));
                        if (rb != null)
                        {
                            Say("Même les pirates ont de l'honneur et toi tu te débine...tu me dégoute.");
                            rb.Delete();
                        }
                        else { Say("Comme si t'en avais la trempe gamin...C'est un truc d'homme ca."); }

                    }
                    else
                        Emote("J'ai pas de temps à perdre avec ton baratin.");
                }
                e.Handled = true;
            }
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:54,代码来源:BushidoMaster3.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SpeechRecognitionEngine类代码示例发布时间:2022-05-24
下一篇:
C# SpeculativeBindingOption类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap