Skip to content

Commit

Permalink
Lookup Table update, more GDInput autofill, Eggbot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveCookTU committed Dec 30, 2017
1 parent e12ef1e commit d3e25df
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 7 deletions.
10 changes: 9 additions & 1 deletion Ledybot/EggBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@ public class EggBot

private bool botstop = false;

public EggBot(int iP)
public EggBot(int iP, int game)
{
iPID = iP;
if(game == 0)
{
eggOff = 0x3313EDD8;
}
else if(game == 1)
{
eggOff = 0x3307B1E8;
}
}

public async Task RunBot()
Expand Down
58 changes: 58 additions & 0 deletions Ledybot/GDInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,64 @@ private void btn_BrowseDefault_Click(object sender, EventArgs e)
if (dg.ShowDialog() == DialogResult.OK)
{
tb_Default.Text = dg.FileName;
Program.pkhex.Data = System.IO.File.ReadAllBytes(dg.FileName);
nud_DexNumber.Value = Program.pkhex.Species;
int level = Program.PKTable.getLevel(Program.pkhex.Species, (int)Program.pkhex.EXP);
int gender = Program.pkhex.Gender;
if (level < 11)
{
cmb_Levels.SelectedIndex = 0;
}
else if (level < 21)
{
cmb_Levels.SelectedIndex = 1;
}
else if (level < 31)
{
cmb_Levels.SelectedIndex = 2;
}
else if (level < 41)
{
cmb_Levels.SelectedIndex = 3;
}
else if (level < 51)
{
cmb_Levels.SelectedIndex = 4;
}
else if (level < 61)
{
cmb_Levels.SelectedIndex = 5;
}
else if (level < 71)
{
cmb_Levels.SelectedIndex = 6;
}
else if (level < 81)
{
cmb_Levels.SelectedIndex = 7;
}
else if (level < 91)
{
cmb_Levels.SelectedIndex = 8;
}
else
{
cmb_Levels.SelectedIndex = 9;
}
switch (gender)
{
case 0:
cmb_Gender.SelectedIndex = 0;
break;
case 1:
cmb_Gender.SelectedIndex = 1;
break;
default:
cmb_Gender.SelectedIndex = 0;
break;
}

tb_Specific.Text = Path.GetDirectoryName(dg.FileName) + "\\" + Path.GetFileNameWithoutExtension(dg.FileName) + "\\";
}
}

Expand Down
Loading

0 comments on commit d3e25df

Please sign in to comment.