2024-03-29 00:19:36 -07:00
|
|
|
|
using System;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
using System.Drawing;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
using System.Windows.Forms;
|
2024-04-05 21:50:39 -07:00
|
|
|
|
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Button;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
|
|
|
|
|
namespace app
|
|
|
|
|
{
|
|
|
|
|
public partial class FormSettings : Form
|
|
|
|
|
{
|
|
|
|
|
Form1 Form1_0;
|
|
|
|
|
|
|
|
|
|
public FormSettings(Form1 form1_1)
|
|
|
|
|
{
|
|
|
|
|
Form1_0 = form1_1;
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
2024-03-30 00:16:39 -07:00
|
|
|
|
listViewRush.Visible = false;
|
2024-04-23 15:59:13 -07:00
|
|
|
|
listViewRush.Location = new System.Drawing.Point(listViewRunScripts.Location.X, listViewRunScripts.Location.Y);
|
|
|
|
|
|
|
|
|
|
panelBaalFeature.Visible = false;
|
|
|
|
|
panelBaalFeature.Location = new System.Drawing.Point(23, 197);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
2024-03-29 00:19:36 -07:00
|
|
|
|
LoadSettings();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void LoadSettings()
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
checkBoxShowOverlay.Checked = CharConfig.ShowOverlay;
|
|
|
|
|
|
2024-03-29 00:19:36 -07:00
|
|
|
|
textBoxD2Path.Text = Form1_0.D2_LOD_113C_Path;
|
|
|
|
|
numericUpDownMaxTime.Value = CharConfig.MaxGameTime;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
checkBoxRush.Checked = CharConfig.IsRushing;
|
|
|
|
|
textBox1LeechName.Text = CharConfig.RushLeecherName;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
|
2024-04-22 17:48:19 -07:00
|
|
|
|
textBoxStartKey.Text = CharConfig.StartStopKey.ToString();
|
|
|
|
|
|
|
|
|
|
int CurrI = 0;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunMapHackOnly;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunItemGrabScriptOnly;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunCowsScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunCountessScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunAndarielScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunSummonerScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunDurielScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunLowerKurastScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunTravincalScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunMephistoScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunChaosScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunChaosLeechScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunEldritchScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunShenkScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunPindleskinScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunNihlatakScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunBaalScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunBaalLeechScript;
|
|
|
|
|
listViewRunScripts.Items[CurrI++].Checked = CharConfig.RunWPTaker;
|
|
|
|
|
|
|
|
|
|
CurrI = 0;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunDarkWoodRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunTristramRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunAndarielRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunRadamentRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunHallOfDeadRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunFarOasisRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunLostCityRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunSummonerRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunDurielRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunKahlimEyeRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunKahlimBrainRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunKahlimHeartRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunTravincalRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunMephistoRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunChaosRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunAncientsRush;
|
|
|
|
|
listViewRush.Items[CurrI++].Checked = CharConfig.RunBaalRush;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
|
|
|
|
|
if (CharConfig.RunGameMakerScript) comboBoxLobby.SelectedIndex = 0;
|
|
|
|
|
if (CharConfig.RunChaosSearchGameScript) comboBoxLobby.SelectedIndex = 1;
|
|
|
|
|
if (CharConfig.RunBaalSearchGameScript) comboBoxLobby.SelectedIndex = 2;
|
|
|
|
|
|
|
|
|
|
textBoxGameName.Text = CharConfig.GameName;
|
|
|
|
|
textBoxGamePass.Text = CharConfig.GamePass;
|
|
|
|
|
|
|
|
|
|
comboBoxDifficulty.SelectedIndex = CharConfig.GameDifficulty;
|
|
|
|
|
|
|
|
|
|
numericUpDownRunNumber.Value = Form1_0.CurrentGameNumber;
|
|
|
|
|
|
2024-04-23 15:59:13 -07:00
|
|
|
|
//###################
|
|
|
|
|
checkBoxKillBaal.Checked = Form1_0.Baal_0.KillBaal;
|
2024-04-23 18:34:11 -07:00
|
|
|
|
checkBoxBaalSafeHealing.Checked = Form1_0.Baal_0.SafeYoloStrat;
|
2024-04-23 15:59:13 -07:00
|
|
|
|
numericUpDownBaalLeaveMobsCount.Value = Form1_0.Baal_0.LeaveIfMobsCountIsAbove;
|
|
|
|
|
for (int i = 0; i < Form1_0.Baal_0.LeaveIfMobsIsPresent_ID.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
string[] arr = new string[2];
|
|
|
|
|
arr[0] = Form1_0.Baal_0.LeaveIfMobsIsPresent_ID[i].ToString();
|
|
|
|
|
arr[1] = Form1_0.Baal_0.LeaveIfMobsIsPresent_Count[i].ToString();
|
|
|
|
|
ListViewItem item = new ListViewItem(arr);
|
|
|
|
|
|
|
|
|
|
listViewBaalLeaveOnMobs.Items.Add(item);
|
|
|
|
|
}
|
|
|
|
|
//###################
|
|
|
|
|
|
2024-03-29 00:19:36 -07:00
|
|
|
|
SetCreateGameGroupbox();
|
2024-03-30 00:16:39 -07:00
|
|
|
|
SetRushMenu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetRushMenu()
|
|
|
|
|
{
|
|
|
|
|
if (checkBoxRush.Checked)
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
groupBox1.Enabled = false;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
comboBoxLobby.Enabled = false;
|
|
|
|
|
listViewRunScripts.Visible = false;
|
|
|
|
|
|
|
|
|
|
label1Run.Text = "Select Rush Scripts";
|
|
|
|
|
|
|
|
|
|
textBox1LeechName.Visible = true;
|
|
|
|
|
label1LeechName.Visible = true;
|
|
|
|
|
|
|
|
|
|
label7MaxTime.Visible = false;
|
|
|
|
|
numericUpDownMaxTime.Visible = false;
|
|
|
|
|
|
|
|
|
|
listViewRush.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
groupBox1.Enabled = true;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
comboBoxLobby.Enabled = true;
|
|
|
|
|
listViewRunScripts.Visible = true;
|
|
|
|
|
|
|
|
|
|
label1Run.Text = "Select Run Scripts";
|
|
|
|
|
|
|
|
|
|
textBox1LeechName.Visible = false;
|
|
|
|
|
label1LeechName.Visible = false;
|
|
|
|
|
|
|
|
|
|
label7MaxTime.Visible = true;
|
|
|
|
|
numericUpDownMaxTime.Visible = true;
|
|
|
|
|
|
|
|
|
|
listViewRush.Visible = false;
|
|
|
|
|
}
|
2024-03-29 00:19:36 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetCreateGameGroupbox()
|
|
|
|
|
{
|
2024-03-30 00:16:39 -07:00
|
|
|
|
if (!checkBoxRush.Checked) groupBox1.Enabled = (comboBoxLobby.SelectedIndex == 0);
|
|
|
|
|
else groupBox1.Enabled = false;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SaveSettings()
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
CharConfig.ShowOverlay = checkBoxShowOverlay.Checked;
|
|
|
|
|
|
2024-03-29 00:19:36 -07:00
|
|
|
|
Form1_0.D2_LOD_113C_Path = textBoxD2Path.Text;
|
|
|
|
|
CharConfig.MaxGameTime = (int) numericUpDownMaxTime.Value;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
CharConfig.IsRushing = checkBoxRush.Checked;
|
|
|
|
|
CharConfig.RushLeecherName = textBox1LeechName.Text;
|
2024-04-22 17:48:19 -07:00
|
|
|
|
Enum.TryParse(textBoxStartKey.Text, out CharConfig.StartStopKey);
|
|
|
|
|
|
|
|
|
|
int CurrI = 0;
|
|
|
|
|
CharConfig.RunMapHackOnly = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunItemGrabScriptOnly = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunCowsScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunCountessScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunAndarielScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunSummonerScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunDurielScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunLowerKurastScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunTravincalScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunMephistoScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunChaosScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunChaosLeechScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunEldritchScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunShenkScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunPindleskinScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunNihlatakScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunBaalScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunBaalLeechScript = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunWPTaker = listViewRunScripts.Items[CurrI++].Checked;
|
|
|
|
|
|
|
|
|
|
CurrI = 0;
|
|
|
|
|
CharConfig.RunDarkWoodRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunTristramRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunAndarielRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunRadamentRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunHallOfDeadRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunFarOasisRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunLostCityRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunSummonerRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunDurielRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunKahlimEyeRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunKahlimBrainRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunKahlimHeartRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunTravincalRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunMephistoRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunChaosRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunAncientsRush = listViewRush.Items[CurrI++].Checked;
|
|
|
|
|
CharConfig.RunBaalRush = listViewRush.Items[CurrI++].Checked;
|
2024-03-29 00:19:36 -07:00
|
|
|
|
|
|
|
|
|
CharConfig.RunGameMakerScript = (comboBoxLobby.SelectedIndex == 0);
|
|
|
|
|
CharConfig.RunChaosSearchGameScript = (comboBoxLobby.SelectedIndex == 1);
|
|
|
|
|
CharConfig.RunBaalSearchGameScript = (comboBoxLobby.SelectedIndex == 2);
|
|
|
|
|
|
|
|
|
|
CharConfig.GameName = textBoxGameName.Text;
|
|
|
|
|
CharConfig.GamePass = textBoxGamePass.Text;
|
|
|
|
|
|
|
|
|
|
CharConfig.GameDifficulty = comboBoxDifficulty.SelectedIndex;
|
|
|
|
|
|
|
|
|
|
Form1_0.CurrentGameNumber = (int) numericUpDownRunNumber.Value;
|
2024-04-23 15:59:13 -07:00
|
|
|
|
|
|
|
|
|
//###################
|
|
|
|
|
Form1_0.Baal_0.KillBaal = checkBoxKillBaal.Checked;
|
2024-04-23 18:34:11 -07:00
|
|
|
|
Form1_0.Baal_0.SafeYoloStrat = checkBoxBaalSafeHealing.Checked;
|
2024-04-23 15:59:13 -07:00
|
|
|
|
Form1_0.Baal_0.LeaveIfMobsCountIsAbove = (int) numericUpDownBaalLeaveMobsCount.Value;
|
|
|
|
|
Form1_0.Baal_0.LeaveIfMobsIsPresent_ID.Clear();
|
|
|
|
|
Form1_0.Baal_0.LeaveIfMobsIsPresent_Count.Clear();
|
|
|
|
|
for (int i = 0; i < listViewBaalLeaveOnMobs.Items.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
Form1_0.Baal_0.LeaveIfMobsIsPresent_ID.Add(uint.Parse(listViewBaalLeaveOnMobs.Items[i].SubItems[0].Text));
|
|
|
|
|
Form1_0.Baal_0.LeaveIfMobsIsPresent_Count.Add(int.Parse(listViewBaalLeaveOnMobs.Items[i].SubItems[1].Text));
|
|
|
|
|
}
|
|
|
|
|
//###################
|
2024-03-29 00:19:36 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
numericUpDownRunNumber.Value = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void FormSettings_FormClosing(object sender, FormClosingEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SaveSettings();
|
|
|
|
|
Form1_0.SettingsLoader_0.SaveCurrentSettings();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void comboBoxLobby_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SetCreateGameGroupbox();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void listViewRunScripts_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
|
|
|
|
private void FormSettings_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkBoxRush_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SetRushMenu();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void button2_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2024-04-18 18:51:45 -07:00
|
|
|
|
//FormCharSettings FormCharSettings_0 = new FormCharSettings(Form1_0);
|
|
|
|
|
//FormCharSettings_0.ShowDialog();
|
|
|
|
|
|
|
|
|
|
SaveSettings();
|
|
|
|
|
Form1_0.SettingsLoader_0.SaveCurrentSettings();
|
2024-03-30 00:16:39 -07:00
|
|
|
|
}
|
2024-04-23 15:59:13 -07:00
|
|
|
|
|
|
|
|
|
private void listViewRunScripts_DoubleClick(object sender, EventArgs e)
|
|
|
|
|
{
|
2024-04-23 18:34:11 -07:00
|
|
|
|
listViewRunScripts.SelectedItems[0].Checked = !listViewRunScripts.SelectedItems[0].Checked;
|
2024-04-23 15:59:13 -07:00
|
|
|
|
if (listViewRunScripts.SelectedItems[0].Text == "Baal")
|
|
|
|
|
{
|
|
|
|
|
Form1_0.Baal_0.KillBaal = checkBoxKillBaal.Checked = Form1_0.Baal_0.KillBaal;
|
|
|
|
|
|
|
|
|
|
panelBaalFeature.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("No specials features exist for this run!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonBaalApply_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Form1_0.Baal_0.KillBaal = checkBoxKillBaal.Checked;
|
|
|
|
|
panelBaalFeature.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void label10_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonBaalAddMob_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
string[] arr = new string[2];
|
|
|
|
|
arr[0] = numericUpDownBaalMobID.Value.ToString();
|
|
|
|
|
arr[1] = numericUpDownBaalMobCount.Value.ToString();
|
|
|
|
|
ListViewItem item = new ListViewItem(arr);
|
|
|
|
|
|
|
|
|
|
listViewBaalLeaveOnMobs.Items.Add(item);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void buttonBaalClearMob_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
listViewBaalLeaveOnMobs.Items.Clear();
|
|
|
|
|
}
|
2024-03-29 00:19:36 -07:00
|
|
|
|
}
|
|
|
|
|
}
|