| CODE |
private static object m_RaceContext = new object(); public override bool CheckHearsMutatedSpeech( Mobile m, object context ) { Mobile somemobile = m; PlayerMobile someperso = somemobile as PlayerMobile; if(someperso !=null) { if((someperso.m_Race != this.m_Race || (FindItemOnLayer( Layer.Helm ) != null)) && someperso.AccessLevel == AccessLevel.Player ) { if ( context == m_RaceContext ) return ( ( somemobile is PlayerMobile) && ((PlayerMobile)somemobile).m_Race == m_Race ); return base.CheckHearsMutatedSpeech( somemobile, context ); } } return false; } public override bool MutateSpeech( ArrayList hears, ref string text, ref object context ) { if ( Alive ) { if ( (this.FindItemOnLayer( Layer.Helm ) is Bascinet) || (this.FindItemOnLayer( Layer.Helm ) is BoneHelm) || (this.FindItemOnLayer( Layer.Helm ) is CloseHelm) || (this.FindItemOnLayer( Layer.Helm ) is DaemonHelm) || (this.FindItemOnLayer( Layer.Helm ) is Helmet) || (this.FindItemOnLayer( Layer.Helm ) is NorseHelm) || (this.FindItemOnLayer( Layer.Helm ) is OrcHelm) || (this.FindItemOnLayer( Layer.Helm ) is PlateHelm) ) { if ( base.MutateSpeech( hears, ref text, ref context ) ) return true; string[] HeaumeWords = new string[]{ "mmm", "mmffft", "mffft", "hmmmm", "arrgh", "rhaaaaaa", "...", " rrmmmfff", "mmuufff", "pftt", "hiiiiii", "...", "???", "!!!", "***" }; string[] split = text.Split( ' ' ); for ( int i = 0; i < split.Length; ++i ) split[i] = HeaumeWords[Utility.Random( HeaumeWords.Length )]; text = String.Join( " ", split ); return true; } if(this.m_Race==RaceType.Orc ) { if ( base.MutateSpeech( hears, ref text, ref context ) ) return true; string[] orcWords = new string[]{ "ugbug", "glubyug", "rugbleg", "ardig", "waaargh", "durbuk", "fiddug", "gok", "gitz", "grot", "nibbuk", "pagrog", "niggug", "raggik", "buggrut", "Zog", "zog", "Gorka", "gorka", "bratz", "faschig", "bazza", "grook", "bugrit" }; string[] split = text.Split( ' ' ); for ( int i = 0; i < split.Length; ++i ) split[i] = orcWords[Utility.Random( orcWords.Length )]; text = String.Join( " ", split ); return true; } if(this.m_Race==Server.Mobiles.PlayerMobile.RaceType.Human && this.FindItemOnLayer( Layer.Helm ) == null ) { if ( base.MutateSpeech( hears, ref text, ref context ) ) return true; string[] humanWords = new string[]{ "ayesey", "watho", "jolligoodshoh", "rahrther", "watwat", "demryte", "soopa", "ahi", "blahstid", "chohksawey" }; string[] split = text.Split( ' ' ); for ( int i = 0; i < split.Length; ++i ) split[i] = humanWords[Utility.Random( humanWords.Length )]; text = String.Join( " ", split ); return true; } } for ( int i = 0; i < hears.Count; ++i ) { object o = hears[i]; if ( o != this && o is Mobile && ((Mobile)o).Skills[SkillName.SpiritSpeak].Value >= 100.0 ) return false; } return base.MutateSpeech( hears, ref text, ref context ); } |