From d980beee42819a72e5a1b65f579d9c1e1cdbbc0c Mon Sep 17 00:00:00 2001 From: MichiS97 Date: Wed, 17 May 2017 15:03:56 +0200 Subject: [PATCH] Reset number label + quicker fleeing from REs when soaring Adds a little text box showing the current number of soft resets when using a bot. Also makes the soaring bot flee from random encounters a little quicker --- PKMN-NTR/Bot/Bot_SoftReset6.cs | 3 +- PKMN-NTR/MainForm.Designer.cs | 60 ++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 19 deletions(-) diff --git a/PKMN-NTR/Bot/Bot_SoftReset6.cs b/PKMN-NTR/Bot/Bot_SoftReset6.cs index 0ef403b..4b77d82 100644 --- a/PKMN-NTR/Bot/Bot_SoftReset6.cs +++ b/PKMN-NTR/Bot/Bot_SoftReset6.cs @@ -636,6 +636,7 @@ public async void RunBot() case srbotstates.softreset: resetNo++; Report("Bot: Sof-reset #" + resetNo.ToString()); + Program.gCmdWindow.resetNoBox.Text = resetNo.ToString(); waitTaskbool = Program.helper.waitSoftReset(); if (await waitTaskbool) { @@ -867,7 +868,7 @@ public async void RunBot() case srbotstates.flee1: Report("Bot: Fleeing from random encounter, pressing down"); - await Task.Delay(30 * commanddelay); + await Task.Delay(20 * commanddelay); //30? waitTaskbool = Program.helper.waitbutton(LookupTable.DpadDOWN); if (await waitTaskbool) { diff --git a/PKMN-NTR/MainForm.Designer.cs b/PKMN-NTR/MainForm.Designer.cs index 9a125ae..1bf6d2c 100644 --- a/PKMN-NTR/MainForm.Designer.cs +++ b/PKMN-NTR/MainForm.Designer.cs @@ -316,8 +316,9 @@ private void InitializeComponent() this.Tools_Breeding = new System.Windows.Forms.Button(); this.Tools_SoftReset = new System.Windows.Forms.Button(); this.Tools_WonderTrade = new System.Windows.Forms.Button(); - this.Tools_Filter = new System.Windows.Forms.Button(); + this.Tool_Script = new System.Windows.Forms.Button(); this.Tools_PokeDigger = new System.Windows.Forms.Button(); + this.Tools_Filter = new System.Windows.Forms.Button(); this.Tab_Log = new System.Windows.Forms.TabPage(); this.Log_Export = new System.Windows.Forms.Button(); this.Tab_About = new System.Windows.Forms.TabPage(); @@ -344,7 +345,8 @@ private void InitializeComponent() this.PB_Legal = new System.Windows.Forms.PictureBox(); this.dragout = new System.Windows.Forms.PictureBox(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.Tool_Script = new System.Windows.Forms.Button(); + this.labelreset = new System.Windows.Forms.Label(); + this.resetNoBox = new System.Windows.Forms.TextBox(); this.groupBox1.SuspendLayout(); this.flowLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.slotDump)).BeginInit(); @@ -4078,15 +4080,15 @@ private void InitializeComponent() this.Tools_WonderTrade.UseVisualStyleBackColor = true; this.Tools_WonderTrade.Click += new System.EventHandler(this.Tools_WonderTrade_Click); // - // Tools_Filter + // Tool_Script // - this.Tools_Filter.Location = new System.Drawing.Point(193, 61); - this.Tools_Filter.Name = "Tools_Filter"; - this.Tools_Filter.Size = new System.Drawing.Size(89, 23); - this.Tools_Filter.TabIndex = 6; - this.Tools_Filter.Text = "Filters"; - this.Tools_Filter.UseVisualStyleBackColor = true; - this.Tools_Filter.Click += new System.EventHandler(this.Tools_Filter_Click); + this.Tool_Script.Location = new System.Drawing.Point(3, 61); + this.Tool_Script.Name = "Tool_Script"; + this.Tool_Script.Size = new System.Drawing.Size(89, 23); + this.Tool_Script.TabIndex = 7; + this.Tool_Script.Text = "Script Builder"; + this.Tool_Script.UseVisualStyleBackColor = true; + this.Tool_Script.Click += new System.EventHandler(this.Tool_Script_Click); // // Tools_PokeDigger // @@ -4098,6 +4100,16 @@ private void InitializeComponent() this.Tools_PokeDigger.UseVisualStyleBackColor = true; this.Tools_PokeDigger.Click += new System.EventHandler(this.Tools_PokeDigger_Click); // + // Tools_Filter + // + this.Tools_Filter.Location = new System.Drawing.Point(193, 61); + this.Tools_Filter.Name = "Tools_Filter"; + this.Tools_Filter.Size = new System.Drawing.Size(89, 23); + this.Tools_Filter.TabIndex = 6; + this.Tools_Filter.Text = "Filters"; + this.Tools_Filter.UseVisualStyleBackColor = true; + this.Tools_Filter.Click += new System.EventHandler(this.Tools_Filter_Click); + // // Tab_Log // this.Tab_Log.BackColor = System.Drawing.SystemColors.Control; @@ -4401,15 +4413,22 @@ private void InitializeComponent() this.dragout.MouseDown += new System.Windows.Forms.MouseEventHandler(this.dragout_MouseDown); this.dragout.MouseHover += new System.EventHandler(this.dragoutHover); // - // Tool_Script + // labelreset // - this.Tool_Script.Location = new System.Drawing.Point(3, 61); - this.Tool_Script.Name = "Tool_Script"; - this.Tool_Script.Size = new System.Drawing.Size(89, 23); - this.Tool_Script.TabIndex = 7; - this.Tool_Script.Text = "Script Builder"; - this.Tool_Script.UseVisualStyleBackColor = true; - this.Tool_Script.Click += new System.EventHandler(this.Tool_Script_Click); + this.labelreset.AutoSize = true; + this.labelreset.Location = new System.Drawing.Point(322, 12); + this.labelreset.Name = "labelreset"; + this.labelreset.Size = new System.Drawing.Size(93, 13); + this.labelreset.TabIndex = 103; + this.labelreset.Text = "Number of resets: "; + // + // resetNoBox + // + this.resetNoBox.Location = new System.Drawing.Point(421, 9); + this.resetNoBox.Name = "resetNoBox"; + this.resetNoBox.ReadOnly = true; + this.resetNoBox.Size = new System.Drawing.Size(47, 20); + this.resetNoBox.TabIndex = 104; // // MainForm // @@ -4418,6 +4437,8 @@ private void InitializeComponent() this.AutoSize = true; this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.ClientSize = new System.Drawing.Size(613, 368); + this.Controls.Add(this.resetNoBox); + this.Controls.Add(this.labelreset); this.Controls.Add(this.Tabs_General); this.Controls.Add(this.PB_Legal); this.Controls.Add(this.groupBox1); @@ -4582,6 +4603,7 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.PB_Legal)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dragout)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -4914,6 +4936,8 @@ private void InitializeComponent() private System.Windows.Forms.Button Btn_ReloadFields; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button Tool_Script; + private System.Windows.Forms.Label labelreset; + public System.Windows.Forms.TextBox resetNoBox; } }