Skip to content

Commit

Permalink
Blacklist option
Browse files Browse the repository at this point in the history
No repeat option for giveaways
  • Loading branch information
imaboy321 committed Dec 12, 2016
1 parent babfc17 commit 683998d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 19 deletions.
Binary file modified .vs/Ledybot/v14/.suo
Binary file not shown.
22 changes: 11 additions & 11 deletions Ledybot/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Ledybot/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private async void btn_Start_Click(object sender, EventArgs e)
botWorking = true;
botStop = false;
botNumber = 3;
GTSBot7 = new GTSBot7(pid, tb_PokemonToFind.Text, tb_Default.Text, tb_Folder.Text, cb_Spanish.Checked, (int)nud_Dex.Value, cmb_Gender.SelectedIndex, cmb_Levels.SelectedIndex);
GTSBot7 = new GTSBot7(pid, tb_PokemonToFind.Text, tb_Default.Text, tb_Folder.Text, cb_Blacklist.Checked, (int)nud_Dex.Value, cmb_Gender.SelectedIndex, cmb_Levels.SelectedIndex);
Task<int> Bot = GTSBot7.RunBot();
int result = await Bot;
if (botStop)
Expand Down Expand Up @@ -231,7 +231,7 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
config.AppSettings.Settings["Deposited"].Value = tb_PokemonToFind.Text;
config.AppSettings.Settings["Dex"].Value = nud_Dex.Value.ToString();
config.AppSettings.Settings["Level"].Value = cmb_Levels.SelectedIndex.ToString();
config.AppSettings.Settings["Spanish"].Value = cb_Spanish.Checked.ToString();
config.AppSettings.Settings["Spanish"].Value = cb_Blacklist.Checked.ToString();
config.AppSettings.Settings["Default"].Value = tb_Default.Text;
config.AppSettings.Settings["Folder"].Value = tb_Folder.Text;
config.AppSettings.Settings["Gender"].Value = cmb_Gender.SelectedIndex.ToString();
Expand All @@ -247,7 +247,7 @@ private void MainForm_Load(object sender, EventArgs e)
tb_PokemonToFind.Text = config.AppSettings.Settings["Deposited"].Value;
nud_Dex.Value = Int32.Parse(config.AppSettings.Settings["Dex"].Value);
cmb_Levels.SelectedIndex = Int32.Parse(config.AppSettings.Settings["Level"].Value);
cb_Spanish.Checked = Boolean.Parse(config.AppSettings.Settings["Spanish"].Value);
cb_Blacklist.Checked = Boolean.Parse(config.AppSettings.Settings["Spanish"].Value);
tb_Default.Text = config.AppSettings.Settings["Default"].Value;
tb_Folder.Text = config.AppSettings.Settings["Folder"].Value;
cmb_Gender.SelectedIndex = Int32.Parse(config.AppSettings.Settings["Gender"].Value);
Expand Down
12 changes: 7 additions & 5 deletions Ledybot/GTSBot7.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public enum gtsbotstates { botstart, startsearch, openpokemonwanted, openwhatpok
private string szPk7Folder = "";
private string szPID = "";
private int iPID = 0;
private bool bSpanish = false;
private bool bBlacklist = false;
private int dexNum = 0;
private int genderIndex = 0;
private int levelIndex = 0;
Expand Down Expand Up @@ -60,13 +60,13 @@ public enum gtsbotstates { botstart, startsearch, openpokemonwanted, openwhatpok
private uint addr_PageEntry = 0;
private bool foundLastPage = false;

public GTSBot7(int iP, string szPtF = "", string szD = "", string szF = "", bool bSpanish = false, int dex = 0, int gender = 0, int level = 0)
public GTSBot7(int iP, string szPtF = "", string szD = "", string szF = "", bool bBlacklist = false, int dex = 0, int gender = 0, int level = 0)
{
this.szPokemonToFind = szPtF;
this.szDefaultPk7 = szD;
this.szPk7Folder = szF;
this.iPID = iP;
this.bSpanish = bSpanish;
this.bBlacklist = bBlacklist;
this.dexNum = dex;
this.genderIndex = gender + 1;
this.levelIndex = level + 1;
Expand Down Expand Up @@ -439,8 +439,10 @@ public async Task<int> RunBot()
fc[4] = checksum;
long iFC = BitConverter.ToInt64(fc, 0);
string szFC = iFC.ToString().PadLeft(12, '0');

Program.f1.blacklist.Add(BitConverter.ToInt32(principal, 0));
if(bBlacklist)
{
Program.f1.blacklist.Add(BitConverter.ToInt32(principal, 0));
}
Program.f1.AppendListViewItem(szTrainerName, szNickname, szFC);
//Inject the Pokemon to box1slot1
Program.scriptHelper.write(0x330d9838, cloneshort, iPID);
Expand Down

0 comments on commit 683998d

Please sign in to comment.