Пример #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            openGame();
            if (!this.loaded)
            {
                return;
            }


            for (int i = 0; i < this.variableStore.ResourceTable.Rows.Count; i++)
            {
                this.variableStore.ResourceTable.Rows[i][1] = this.m.ReadFloat(this.variableStore.DictOfResource[this.dataGridView2.Rows[i].Cells[0].Value.ToString()]);
                //                    this.dataGridView2.Rows[i].Cells[0].
            }

            if (this.timer2.Enabled)
            {
                this.progressBar1.Maximum = 10;
                if (this.progressBar1.Value < 10)
                {
                    this.progressBar1.Value++;
                }
            }
            else
            {
                this.progressBar1.Value = 0;
            }
            //            this.unitStore.liveTable();

            //            if (!this.dataGridView1.Rows[0].Cells[1].Selected)
            //            {
            //                this.unitStore.unitTable.Rows[0][1] = this.m.Read2Byte(this.variableStore.UnitCrew);
            //            }
            //            else
            //            {
            ////                if(!this.dataGridView1.Rows[0].Cells[1].Value)
            //                this.m.WriteMemory(this.unitStore.variableStore.UnitCrew, "int", this.unitStore.unitTable.Rows[0][1].ToString());
            //                this.label3.Text = this.m.Read2Byte(this.variableStore.UnitCrew).ToString();
            //            }
            //            this.dataGridView1.Rows[0].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitCrew);
            //            this.dataGridView1.Rows[1].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitWeight);
            //            this.dataGridView1.Rows[2].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitProfileStealth);
            //            this.dataGridView1.Rows[3].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitSpotting);
            //            this.dataGridView1.Rows[4].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitMoveSpeed);
            //            this.dataGridView1.Rows[5].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitMoveRange);
            //            this.dataGridView1.Rows[6].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitFuelCapacity);
            //            this.dataGridView1.Rows[7].Cells[1].Value = this.m.ReadFloat(this.variableStore.UnitSuppliesCapacity);
            //            //Attack
            //            this.dataGridView1.Rows[8].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitFortAttack);
            //            this.dataGridView1.Rows[9].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitSoftAttack);
            //            this.dataGridView1.Rows[10].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitHardAttack);
            //            this.dataGridView1.Rows[11].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitCloseAttack);
            //            this.dataGridView1.Rows[12].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitCloseAirAttack);
            //            this.dataGridView1.Rows[13].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitMidairAttack);
            //            this.dataGridView1.Rows[14].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitHighairAttack);
            //            this.dataGridView1.Rows[15].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitSurfaceAttack);
            //
            //            //Defense
            //            this.dataGridView1.Rows[16].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitDefenseClose);
            //            this.dataGridView1.Rows[17].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitDefenseGround);
            //            this.dataGridView1.Rows[18].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitDefenseAir);
            //            this.dataGridView1.Rows[19].Cells[1].Value = this.m.Read2Byte(this.variableStore.UnitDefenseIndirect);


            //            decimal test = (decimal)this.m.ReadFloat("SupremeRulerUltimate.exe+0x00EE4898,0x7D18");
            decimal test = (decimal)this.m.ReadFloat(variableStore.OneDayBuild);

            // 1 Day Build
            if (this.checkedListBox1.GetItemChecked(0))
            {
                if (this.m.ReadFloat(variableStore.OneDayBuild) < 1)
                {
                    this.m.WriteMemory(variableStore.OneDayBuild, "float", "0.99");
                }
            }

            // 1 Day Army
            if (this.checkedListBox1.GetItemChecked(1))
            {
                this.m.WriteMemory(variableStore.OneDayArmy, "float", "0.1");
            }

            // 1 Day Research
            if (this.checkedListBox1.GetItemChecked(2))
            {
                this.m.WriteMemory(this.variableStore.OneDayResearchClick, "float", "1");
                this.m.WriteMemory(this.variableStore.OneDayResearchTooltip, "float", "1");
            }

            //Res Eff
            if (this.cbResearchEfficiency.Checked)
            {
                this.m.WriteMemory(
                    this.variableStore.ResearchEfficiency,
                    "float",
                    this.txtResearchEfficiency.DoubleValue.ToString());
            }
            else
            {
                this.txtResearchEfficiency.DoubleValue = this.m.ReadFloat(this.variableStore.ResearchEfficiency);
            }

            //Army Logic
            this.ArmyLogic();
            //            this.label4.Text = "Unit: " + this.m.ReadString(this.variableStore.ArmyUnitName);
            this.label4.Text = "Unit: " + this.m.ReadString(this.variableStore.UnitName);
            this.label5.Text = "Unit ID: " + this.m.ReadInt(this.variableStore.UnitID);

            //Domestic Finance
            this.DomesticFinance();

            //World Subsidy
            if (!this.radialSlider1.Capture)
            {
                this.radialSlider1.Value = (m.ReadFloat(this.variableStore.DomesticWorldMarketSubsidyRate) / 1) * 100;
            }

            //World opinon
            if (this.trackBar2.Value <= 10)
            {
                this.autoLabel6.Text = "(Outraged)";
            }
            if (this.trackBar2.Value >= 20 && this.trackBar2.Value < 30)
            {
                this.autoLabel6.Text = "(Dissaproving)";
            }
            if (this.trackBar2.Value >= 30 && this.trackBar2.Value < 40)
            {
                this.autoLabel6.Text = "(Concerned)";
            }
            if (this.trackBar2.Value >= 40 && this.trackBar2.Value < 50)
            {
                this.autoLabel6.Text = "(Indifferent)";
            }
            if (this.trackBar2.Value >= 50 && this.trackBar2.Value < 60)
            {
                this.autoLabel6.Text = "(Satisfied)";
            }
            if (this.trackBar2.Value >= 60 && this.trackBar2.Value < 70)
            {
                this.autoLabel6.Text = "(Pleased)";
            }
            if (this.trackBar2.Value > 70)
            {
                this.autoLabel6.Text = "(Delighted)";
            }
            if (!this.trackBar2.Capture)
            {
                var worldMarketOpinionValue = (this.m.ReadFloat(this.variableStore.DomesticWorldMarketOpinion) / 1) * 100;
                this.trackBar2.Value = (int)worldMarketOpinionValue;
            }

            //Sattelite
            this.Satellite();
        }