예제 #1
0
 public override void OnTimerTick()
 {
     if (this.int_2 <= 0)
     {
         if (base.GetRoomBot() != null && base.GetRoomBot().list_0.Count > 0)
         {
             RandomSpeech @class = base.GetRoomBot().GetRandomSpeech();
             base.GetRoomUser().HandleSpeech(null, @class.Message, @class.Shout);
         }
         this.int_2 = Essential.smethod_5(0, 150);
     }
     else
     {
         this.int_2--;
     }
     if (this.int_3 <= 0)
     {
         int int_  = Essential.smethod_5(0, base.GetRoom().RoomModel.int_4);
         int int_2 = Essential.smethod_5(0, base.GetRoom().RoomModel.int_5);
         base.GetRoomUser().MoveTo(int_, int_2);
         this.int_3 = Essential.smethod_5(0, 30);
     }
     else
     {
         this.int_3--;
     }
 }
예제 #2
0
 public override void OnTimerTick()
 {
     try
     {
         if (this.SpeechTimer <= 0)
         {
             if (this.randomSpeeches.Count > 0)
             {
                 if (canSpeak)
                 {
                     RandomSpeech randomSpeech = this.GetRandomSpeech();
                     base.GetRoomUser().HandleSpeech(null, randomSpeech.Message, randomSpeech.Shout, 0);
                 }
             }
             this.SpeechTimer = speechDelta;
         }
         else
         {
             this.SpeechTimer--;
         }
         if (this.int_3 <= 0 && (this.uBot.walkmode == "freeroam" || this.uBot.walkmode == "specified_range") && !base.FollowsUser)
         {
             if (this.uBot.walkmode == "freeroam")
             {
                 int int_  = Essential.smethod_5(0, base.GetRoom().RoomModel.int_4);
                 int int_2 = Essential.smethod_5(0, base.GetRoom().RoomModel.int_5);
                 base.GetRoomUser().MoveTo(int_, int_2);
                 this.int_3 = Essential.smethod_5(0, 30);
             }
             else
             {
                 int int_  = Essential.smethod_5(this.uBot.minX, this.uBot.maxX);
                 int int_2 = Essential.smethod_5(this.uBot.minY, this.uBot.maxY);
                 base.GetRoomUser().MoveTo(int_, int_2);
                 this.int_3 = Essential.smethod_5(0, 30);
             }
         }
         else
         {
             this.int_3--;
         }
     }
     catch { }
 }
예제 #3
0
 public override void OnTimerTick()
 {
     if (this.int_2 <= 0)
     {
         if (base.GetRoomBot().list_0.Count > 0)
         {
             RandomSpeech @class = base.GetRoomBot().GetRandomSpeech();
             base.GetRoomUser().HandleSpeech(null, @class.Message, @class.Shout);
         }
         this.int_2 = Essential.smethod_5(10, 300);
     }
     else
     {
         this.int_2--;
     }
     if (this.int_3 <= 0)
     {
         string text = base.GetRoomBot().WalkMode.ToLower();
         if (text != null && !(text == "stand"))
         {
             if (!(text == "freeroam"))
             {
                 if (text == "specified_range")
                 {
                     int int_  = Essential.smethod_5(base.GetRoomBot().min_x, base.GetRoomBot().max_x);
                     int int_2 = Essential.smethod_5(base.GetRoomBot().min_y, base.GetRoomBot().max_y);
                     base.GetRoomUser().MoveTo(int_, int_2);
                 }
             }
             else
             {
                 int int_  = Essential.smethod_5(0, base.GetRoom().RoomModel.int_4);
                 int int_2 = Essential.smethod_5(0, base.GetRoom().RoomModel.int_5);
                 base.GetRoomUser().MoveTo(int_, int_2);
             }
         }
         this.int_3 = Essential.smethod_5(1, 30);
     }
     else
     {
         this.int_3--;
     }
 }