PsyOps

TimerCode

Jan 6th, 2013
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1.         // Start bot timer and anything needed on initialization
  2.         public void StartBot()
  3.         {
  4.             // Configure and start main game timer
  5.             MainGameTimer.Elapsed += new ElapsedEventHandler(GameTimer);
  6.             MainGameTimer.Interval = 50;
  7.             MainGameTimer.Start();//and start it
  8.  
  9.             Game(msg.remote_pm("PsyOps", "Bot Initialized. Timer started."));
  10.         }
  11.  
  12.         //Timestamp for checking chat
  13.         DateTime CheckChat = DateTime.Now;
  14.         //How often we check chats
  15.         byte CheckChateRate = 1;
  16.         public void GameTimer(object source, ElapsedEventArgs e)
  17.         {
  18.             //if ((DateTime.Now - CheckChat).Duration() > TimeSpan.FromMinutes(CheckChateRate))
  19.             //{
  20.             //    Game(msg.pub("?chat"));
  21.             //    CheckChat = DateTime.Now;
  22.             //}
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment