diff --git a/Corvus/Corvus.csproj b/Corvus/Corvus.csproj
index 37ba0fa..1672795 100644
--- a/Corvus/Corvus.csproj
+++ b/Corvus/Corvus.csproj
@@ -117,7 +117,6 @@
Designer
-
SettingsSingleFileGenerator
Settings.Designer.cs
diff --git a/Corvus/FrmMain.Designer.cs b/Corvus/FrmMain.Designer.cs
index bd86bc2..37e1302 100644
--- a/Corvus/FrmMain.Designer.cs
+++ b/Corvus/FrmMain.Designer.cs
@@ -58,6 +58,9 @@ private void InitializeComponent()
this.txtServer = new System.Windows.Forms.TextBox();
this.lblServer = new System.Windows.Forms.Label();
this.tabPageGalaxyGates = new System.Windows.Forms.TabPage();
+ this.chkBoxMultiplierInt = new System.Windows.Forms.CheckBox();
+ this.lblMultiplier = new System.Windows.Forms.Label();
+ this.comboBoxMultiplier = new System.Windows.Forms.ComboBox();
this.lblWaitGate = new System.Windows.Forms.Label();
this.nudGateWait = new System.Windows.Forms.NumericUpDown();
this.comboBoxOptionABG = new System.Windows.Forms.ComboBox();
@@ -129,8 +132,6 @@ private void InitializeComponent()
this.lblLastStatus = new System.Windows.Forms.Label();
this.cmdSaveSettings = new System.Windows.Forms.Button();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
- this.comboBoxMultiplier = new System.Windows.Forms.ComboBox();
- this.lblMultiplier = new System.Windows.Forms.Label();
this.tcMain.SuspendLayout();
this.tabPageLogin.SuspendLayout();
this.gBoxGeneralSettings.SuspendLayout();
@@ -160,7 +161,7 @@ private void InitializeComponent()
this.tcMain.Location = new System.Drawing.Point(13, 39);
this.tcMain.Name = "tcMain";
this.tcMain.SelectedIndex = 0;
- this.tcMain.Size = new System.Drawing.Size(775, 386);
+ this.tcMain.Size = new System.Drawing.Size(775, 398);
this.tcMain.TabIndex = 0;
//
// tabPageLogin
@@ -171,7 +172,7 @@ private void InitializeComponent()
this.tabPageLogin.Controls.Add(this.gBoxSessionIDLogin);
this.tabPageLogin.Location = new System.Drawing.Point(4, 22);
this.tabPageLogin.Name = "tabPageLogin";
- this.tabPageLogin.Size = new System.Drawing.Size(767, 360);
+ this.tabPageLogin.Size = new System.Drawing.Size(767, 372);
this.tabPageLogin.TabIndex = 0;
this.tabPageLogin.Text = "Login";
this.tabPageLogin.UseVisualStyleBackColor = true;
@@ -418,6 +419,7 @@ private void InitializeComponent()
//
// tabPageGalaxyGates
//
+ this.tabPageGalaxyGates.Controls.Add(this.chkBoxMultiplierInt);
this.tabPageGalaxyGates.Controls.Add(this.lblMultiplier);
this.tabPageGalaxyGates.Controls.Add(this.comboBoxMultiplier);
this.tabPageGalaxyGates.Controls.Add(this.lblWaitGate);
@@ -460,11 +462,51 @@ private void InitializeComponent()
this.tabPageGalaxyGates.Controls.Add(this.rbBuildABG);
this.tabPageGalaxyGates.Location = new System.Drawing.Point(4, 22);
this.tabPageGalaxyGates.Name = "tabPageGalaxyGates";
- this.tabPageGalaxyGates.Size = new System.Drawing.Size(767, 360);
+ this.tabPageGalaxyGates.Size = new System.Drawing.Size(767, 372);
this.tabPageGalaxyGates.TabIndex = 1;
this.tabPageGalaxyGates.Text = "Galaxy Gates";
this.tabPageGalaxyGates.UseVisualStyleBackColor = true;
//
+ // chkBoxMultiplierInt
+ //
+ this.chkBoxMultiplierInt.AutoSize = true;
+ this.chkBoxMultiplierInt.Checked = true;
+ this.chkBoxMultiplierInt.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.chkBoxMultiplierInt.Location = new System.Drawing.Point(20, 82);
+ this.chkBoxMultiplierInt.Name = "chkBoxMultiplierInt";
+ this.chkBoxMultiplierInt.Size = new System.Drawing.Size(121, 17);
+ this.chkBoxMultiplierInt.TabIndex = 47;
+ this.chkBoxMultiplierInt.Text = "Multiplier intelligently";
+ this.chkBoxMultiplierInt.UseVisualStyleBackColor = true;
+ this.chkBoxMultiplierInt.CheckedChanged += new System.EventHandler(this.ChkBoxMultiplierInt_CheckedChanged);
+ //
+ // lblMultiplier
+ //
+ this.lblMultiplier.AutoSize = true;
+ this.lblMultiplier.Location = new System.Drawing.Point(17, 106);
+ this.lblMultiplier.Name = "lblMultiplier";
+ this.lblMultiplier.Size = new System.Drawing.Size(51, 13);
+ this.lblMultiplier.TabIndex = 46;
+ this.lblMultiplier.Text = "Multiplier:";
+ //
+ // comboBoxMultiplier
+ //
+ this.comboBoxMultiplier.AllowDrop = true;
+ this.comboBoxMultiplier.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.comboBoxMultiplier.DropDownWidth = 66;
+ this.comboBoxMultiplier.FormattingEnabled = true;
+ this.comboBoxMultiplier.IntegralHeight = false;
+ this.comboBoxMultiplier.Items.AddRange(new object[] {
+ "x2",
+ "x3",
+ "x4",
+ "x5",
+ "x6"});
+ this.comboBoxMultiplier.Location = new System.Drawing.Point(73, 102);
+ this.comboBoxMultiplier.Name = "comboBoxMultiplier";
+ this.comboBoxMultiplier.Size = new System.Drawing.Size(66, 21);
+ this.comboBoxMultiplier.TabIndex = 45;
+ //
// lblWaitGate
//
this.lblWaitGate.AutoSize = true;
@@ -510,7 +552,7 @@ private void InitializeComponent()
"3. It should just stop when the gamma portal is 2/2",
"4. It should just stop when any of the 3 portals is 2/2",
"5. It should just stop when the 3 portals are 2/2"});
- this.comboBoxOptionABG.Location = new System.Drawing.Point(73, 177);
+ this.comboBoxOptionABG.Location = new System.Drawing.Point(73, 189);
this.comboBoxOptionABG.Name = "comboBoxOptionABG";
this.comboBoxOptionABG.Size = new System.Drawing.Size(69, 21);
this.comboBoxOptionABG.TabIndex = 42;
@@ -519,7 +561,7 @@ private void InitializeComponent()
//
this.lblGates.AutoSize = true;
this.lblGates.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.lblGates.Location = new System.Drawing.Point(17, 154);
+ this.lblGates.Location = new System.Drawing.Point(17, 166);
this.lblGates.Name = "lblGates";
this.lblGates.Size = new System.Drawing.Size(50, 17);
this.lblGates.TabIndex = 39;
@@ -562,7 +604,7 @@ private void InitializeComponent()
0,
0,
0});
- this.nudMinimumUridium.Location = new System.Drawing.Point(81, 134);
+ this.nudMinimumUridium.Location = new System.Drawing.Point(81, 145);
this.nudMinimumUridium.Maximum = new decimal(new int[] {
100000,
0,
@@ -580,7 +622,7 @@ private void InitializeComponent()
// lblMinimumUridium
//
this.lblMinimumUridium.AutoSize = true;
- this.lblMinimumUridium.Location = new System.Drawing.Point(17, 137);
+ this.lblMinimumUridium.Location = new System.Drawing.Point(17, 148);
this.lblMinimumUridium.Name = "lblMinimumUridium";
this.lblMinimumUridium.Size = new System.Drawing.Size(63, 13);
this.lblMinimumUridium.TabIndex = 30;
@@ -589,7 +631,7 @@ private void InitializeComponent()
// chkBoxPlaceGate
//
this.chkBoxPlaceGate.AutoSize = true;
- this.chkBoxPlaceGate.Location = new System.Drawing.Point(20, 112);
+ this.chkBoxPlaceGate.Location = new System.Drawing.Point(20, 126);
this.chkBoxPlaceGate.Name = "chkBoxPlaceGate";
this.chkBoxPlaceGate.Size = new System.Drawing.Size(115, 17);
this.chkBoxPlaceGate.TabIndex = 29;
@@ -847,7 +889,7 @@ private void InitializeComponent()
// rbBuildKuiper
//
this.rbBuildKuiper.AutoSize = true;
- this.rbBuildKuiper.Location = new System.Drawing.Point(20, 340);
+ this.rbBuildKuiper.Location = new System.Drawing.Point(20, 352);
this.rbBuildKuiper.Name = "rbBuildKuiper";
this.rbBuildKuiper.Size = new System.Drawing.Size(55, 17);
this.rbBuildKuiper.TabIndex = 8;
@@ -857,7 +899,7 @@ private void InitializeComponent()
// rbBuildHades
//
this.rbBuildHades.AutoSize = true;
- this.rbBuildHades.Location = new System.Drawing.Point(20, 317);
+ this.rbBuildHades.Location = new System.Drawing.Point(20, 329);
this.rbBuildHades.Name = "rbBuildHades";
this.rbBuildHades.Size = new System.Drawing.Size(56, 17);
this.rbBuildHades.TabIndex = 7;
@@ -867,7 +909,7 @@ private void InitializeComponent()
// rbBuildKappa
//
this.rbBuildKappa.AutoSize = true;
- this.rbBuildKappa.Location = new System.Drawing.Point(20, 271);
+ this.rbBuildKappa.Location = new System.Drawing.Point(20, 283);
this.rbBuildKappa.Name = "rbBuildKappa";
this.rbBuildKappa.Size = new System.Drawing.Size(56, 17);
this.rbBuildKappa.TabIndex = 6;
@@ -877,7 +919,7 @@ private void InitializeComponent()
// rbBuildLambda
//
this.rbBuildLambda.AutoSize = true;
- this.rbBuildLambda.Location = new System.Drawing.Point(20, 294);
+ this.rbBuildLambda.Location = new System.Drawing.Point(20, 306);
this.rbBuildLambda.Name = "rbBuildLambda";
this.rbBuildLambda.Size = new System.Drawing.Size(63, 17);
this.rbBuildLambda.TabIndex = 5;
@@ -887,7 +929,7 @@ private void InitializeComponent()
// rbBuildZeta
//
this.rbBuildZeta.AutoSize = true;
- this.rbBuildZeta.Location = new System.Drawing.Point(20, 248);
+ this.rbBuildZeta.Location = new System.Drawing.Point(20, 260);
this.rbBuildZeta.Name = "rbBuildZeta";
this.rbBuildZeta.Size = new System.Drawing.Size(47, 17);
this.rbBuildZeta.TabIndex = 4;
@@ -897,7 +939,7 @@ private void InitializeComponent()
// rbBuildEpsilon
//
this.rbBuildEpsilon.AutoSize = true;
- this.rbBuildEpsilon.Location = new System.Drawing.Point(20, 225);
+ this.rbBuildEpsilon.Location = new System.Drawing.Point(20, 237);
this.rbBuildEpsilon.Name = "rbBuildEpsilon";
this.rbBuildEpsilon.Size = new System.Drawing.Size(59, 17);
this.rbBuildEpsilon.TabIndex = 3;
@@ -907,7 +949,7 @@ private void InitializeComponent()
// rbBuildDelta
//
this.rbBuildDelta.AutoSize = true;
- this.rbBuildDelta.Location = new System.Drawing.Point(20, 202);
+ this.rbBuildDelta.Location = new System.Drawing.Point(20, 214);
this.rbBuildDelta.Name = "rbBuildDelta";
this.rbBuildDelta.Size = new System.Drawing.Size(50, 17);
this.rbBuildDelta.TabIndex = 2;
@@ -918,13 +960,14 @@ private void InitializeComponent()
//
this.rbBuildABG.AutoSize = true;
this.rbBuildABG.Checked = true;
- this.rbBuildABG.Location = new System.Drawing.Point(20, 179);
+ this.rbBuildABG.Location = new System.Drawing.Point(20, 191);
this.rbBuildABG.Name = "rbBuildABG";
this.rbBuildABG.Size = new System.Drawing.Size(47, 17);
this.rbBuildABG.TabIndex = 33;
this.rbBuildABG.TabStop = true;
this.rbBuildABG.Text = "ABG";
this.rbBuildABG.UseVisualStyleBackColor = true;
+ this.rbBuildABG.CheckedChanged += new System.EventHandler(this.RbBuildABG_CheckedChanged);
//
// tabPageTechFactory
//
@@ -934,7 +977,7 @@ private void InitializeComponent()
this.tabPageTechFactory.Controls.Add(this.dgvTechFactory);
this.tabPageTechFactory.Location = new System.Drawing.Point(4, 22);
this.tabPageTechFactory.Name = "tabPageTechFactory";
- this.tabPageTechFactory.Size = new System.Drawing.Size(767, 360);
+ this.tabPageTechFactory.Size = new System.Drawing.Size(767, 372);
this.tabPageTechFactory.TabIndex = 2;
this.tabPageTechFactory.Text = "Tech Factory";
this.tabPageTechFactory.UseVisualStyleBackColor = true;
@@ -1055,7 +1098,7 @@ private void InitializeComponent()
this.tabPageSkylab.Controls.Add(this.dgvSkylab);
this.tabPageSkylab.Location = new System.Drawing.Point(4, 22);
this.tabPageSkylab.Name = "tabPageSkylab";
- this.tabPageSkylab.Size = new System.Drawing.Size(767, 360);
+ this.tabPageSkylab.Size = new System.Drawing.Size(767, 372);
this.tabPageSkylab.TabIndex = 3;
this.tabPageSkylab.Text = "Skylab";
this.tabPageSkylab.UseVisualStyleBackColor = true;
@@ -1174,7 +1217,7 @@ private void InitializeComponent()
this.tabPageLog.Location = new System.Drawing.Point(4, 22);
this.tabPageLog.Name = "tabPageLog";
this.tabPageLog.Padding = new System.Windows.Forms.Padding(3);
- this.tabPageLog.Size = new System.Drawing.Size(767, 360);
+ this.tabPageLog.Size = new System.Drawing.Size(767, 372);
this.tabPageLog.TabIndex = 5;
this.tabPageLog.Text = "Log";
this.tabPageLog.UseVisualStyleBackColor = true;
@@ -1243,38 +1286,11 @@ private void InitializeComponent()
this.notifyIcon1.Text = "Corvus - DarkOrbit Bot Helper";
this.notifyIcon1.Visible = true;
//
- // comboBoxMultiplier
- //
- this.comboBoxMultiplier.AllowDrop = true;
- this.comboBoxMultiplier.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxMultiplier.DropDownWidth = 253;
- this.comboBoxMultiplier.FormattingEnabled = true;
- this.comboBoxMultiplier.IntegralHeight = false;
- this.comboBoxMultiplier.Items.AddRange(new object[] {
- "x2",
- "x3",
- "x4",
- "x5",
- "x6"});
- this.comboBoxMultiplier.Location = new System.Drawing.Point(73, 85);
- this.comboBoxMultiplier.Name = "comboBoxMultiplier";
- this.comboBoxMultiplier.Size = new System.Drawing.Size(66, 21);
- this.comboBoxMultiplier.TabIndex = 45;
- //
- // lblMultiplier
- //
- this.lblMultiplier.AutoSize = true;
- this.lblMultiplier.Location = new System.Drawing.Point(17, 89);
- this.lblMultiplier.Name = "lblMultiplier";
- this.lblMultiplier.Size = new System.Drawing.Size(51, 13);
- this.lblMultiplier.TabIndex = 46;
- this.lblMultiplier.Text = "Multiplier:";
- //
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(801, 435);
+ this.ClientSize = new System.Drawing.Size(801, 449);
this.Controls.Add(this.cmdSaveSettings);
this.Controls.Add(this.lblLastStatus);
this.Controls.Add(this.cmdOpenBackPage);
@@ -1418,6 +1434,7 @@ private void InitializeComponent()
private Label label1;
private Label lblMultiplier;
private ComboBox comboBoxMultiplier;
+ private CheckBox chkBoxMultiplierInt;
}
}
diff --git a/Corvus/FrmMain.cs b/Corvus/FrmMain.cs
index 8b0d7a3..98454b9 100644
--- a/Corvus/FrmMain.cs
+++ b/Corvus/FrmMain.cs
@@ -107,6 +107,17 @@ public FrmMain()
comboBoxOptionABG.SelectedIndex = 0;
comboBoxMultiplier.SelectedIndex = 0;
+ if (chkBoxMultiplierInt.Checked)
+ {
+ lblMultiplier.Enabled = false;
+ comboBoxMultiplier.Enabled = false;
+ }
+ else
+ {
+ lblMultiplier.Enabled = true;
+ comboBoxMultiplier.Enabled = true;
+ }
+
_prometiumCollectorRow = dgvSkylab.Rows[dgvSkylab.Rows.Add("Prometium Collector", 0, false, "", false)];
_enduriumCollectorRow = dgvSkylab.Rows[dgvSkylab.Rows.Add("Endurium Collector", 0, false, "", false)];
_terbiumCollectorRow = dgvSkylab.Rows[dgvSkylab.Rows.Add("Terbium Collector", 0, false, "", false)];
@@ -921,17 +932,64 @@ private async Task ExecuteSpinAsync()
else
Log($"Spinning {GetSelectedGate().GetFullName()}...");
- var spin = await _account.SpinGateAsync(GetSelectedGate(), useMultiplier);
-
var multiplierinfo = _account.GateData.MultiplierInfo;
foreach (var mi in multiplierinfo.MultiplierInfo)
{
- if (mi.Mode.Contains(GetSelectedGate().GetFullName().ToLower()) && mi.Value != 0)
+ if (mi.Mode.Contains(GetSelectedGate().GetFullName().ToLower()))
{
- Log($"Getting multiplier: {mi.Value}");
+ if (chkBoxMultiplierInt.Checked) {
+ if (rbBuildABG.Checked)
+ {
+ if (2 <= mi.Value)
+ {
+ useMultiplier = use3MultiplierABG(
+ _account.GateData.Gates.Get(GalaxyGate.Alpha).Current,
+ _account.GateData.Gates.Get(GalaxyGate.Alpha).Total,
+ _account.GateData.Gates.Get(GalaxyGate.Beta).Current,
+ _account.GateData.Gates.Get(GalaxyGate.Beta).Total,
+ _account.GateData.Gates.Get(GalaxyGate.Beta).Current,
+ _account.GateData.Gates.Get(GalaxyGate.Beta).Total);
+ } else
+ {
+ useMultiplier = false;
+ }
+
+ }
+ else
+ {
+ if ((_account.GateData.Gates.Get(GetSelectedGate()).Total - _account.GateData.Gates.Get(GetSelectedGate()).Current) == 3)
+ {
+ if (2 <= mi.Value)
+ {
+ useMultiplier = true;
+ }
+ else
+ {
+ useMultiplier = false;
+ }
+ }
+ else
+ {
+ useMultiplier = false;
+ }
+ }
+ }
+ else
+ {
+ if (getMulplier() <= mi.Value)
+ {
+ useMultiplier = true;
+ }
+ else
+ {
+ useMultiplier = false;
+ }
+ }
}
}
+ var spin = await _account.SpinGateAsync(GetSelectedGate(), useMultiplier);
+
foreach (var allItem in spin.Items.GetAllItems())
{
if (allItem.Duplicate)
@@ -1317,9 +1375,11 @@ private void SaveSettings(bool confirm = false)
iniData["GeneralSettings"]["HideName"] = chkBoxHideName.Checked.ToString();
iniData["GalaxyGates"]["Spin"] = chkBoxSpinGate.Checked.ToString();
- iniData["GalaxyGates"]["Delay"] = nudGateDelay.Text;
iniData["GalaxyGates"]["Wait"] = nudGateWait.Text;
+ iniData["GalaxyGates"]["Delay"] = nudGateDelay.Text;
iniData["GalaxyGates"]["MinUridium"] = nudMinimumUridium.Text;
+ iniData["GalaxyGates"]["MultiplierInt"] = chkBoxMultiplierInt.Checked.ToString();
+ iniData["GalaxyGates"]["Multiplier"] = comboBoxMultiplier.SelectedIndex.ToString();
iniData["GalaxyGates"]["GetOptionABG"] = comboBoxOptionABG.SelectedIndex.ToString();
iniData["GalaxyGates"]["OnlyEE"] = chkSpinOnlyEE.Checked.ToString();
iniData["GalaxyGates"]["SelectedGate"] = GetSelectedGate().GetFullName();
@@ -1392,8 +1452,10 @@ private void LoadSettings()
chkBoxHideName.Checked = bool.Parse(iniData["GeneralSettings"]["HideName"]);
chkBoxSpinGate.Checked = bool.Parse(iniData["GalaxyGates"]["Spin"]);
- nudGateDelay.Value = decimal.Parse(iniData["GalaxyGates"]["Delay"]);
nudGateWait.Value = decimal.Parse(iniData["GalaxyGates"]["Wait"]);
+ nudGateDelay.Value = decimal.Parse(iniData["GalaxyGates"]["Delay"]);
+ chkBoxMultiplierInt.Checked = bool.Parse(iniData["GalaxyGates"]["MultiplierInt"]);
+ comboBoxMultiplier.SelectedIndex = int.Parse(iniData["GalaxyGates"]["Multiplier"]);
nudMinimumUridium.Value = decimal.Parse(iniData["GalaxyGates"]["MinUridium"]);
comboBoxOptionABG.SelectedIndex = int.Parse(iniData["GalaxyGates"]["GetOptionABG"]);
chkSpinOnlyEE.Checked = bool.Parse(iniData["GalaxyGates"]["OnlyEE"]);
@@ -1557,17 +1619,17 @@ private int getMulplier()
switch (GetSelecetedIndex_comboBoxMultiplier())
{
case 0:
- return 2;
+ return 1;
case 1:
- return 3;
+ return 2;
case 2:
- return 4;
+ return 3;
case 3:
- return 5;
+ return 4;
case 4:
- return 6;
+ return 5;
default:
- return 2;
+ return 1;
}
}
@@ -1600,5 +1662,39 @@ private void ChkBoxHideName_CheckedChanged(object sender, EventArgs e)
}
}
}
+
+ private void ChkBoxMultiplierInt_CheckedChanged(object sender, EventArgs e)
+ {
+ if (chkBoxMultiplierInt.Checked)
+ {
+ lblMultiplier.Enabled = false;
+ comboBoxMultiplier.Enabled = false;
+ }
+ else
+ {
+ lblMultiplier.Enabled = true;
+ comboBoxMultiplier.Enabled = true;
+ }
+ }
+
+ private void RbBuildABG_CheckedChanged(object sender, EventArgs e)
+ {
+ if (rbBuildABG.Checked)
+ {
+ comboBoxOptionABG.Enabled = true;
+ }
+ else
+ {
+ comboBoxOptionABG.Enabled = false;
+ }
+ }
+
+ private bool use3MultiplierABG(int a_curr, int a_max, int b_curr, int b_max, int g_curr, int g_max)
+ {
+ if (a_max - a_curr == 3) return b_curr <= b_max * 0.2 && g_curr <= g_max * 0.2;
+ if (b_max - b_curr == 3) return a_curr <= a_max * 0.2 && g_curr <= g_max * 0.2;
+ if (g_max - b_curr == 3) return a_curr <= a_max * 0.2 && b_curr <= b_max * 0.2;
+ return false;
+ }
}
}