Beispiel #1
0
        public static void lognNewAccount()
        {
            accounts2 = accounts;
            accounts.RemoveAt(0);
            int curRunning = 0;

            if (accounts.Count == 0)
            {
                Console.WriteLine(getTimestamp() + "No more accounts to login.");
            }
            foreach (string acc in accounts)
            {
                string   Accs             = acc;
                string[] stringSeparators = new string[] { "|" };
                var      result           = Accs.Split(stringSeparators, StringSplitOptions.None);
                curRunning += 1;
                if (result[2] != null)
                {
                    QueueTypes queuetype = (QueueTypes)System.Enum.Parse(typeof(QueueTypes), result[2]);
                    Saebot     ritoBot   = new Saebot(result[0], result[1], Region, Path2, curRunning, queuetype);
                }
                else
                {
                    QueueTypes queuetype = QueueTypes.ARAM;
                    Saebot     ritoBot   = new Saebot(result[0], result[1], Region, Path2, curRunning, queuetype);
                }
                Console.Title = "Saebot " + cversion + " | Region: " + Region + " | Currently connected: " + connectedAccs;
                if (curRunning == maxBots)
                {
                    break;
                }
            }
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            InitChecks();
            Console.Title           = "Saebot";
            Console.ForegroundColor = ConsoleColor.Green;
            Console.SetWindowSize(Console.WindowWidth + 5, Console.WindowHeight);
            Console.WriteLine("Saebot v0.1a");
            loadVersion();
            Console.WriteLine();
            log("config", "Loading config/settings.ini");
            loadConfiguration();
            if (replaceConfig)
            {
                log("config", "Replacing Config");
                gamecfg();
            }
            while (!File.Exists(Path2 + "lol.launcher.exe"))
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine();
                Console.WriteLine("Wrong LauncherPath. the path should look like this: C:\\Riot Games\\League of Legends\\ \n Please check config\\settings.ini, otherwise your LoL won't start.");
                Console.WriteLine();
                System.Threading.Thread.Sleep(5000);
                loadConfiguration();
            }
            Console.ForegroundColor = ConsoleColor.Cyan;
            log("config", "Loading config/accounts.txt");
ReloadAccounts:
            loadAccounts();
            int curRunning = 0;

            foreach (string acc in accounts)
            {
                try
                {
                    accounts2.RemoveAt(0);
                    string   Accs             = acc;
                    string[] stringSeparators = new string[] { "|" };
                    var      result           = Accs.Split(stringSeparators, StringSplitOptions.None);
                    curRunning += 1;
                    if (result[0].Contains("username"))
                    {
                        Console.WriteLine("Please add your accounts into config/accounts.txt");
                        Console.ReadKey();
                        goto ReloadAccounts;
                    }
                    if (result[2] != null)
                    {
                        QueueTypes queuetype = (QueueTypes)System.Enum.Parse(typeof(QueueTypes), result[2]);
                        Saebot     ritoBot   = new Saebot(result[0], result[1], Region, Path2, curRunning, queuetype);
                    }
                    else
                    {
                        QueueTypes queuetype = QueueTypes.ARAM;
                        Saebot     ritoBot   = new Saebot(result[0], result[1], Region, Path2, curRunning, queuetype);
                    }
                    Console.Title = "Saebot " + cversion + " | Region: " + Region + " | Currently connected: " + connectedAccs;
                    if (curRunning == maxBots)
                    {
                        break;
                    }
                }
                catch (Exception)
                {
                    log("ERROR", "CountAccError: You may have an issue in your accounts.txt");
                    Application.Exit();
                }
            }
            Console.ReadKey();
        }