コード例 #1
0
ファイル: Program.cs プロジェクト: Acanguven/HFL
        public static void startBotting()
        {
            runningSmurfs.Clear();
            if (accounts.Count < 1)
            {
                MessageBox.Show("Try to add smurfs before starting, ok?");
                return;
            }
            int curRunning = 0;

            started = true;
            if (replaceConfig)
            {
                gamecfg();
            }
            int difVal = 0;

            foreach (smurfData acc in accounts)
            {
                curRunning += 1;
                QueueTypes queuetype = (QueueTypes)System.Enum.Parse(typeof(QueueTypes), qType);
                long       startTime = Stopwatch.GetTimestamp() + difVal * 10000;

                RiotBot ritoBot = new RiotBot(acc.username, acc.password, acc.maxLevel, Region, gamePath, curRunning, queuetype, startTime);
                difVal++;
                runningSmurfs.Add(ritoBot);
                if (curRunning == maxBots)
                {
                    break;
                }
            }
        }
コード例 #2
0
 public void stop()
 {
     if (thread != null)
     {
         if (thread.connection.IsConnected())
         {
             thread.connection.Disconnect();
         }
         thread = null;
     }
     log("Stopping existing thread");
 }
コード例 #3
0
 public void start()
 {
     log("Starting new thread");
     if (reconnect)
     {
         reconnect = false;
     }
     stop();
     thread = new RiotBot(username, password, maxLevel, region.ToString(), Settings.gamePath, Settings.queueType, clientMask, this);
     thread.connection.OnDisconnect += new LoLLauncher.LoLConnection.OnDisconnectHandler(this.connection_OnDisconnect);
     thread.connection.OnConnect    += new LoLLauncher.LoLConnection.OnConnectHandler(this.connection_OnConnect);
 }