Example #1
0
        private void ChatTimerTick(object o)
        {
            if (base.GetBotData().WasPicked)
            {
                StopTimerTick();
                return;
            }

            if (base.GetBotData().RandomSpeech.Count > 0)
            {
                RandomSpeech randomSpeech = base.GetBotData().GetRandomSpeech(this.MixPhrases);
                base.GetRoomUser().Chat(null, randomSpeech.Message, randomSpeech.Shout, 0, 0);
            }
        }
Example #2
0
 internal RandomSpeech GetRandomSpeech(bool MixPhrases)
 {
     if (this.RandomSpeech.Count < 1)
     {
         return(new RandomSpeech("", false));
     }
     checked
     {
         if (MixPhrases)
         {
             return(this.RandomSpeech[CyberEnvironment.GetRandomNumber(0, this.RandomSpeech.Count)]);
         }
         RandomSpeech result = new RandomSpeech("", false);
         if (this.LastSpokenPhrase >= this.RandomSpeech.Count)
         {
             this.LastSpokenPhrase = 1;
         }
         result = this.RandomSpeech[this.LastSpokenPhrase - 1];
         this.LastSpokenPhrase++;
         return(result);
     }
 }
Example #3
0
		internal RandomSpeech GetRandomSpeech(bool MixPhrases)
		{
			if (this.RandomSpeech.Count < 1)
			{
				return new RandomSpeech("", false);
			}
			checked
			{
				if (MixPhrases)
				{
					return this.RandomSpeech[CyberEnvironment.GetRandomNumber(0, this.RandomSpeech.Count)];
				}
				RandomSpeech result = new RandomSpeech("", false);
				if (this.LastSpokenPhrase >= this.RandomSpeech.Count)
				{
					this.LastSpokenPhrase = 1;
				}
				result = this.RandomSpeech[this.LastSpokenPhrase - 1];
				this.LastSpokenPhrase++;
				return result;
			}
		}