Esempio n. 1
0
        public QonqrManager()
        {
            _apiCall = new ApiCall();
            _statistics = new Stats();
            _zonesList = new List<Zoneski>();
            _harvest = new Harvester();
            _fortsList = new List<Zoneski>();
            _launch = new Launcher();

            ConfigFile configFile = new ConfigFile();
            _accounts = configFile.GetAccounts();

            ResetCoordinates();
        }
Esempio n. 2
0
        public static int Main(string[] args)
        {
            AppDomain currentDomain = AppDomain.CurrentDomain;
            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(UncaughtHandler);

            Form = new ProgressForm();
            TestFunction();

            ConfigFile file = new ConfigFile();
            Accounts = file.GetAccounts();
            HarvestResources = new HarvestResources(Accounts);

            AppData = new AppData();
            APICall = new ApiCall();

            #if uncomment
            foreach (AccountData account in accounts)
            {
                LoginApiCall login = APICall.Login(account.Username, account.Password, account.DeviceId);
                account.Level = login.PlayerProfile.Level;
                account.Faction = login.PlayerProfile.FactionId;

                FortsApiCall forts = APICall.Forts(account.Latitude, account.Longitude);
                account.Forts = forts.PlayerForts.Forts;
            }
            #endif

            BotsAfterLaunch = 0;
            BotsPerSecond = 0;
            BotsLaunched = 0;

            Form.button_login.Click += new EventHandler(LoginButtonClick);
            Form.button_Harvest.Click += new EventHandler(HarvestButtonClick);
            Form.button_LaunchAttack.Click += new EventHandler(LaunchAttackButtonClick);
            Form.button_Scan.Click += new EventHandler(ScanButtonClick);

            if (args.Length == 3)
            {
                Username = args[0];
                Password = args[1];
                DeviceId = args[2];

                Login(Username, Password, DeviceId);
            }

            Application.Run(Form);
            return 0;
        }
Esempio n. 3
0
        public static int Main(string[] args)
        {
            RunTests();

            AppDomain currentDomain = AppDomain.CurrentDomain;
            currentDomain.UnhandledException += new UnhandledExceptionEventHandler(UncaughtHandler);

            APICall = new ApiCall();

            ConfigFile configFile = new ConfigFile();
            Players = configFile.GetAccounts();

            #if DEBUG
            foreach (Player player in Players)
            {
                LoginApiCall login = APICall.Login(
                    player.Username, player.Password, player.DeviceId);

            }
            #endif

            BotsAfterLaunch = 0;
            BotsPerSecond = 0;
            BotsLaunched = 0;

            Time = new Timer();
            Time.Interval = 1000;
            Time.Enabled = true;
            Time.Tick += Time_Tick;

            HarvestTimer = new Timer();
            HarvestTimer.Interval = 60000;
            HarvestTimer.Enabled = true;
            HarvestTimer.Tick += HarvestTimer_Tick;

            Form = new ProgressForm();

            LabelList = new List<Label>()
            {
                Form.label_var_fort1,
                Form.label_var_fort2,
                Form.label_var_fort3,
                Form.label_var_fort4,
                Form.label_var_fort5,
                Form.label_var_fort6,
                Form.label_var_fort7,
                Form.label_var_fort8,
                Form.label_var_fort9,
                Form.label_var_fort10,
                Form.label_var_fort11,
                Form.label_var_fort12,
                Form.label_var_fort13,
                Form.label_var_fort14,
                Form.label_var_fort15,
                Form.label_var_fort16,
                Form.label_var_fort17,
                Form.label_var_fort18,
                Form.label_var_fort19,
                Form.label_var_fort20,
            };

            Form.button_Login.Click += new EventHandler(LoginButtonClick);
            Form.textBox_PasswordField.Click += new EventHandler(PasswordFieldClick);
            Form.button_HarvestAll.Click += new EventHandler(HarvestAllButtonClick);
            Form.button_LaunchAttack.Click += new EventHandler(LaunchAttackButtonClick);
            Form.button_Scan.Click += new EventHandler(ScanButtonClick);
            Form.button_Set.Click += new EventHandler(SetButtonClick);

            if (args.Length == 3)
            {
                Username = args[0];
                Password = args[1];
                DeviceId = args[2];

                Form.textBox_UsernameField.Text = args[0];
                Form.textBox_PasswordField.Text = args[1];

                Login(Username, Password, DeviceId);
            }
            Application.Run(Form);

            return 0;
        }