Пример #1
0
        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));
            }
        }
Пример #2
0
        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);
        }
Пример #3
0
		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);
		}
Пример #4
0
        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);
        }
Пример #5
0
        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() );
                    }
                }
            }
        }
Пример #6
0
        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);
                }
            }
        }
        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));
                }
            }
        }
Пример #8
0
		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;
					}
				}
			}
		}
Пример #9
0
        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);
        }
Пример #10
0
        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;
                            }
                        }
                    }
                }
            }
        }
Пример #11
0
		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." ) );
			}
		}
Пример #12
0
        } // 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.");
            }
        }
Пример #13
0
		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. */
			}
		}
Пример #14
0
        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));
            }
        }
Пример #15
0
 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);
     }
 }
Пример #16
0
        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 );
        }
Пример #17
0
        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);
                }
            }
        }
Пример #18
0
        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;
            }
Пример #19
0
		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;
				}
			}
		}
Пример #20
0
		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 );
		}
Пример #21
0
 public static void OnSpeech(SpeechEventArgs e)
 {
     if (m_HearAll.Count > 0)
     {
         string msg = String.Format("({0}): {1}", e.Mobile.RawName, e.Speech);
         foreach (Mobile mobile in m_HearAll)
         {
             mobile.SendMessage(msg);
         }
     }
 }
Пример #22
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 2) && DateTime.UtcNow >= NextSpeech && Alive)
            {
                Say("Who ya gunna call?");
                NextSpeech = DateTime.UtcNow + TimeSpan.FromMinutes(5);
            }

            base.OnSpeech(e);
        }
        private static void EventSink_Speech(SpeechEventArgs e)
        {
            if (e.Mobile != null)
            {
                Mobile from = e.Mobile;

                if (from is PlayerMobile)
                {
                    e.Speech = GetFilteredSpeech(from, e.Speech);
                }
            }
        }
Пример #24
0
		public static void OnSpeech( SpeechEventArgs e )
		{
		    string speech = e.Speech;
		    string name = e.Mobile.Name;
		    string account = e.Mobile.Account != null ? e.Mobile.Account.ToString() : "[No account]";
		    string region = e.Mobile.Region.Name;
		    string datetime = DateTime.Now.ToString();

            string text = string.Format("{0} [{1}] [{2}]: <{3}> {4}", datetime, account, region, name, speech );

            speechlist.Add(text);
		}
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 5))
            {
                e.Handled = true;
                QuestDialogue(e.Mobile);
            }

            base.OnSpeech(e);
        }
Пример #26
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            string speech = e.Speech.ToLower();

            if (speech.IndexOf("banque") != -1)
                Say("Toi donner pomme, moi amener coffre.");
            else if (speech.IndexOf("orc") != -1)
                Say("Moi entendre toi parler de moi ! *grogne*");
            else if (speech.IndexOf("bonjour") != -1)
                Say("Toi vouloir coffre de banque ?");
        }
Пример #27
0
		private static void OnSpeech(SpeechEventArgs e)
		{
			if (e == null || !(e.Mobile is PlayerMobile) || e.Mobile.NetState == null || String.IsNullOrWhiteSpace(e.Speech) ||
				e.Mobile.AccessLevel > CMOptions.HandleAccess)
			{
				return;
			}

			string detected;

			if (!Detect(e.Speech, out detected))
			{
				return;
			}

			bool banned = Ban(e.Mobile, e.Speech);
			bool jailed = Jail(e.Mobile, e.Speech);

			ToConsole(e.Mobile, e.Speech, jailed, banned);
			ToLog(e.Mobile, e.Speech, jailed, banned);

			SendPage(e.Mobile, e.Speech, jailed, banned);
			SendWarning(e.Mobile, e.Speech, jailed, banned);

			if (CMOptions.Squelch)
			{
				e.Mobile.Squelched = true;
			}

			if (CMOptions.Kick)
			{
				e.Mobile.Say("I've been kicked!");

				if (e.Mobile.NetState != null)
				{
					e.Mobile.NetState.Dispose();
				}
			}

			Reports.Insert(
				0,
				new AntiAdvertsReport(
					DateTime.Now,
					(PlayerMobile)e.Mobile,
					GetDetectedString(false, e.Mobile, e.Speech, jailed, banned),
					e.Speech,
					jailed,
					banned));

			Reports.TrimEndTo(100);
		}
Пример #28
0
		public override void OnSpeech( SpeechEventArgs e )
		{
			base.OnSpeech( e );

			if (e.Mobile.AccessLevel >= AccessLevel.GameMaster)
			{
				if (e.Speech == "kill")
				{
					m_Timer.Stop();
					m_Timer.Delay = TimeSpan.FromSeconds( Utility.Random(1, 5) );
					m_Timer.Start();
				}
			}
		}
Пример #29
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!e.Handled && from.InRange(Location, 1))
            {
                if (!(from is PlayerMobile))
                    return;
                from.CloseGump(typeof(EasterRewardsUI));
                from.SendGump(new EasterRewardsUI(from as PlayerMobile));               
            }

            base.OnSpeech(e);
        }
Пример #30
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.Mobile.InRange(Location, 3))
            {
                if (e.Speech.ToLower().IndexOf("eidenai amhxania") >= 0)
                {
                    e.Mobile.CloseGump(typeof(EtherealSaleInterface));
                    e.Mobile.SendGump(new EtherealSaleInterface());
                    Direction = GetDirectionTo(e.Mobile.Location);
                }
            }

            base.OnSpeech(e);
        }
Пример #31
0
        // Temporary
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            Mobile from = e.Mobile;

            if (m_Mobile is BaseVendor && from.InRange(m_Mobile, Core.AOS ? 1 : 4) && !e.Handled)
            {
                if (e.HasKeyword(0x14D))                     // *vendor sell*
                {
                    e.Handled = true;

                    ((BaseVendor)m_Mobile).VendorSell(from);
                    m_Mobile.FocusMob = from;
                }
                else if (e.HasKeyword(0x3C))                     // *vendor buy*
                {
                    e.Handled = true;

                    ((BaseVendor)m_Mobile).VendorBuy(from);
                    m_Mobile.FocusMob = from;
                }
                else if (WasNamed(e.Speech))
                {
                    if (e.HasKeyword(0x177))                         // *sell*
                    {
                        e.Handled = true;

                        ((BaseVendor)m_Mobile).VendorSell(from);
                    }
                    else if (e.HasKeyword(0x171))                         // *buy*
                    {
                        e.Handled = true;

                        ((BaseVendor)m_Mobile).VendorBuy(from);
                    }

                    m_Mobile.FocusMob = from;
                }
            }
        }
Пример #32
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (e.Mobile is PlayerMobile && e.Mobile.Alive)
            {
                if (e.Speech.ToLower() == this.Name.ToLower())
                {
                    this.Say("Did you want to talk to me?");
                }

                if (e.HasKeyword(0x003b))                     // *hi*
                {
                    this.Say("Hello to thee, {0}.", e.Mobile.Name);
                }

                if (e.HasKeyword(0x00fa))                     // *bye*
                {
                    this.Say("Fare thee well, {0}.", e.Mobile.Name);
                }

                if (e.HasKeyword(0x0016))                     // *help*
                {
                    switch (Utility.Random(5))
                    {
                    case 0:
                        this.Say("I would assist thee, but I am tired."); break;

                    case 1:
                        this.Say("Alas, I cannot help thee, I am on my break."); break;

                    case 2:
                        this.Say("No help for thee today."); break;

                    case 3:
                        this.Say("We shall protect thee."); break;

                    case 4:
                        this.Say("What is my help worth to thee?"); break;
                    }
                }
            }
        }
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);
            Mobile from = e.Mobile;

// if( e.Layer.Helm is NecromaticMask )
            if (from.FindItemOnLayer(Layer.Helm) is NecromaticMask)
            {
                if (e.Speech.IndexOf("nwapslleh") >= 0)

                {
                    m_pss = new PoisonSpell(this, null); // get your spell
                    if (m_pss.Cast())                    // if it casts the spell
                    {
                        TimeSpan castDelay = m_pss.GetCastDelay();
                        m_CastTimer = new PSCastTimer(m_pss, from, castDelay);
                        m_CastTimer.Start();
                    }
                }
            }
        }
Пример #34
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (m_TurnedOn && IsLockedDown)
            {
                if (m_NewsTimer == null && e.HasKeyword(0x30) && e.Mobile.Alive && e.Mobile.InRange(this, 12)) // *news*
                {
                    TownCrierEntry tce = GetRandomEntry();

                    if (tce == null)
                    {
                        PublicOverheadMessage(MessageType.Regular, 0x3B2, 1005643); // I have no news at this time.
                    }
                    else
                    {
                        m_NewsTimer = Timer.DelayCall(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(3.0), new TimerStateCallback(ShoutNews_Callback), new object[] { tce, 0 });

                        PublicOverheadMessage(MessageType.Regular, 0x3B2, 502978); // Some of the latest news!
                    }
                }
            }
        }
Пример #35
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (XmlScript.HasTrigger(this, TriggerName.onSpeech) && UberScriptTriggers.Trigger(this, e.Mobile, TriggerName.onSpeech, null, e.Speech))
            {
                return;
            }
            if (!e.Handled && e.Mobile.InRange(this, 6))
            {
                int[]  keywords = e.Keywords;
                string speech   = e.Speech;

                // Check for a greeting or 'Hire'
                if ((e.HasKeyword(0x003B)) || (e.HasKeyword(0x0162)))
                {
                    e.Handled = Payday(this);
                    this.SayHireCost();
                }
            }

            base.OnSpeech(e);
        }
Пример #36
0
 private static void OnSpeech(SpeechEventArgs args)
 {
     if (args.Mobile != null && Hearconsole)
     {
         try
         {
             if ((Server.Misc.Worlds.GetRegionName(args.Mobile.Map, args.Mobile.Location)).Length > 0)
             {
                 Console.WriteLine("" + args.Mobile.Name + " (" + Server.Misc.Worlds.GetRegionName(args.Mobile.Map, args.Mobile.Location) + "): " + args.Speech + "");
             }
             else
             {
                 Console.WriteLine("" + args.Mobile.Name + ": " + args.Speech + "");
             }
         }
         catch (Exception e)
         {
             Console.WriteLine(e.Message);
         }
     }
 }
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!e.Handled && from is PlayerMobile && from.InRange(this.Location, 2) && e.HasKeyword(0x1F))                   // *disguise*
            {
                PlayerMobile pm = (PlayerMobile)from;

                if (pm.NpcGuild == NpcGuild.ThievesGuild)
                {
                    SayTo(from, 501839);                       // That particular item costs 700 gold pieces.
                }
                else
                {
                    SayTo(from, 501838);                       // I don't know what you're talking about.
                }
                e.Handled = true;
            }

            base.OnSpeech(e);
        }
Пример #38
0
        public override void SetName(SpeechEventArgs e)
        {
            if (e.Mobile.AccessLevel < AccessLevel.GameMaster && e.Mobile != Owner)
            {
                if (TillerMan != null)
                {
                    TillerMan.TillerManSay(1042880); // Arr! Only the owner of the ship may change its name!
                }
                return;
            }
            else if (!e.Mobile.Alive)
            {
                if (TillerMan != null)
                {
                    TillerMan.TillerManSay(502582); // You appear to be dead.
                }
                return;
            }

            base.SetName(e);
        }
Пример #39
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            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, new TargetCallback(Appraise_OnTarget));
                    e.Handled = true;
                }
            }

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

			if (!from.InRange(this, 0))
				return;

			if (e.Speech.ToLower() == "kal ort ora")
			{
				// Perform check
				if (from is PlayerMobile)
				{
					// Sparklies!! yay
					Effects.SendLocationParticles(EffectItem.Create(
													Location, Map, EffectItem.DefaultDuration
																	), 0x376A, 9, 32, 5020);
					new ConditionCheckTimer((PlayerMobile)from, this).Start();
					from.PlaySound(0x1F9);
				}
			}
		}
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (from != ((BaseCreature)this.m_Owner).ControlMaster && !from.InRange(this, 1) || !(((BaseCreature)this.m_Owner).Alive))
            {
                return;
            }
            string said = e.Speech.ToLower();

            if (from.InRange(this, 2))
            {
                if (said == this.m_SleepingBodyName.ToLower())
                {
                    ((BaseCreature)this.m_Owner).MoveToWorld(((BaseCreature)this.m_Owner).Home, ((BaseSoldier)this.m_Owner).HouseMap);
                    this.Delete();
                    from.SendMessage("You quietly wake them.");
                    return;
                }
            }
        }
Пример #42
0
        public override void OnSpeech(SpeechEventArgs args)
        {
            if (XmlScript.HasTrigger(this, TriggerName.onSpeech) && UberScriptTriggers.Trigger(this, args.Mobile, TriggerName.onSpeech, null, args.Speech))
            {
                return;
            }
            string said = args.Speech.ToLower();
            Mobile from = args.Mobile;

            if ((said.ToLower().IndexOf("new orders") >= 0) && (m_owner == from))
            {
                if (m_neworders)
                {
                    this.Say("You have some new orders!");
                }
                else
                {
                    this.Say("You have no new orders at this time.");
                }
            }
        }
Пример #43
0
 public override void OnSpeech(SpeechEventArgs args)
 {
     if (SingletonEvent.Instance.HasAntiPanelaMode)
     {
         foreach (Mobile mobile in this.GetMobiles())
         {
             if (mobile == args.Mobile)
             {
                 continue;
             }
             else
             {
                 mobile.Say(args.Speech);
             }
         }
     }
     else
     {
         base.OnSpeech(args);
     }
 }
Пример #44
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile m = e.Mobile;

            if (!e.Handled && m.InRange(Location, 2) && DateTime.UtcNow >= NextSpeech)
            {
                var rnd = Utility.Random(0, 4);

                switch (rnd)
                {
                case 0:
                {
                    Say("Mungbat.");
                    break;
                }

                case 1:
                {
                    Say("Mungbat?");
                    break;
                }

                case 2:
                {
                    Say("Mungbat? Mungbat.");
                    break;
                }

                case 3:
                {
                    Say("MUUUUNNNGGGBAAATTT");
                    break;
                }
                }

                NextSpeech = DateTime.UtcNow + TimeSpan.FromSeconds(10);
            }

            base.OnSpeech(e);
        }
Пример #45
0
        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;
                }

                case 0x0035:                         // i renounce my young player status*
                {
                    if (from is PlayerMobile && ((PlayerMobile)from).Young && !from.HasGump(typeof(RenounceYoungGump)))
                    {
                        from.SendGump(new RenounceYoungGump());
                    }

                    break;
                }
                }
            }
        }
Пример #46
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            base.OnSpeech(e);

            if (!e.Handled && InRange(e.Mobile, 3))
            {
                if (m_NewsTimer == null && e.HasKeyword(0x30))                     // *news*
                {
                }

                for (int i = 0; i < m_Rumors.Length; ++i)
                {
                    BarkeeperRumor rumor = m_Rumors[i];

                    if (rumor == null)
                    {
                        continue;
                    }

                    string keyword = rumor.Keyword;

                    if (keyword == null || (keyword = keyword.Trim()).Length == 0)
                    {
                        continue;
                    }

                    if (Insensitive.Equals(keyword, e.Speech))
                    {
                        string message = rumor.Message;

                        if (message == null || (message = message.Trim()).Length == 0)
                        {
                            continue;
                        }

                        PublicOverheadMessage(MessageType.Regular, 0x3B2, false, message);
                    }
                }
            }
        }
Пример #47
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!Active || Receivers.Count == 0 || (RootParent != null && !(RootParent is Mobile)))
            {
                return;
            }

            if (e.Type == MessageType.Emote)
            {
                return;
            }

            Mobile from   = e.Mobile;
            string speech = e.Speech;

            if (from.AccessLevel < SpeechAccessLevel)
            {
                return;
            }

            foreach (ReceiverCrystal receiver in new List <ReceiverCrystal>(Receivers))
            {
                if (receiver.Deleted)
                {
                    Receivers.Remove(receiver);
                }

                else if (Charges > 0)
                {
                    receiver.TransmitMessage(from, speech);
                    Charges--;
                }

                else
                {
                    this.Active = false;
                    break;
                }
            }
        }
Пример #48
0
        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 is Guild && from.Guild != null)
                    {
                        ((Guild)from.Guild).RemoveMember(from);
                    }

                    break;
                }

                    /*case 0x0032: // "*i must consider my sins*
                     * {
                     *      if ( from.Kills == 0 )
                     *              from.SendLocalizedMessage( 502122 );
                     *      else if ( from.Kills <= 4 )
                     *              from.SendLocalizedMessage( 502125 );
                     *      else if ( from.Kills >= 5 )
                     *              from.SendLocalizedMessage( 502123 );
                     *      break;
                     * }*/
                }
            }

            string lower = args.Speech.ToLower();

            if (lower.IndexOf("view updates") != -1)
            {
                Server.Gumps.UpdatesGump.ShowUpdates(from);
            }
        }
Пример #49
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            bool   FoundTopic = false;
            int    TopicFound = 0;
            string speech     = e.Speech.ToLower();

            if (!Preaching && speech.IndexOf("topic") >= 0)
            {
                TopicFound = TopicParse.GetMatch(speech);
                if (TopicFound > 0)
                {
                    FoundTopic = true;
                }
                // for ( int x = 0; x < Enum.GetValues(typeof(Topic)).Length; x++ )
                // {
                // if ( speech.IndexOf( TopicReader.GetTopicName( (Topic)x ) ) >= 0 )
                // {
                // FoundTopic = true;
                // TopicFound = x;
                // break;
                // }
                // }
                if (FoundTopic)
                {
                    ReadTopicalPassage((Topic)TopicFound);
                }
                else
                {
                    ReadTopicalPassage();
                }
            }
            else if (!Preaching && speech.IndexOf("verse") >= 0)
            {
                ReadVerse();
            }
            else if (!Preaching && speech.IndexOf("passage") >= 0)
            {
                ReadPassage();
            }
        }
Пример #50
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.HasKeyword(Keyword) && e.Mobile.InRange(this.Location, 2))
            {
                e.Handled = true;

                Mobile from = e.Mobile;
                Guild  g    = from.Guild as Guild;

                if (g == null || g.Type != Type)
                {
                    Say(SignupNumber);
                }
                else
                {
                    Container  pack      = from.Backpack;
                    BaseShield shield    = Shield;
                    Item       twoHanded = from.FindItemOnLayer(Layer.TwoHanded);

                    if ((pack != null && pack.FindItemByType(shield.GetType()) != null) || (twoHanded != null && shield.GetType().IsAssignableFrom(twoHanded.GetType())))
                    {
                        Say(1007110);                           // Why dost thou ask about virtue guards when thou art one?
                        shield.Delete();
                    }
                    else if (from.PlaceInBackpack(shield))
                    {
                        Say(Utility.Random(1007101, 5));
                        Say(1007139);                           // I see you are in need of our shield, Here you go.
                        from.AddToBackpack(shield);
                    }
                    else
                    {
                        from.SendLocalizedMessage(502868);                           // Your backpack is too full.
                        shield.Delete();
                    }
                }
            }

            base.OnSpeech(e);
        }
Пример #51
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            PlayerMobile pm = e.Mobile as PlayerMobile;

            if (pm.AbyssEntry)
            {
                pm.SendLocalizedMessage(1112697);  //You enter a state of peaceful contemplation, focusing on the meaning of Singularity.
            }
            else if (!e.Handled && pm.InRange(Location, 2) && e.Speech.ToLower().Trim() == "unorus" && QuestHelper.CheckDoneOnce(pm, typeof(TheArisenQuest), null, false))
            {
                e.Handled = true;
                e.Mobile.PlaySound(0xF9);

                var quest = QuestHelper.GetQuest <QuestOfSingularity>(pm);

                if (HasDelay(pm) && pm.AccessLevel == AccessLevel.Player)
                {
                    pm.PublicOverheadMessage(MessageType.Regular, 0x47E, 1112685); // You need more time to contemplate the Book of Circles before trying again.
                }
                else if (quest == null)
                {
                    quest = new QuestOfSingularity
                    {
                        Owner   = pm,
                        Quester = this
                    };

                    pm.SendGump(new MondainQuestGump(quest));
                }
                else if (quest.Completed)
                {
                    pm.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
                }
                else if (!pm.HasGump(typeof(QAndAGump)))
                {
                    pm.SendGump(new QAndAGump(pm, quest));
                }
            }
        }
Пример #52
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.Mobile.InRange(this, 4))
            {
                if (e.HasKeyword(0x003B) || e.HasKeyword(0x0162))
                {
                    e.Handled = true;
                    if (this.Controled)
                    {
                        if (this.ControlMaster == e.Mobile)
                        {
                        }
                        else
                        {
                            Say("I don't think I've agreed to work with you...yet?");
                        }
                    }
                }
            }

            base.OnSpeech(e);
        }
Пример #53
0
        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));
                }
            }
        }
        public override void OnSpeech(SpeechEventArgs e)
        {
            Item am = e.Mobile.Backpack.FindItemByType(typeof(AbyssMarker));

            if (!e.Handled && e.Mobile.InRange(this.Location, 2))
            {
                if (am != null)    // && e != null)
                {
                    e.Mobile.SendLocalizedMessage(1112697);
                    e.Mobile.PlaySound(0xF9);
                }
                else
                {
                    if (e.Speech.ToLower() == "unorus")
                    {
                        e.Handled = true;
                    }
                    e.Mobile.SendGump(new SQGump(e.Mobile));
                    e.Mobile.PlaySound(0xF9);
                }
            }
        }
Пример #55
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.Mobile.InRange(this.Location, 2))
            {
                PlayerMobile pm = e.Mobile as PlayerMobile;

                if (pm.AbyssEntry)
                {
                    e.Mobile.SendLocalizedMessage(1112697);
                    e.Mobile.PlaySound(0xF9);
                }
                else
                {
                    if (e.Speech.ToLower() == "unorus")
                    {
                        e.Handled = true;
                    }
                    e.Mobile.SendGump(new SQGump(e.Mobile));
                    e.Mobile.PlaySound(0xF9);
                }
            }
        }
Пример #56
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (e.Speech.ToLower().IndexOf("auction") > -1)
            {
                e.Handled = true;

                if (!e.Mobile.CheckAlive())
                {
                    SayTo(e.Mobile, "Am I hearing voices?");
                }
                else if (AuctionSystem.Running)
                {
                    e.Mobile.SendGump(new AuctionGump(e.Mobile));
                }
                else
                {
                    SayTo(e.Mobile, "Sorry, we're closed at this time. Please try again later.");
                }
            }

            base.OnSpeech(e);
        }
Пример #57
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (!e.Handled && from is PlayerMobile && from.InRange(this.Location, 2) && e.Speech.Contains("abyss"))
            {
                PlayerMobile pm = (PlayerMobile)from;

                if (e.Speech.Contains("abyss"))
                {
                    this.SayTo(from, "It's entrance is protected by stone guardians, who will only grant passage to the carrier of a Tripartite Key!");
                }

                else if (e.Speech.Contains("key"))
                {
                    this.SayTo(from, "It's three parts you must find and re-unite as one!");
                }

                e.Handled = true;
            }
            base.OnSpeech(e);
        }
Пример #58
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (XmlScript.HasTrigger(this, TriggerName.onSpeech) && UberScriptTriggers.Trigger(this, e.Mobile, TriggerName.onSpeech, null, e.Speech))
            {
                return;
            }
            base.OnSpeech(e);
            Mobile from = e.Mobile;

            if (from.FindItemOnLayer(Layer.Helm) is NecromaticMask)
            {
                if (e.Speech.IndexOf("nwapslleh") >= 0)
                {
                    GreaterHealSpell gheal = new GreaterHealSpell(this, null); // get your spell
                    if (gheal.Cast())                                          // if it casts the spell
                    {
                        m_CastTimer = new GHCastTimer(gheal, from, gheal.GetCastDelay());
                        m_CastTimer.Start();
                    }
                }
            }
        }
Пример #59
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            Mobile from = e.Mobile;

            if (from != m_cannon.Owner || !from.InRange(this, 3))
            {
                return;
            }
            string said = e.Speech.ToLower();

            if (said.IndexOf("hitch") != -1 && said.IndexOf("unhitch") == -1)
            {
                if (NextShot > DateTime.Now)
                {
                    from.SendMessage("You must wait for the cannon to cool down before you can hitch it.");
                }
                else
                {
                    from.Target = new InternalTarget1(this);
                }
            }
        }
Пример #60
0
        public override void OnSpeech(SpeechEventArgs e)
        {
            string speech = e.Speech.ToLower();

            for (int i = 0; i < m_Keywords.Length; i++)
            {
                if (speech.Contains(m_Keywords[i].Keyword))
                {
                    m_NextTalk = DateTime.Now + TimeSpan.FromSeconds(10.0);

                    Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(
                                        delegate
                    {
                        Direction = this.GetDirectionTo(e.Mobile);
                        Say(m_Keywords[i].Answer);
                    }
                                        ));

                    return;
                }
            }
        }