diff --git a/.vs/Ledybot/v14/.suo b/.vs/Ledybot/v14/.suo
index 3e5b6a2..e0b8b07 100644
Binary files a/.vs/Ledybot/v14/.suo and b/.vs/Ledybot/v14/.suo differ
diff --git a/Ledybot/App.config b/Ledybot/App.config
index f8c311d..58d621c 100644
--- a/Ledybot/App.config
+++ b/Ledybot/App.config
@@ -19,6 +19,15 @@
Ledyba
+
+ 5p3kgb
+
+
+ True
+
+
+ PokemonPlaza
+
\ No newline at end of file
diff --git a/Ledybot/Form1.Designer.cs b/Ledybot/Form1.Designer.cs
index 3b46928..fc1588e 100644
--- a/Ledybot/Form1.Designer.cs
+++ b/Ledybot/Form1.Designer.cs
@@ -40,11 +40,13 @@ private void InitializeComponent()
this.Time = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.Trainer = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.NickName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.dexSent = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.FC = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.btn_Export = new System.Windows.Forms.Button();
this.cb_Blacklist = new System.Windows.Forms.CheckBox();
this.tc_Control = new System.Windows.Forms.TabControl();
this.tp_GTS = new System.Windows.Forms.TabPage();
+ this.tb_thread = new System.Windows.Forms.TextBox();
this.cb_Reddit = new System.Windows.Forms.CheckBox();
this.btn_Banlist = new System.Windows.Forms.Button();
this.btn_ShowPaths = new System.Windows.Forms.Button();
@@ -70,7 +72,9 @@ private void InitializeComponent()
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.disconnectTimer = new System.Windows.Forms.Timer(this.components);
this.timer2 = new System.Windows.Forms.Timer(this.components);
- this.tb_thread = new System.Windows.Forms.TextBox();
+ this.tb_Settings = new System.Windows.Forms.TabPage();
+ this.label4 = new System.Windows.Forms.Label();
+ this.tb_Subreddit = new System.Windows.Forms.TextBox();
this.tc_Control.SuspendLayout();
this.tp_GTS.SuspendLayout();
this.tp_Injection.SuspendLayout();
@@ -78,6 +82,7 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nud_SlotInjection)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nud_BoxInjection)).BeginInit();
this.tp_Breeding.SuspendLayout();
+ this.tb_Settings.SuspendLayout();
this.SuspendLayout();
//
// tb_IP
@@ -143,11 +148,12 @@ private void InitializeComponent()
this.Time,
this.Trainer,
this.NickName,
+ this.dexSent,
this.FC});
this.lv_log.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.lv_log.Location = new System.Drawing.Point(6, 74);
this.lv_log.Name = "lv_log";
- this.lv_log.Size = new System.Drawing.Size(355, 386);
+ this.lv_log.Size = new System.Drawing.Size(353, 386);
this.lv_log.TabIndex = 18;
this.lv_log.UseCompatibleStateImageBehavior = false;
this.lv_log.View = System.Windows.Forms.View.Details;
@@ -165,12 +171,16 @@ private void InitializeComponent()
// NickName
//
this.NickName.Text = "Name";
- this.NickName.Width = 82;
+ this.NickName.Width = 49;
+ //
+ // dexSent
+ //
+ this.dexSent.Text = "Dex Sent";
//
// FC
//
this.FC.Text = "FC";
- this.FC.Width = 199;
+ this.FC.Width = 110;
//
// btn_Export
//
@@ -197,6 +207,7 @@ private void InitializeComponent()
this.tc_Control.Controls.Add(this.tp_GTS);
this.tc_Control.Controls.Add(this.tp_Injection);
this.tc_Control.Controls.Add(this.tp_Breeding);
+ this.tc_Control.Controls.Add(this.tb_Settings);
this.tc_Control.Location = new System.Drawing.Point(1, 33);
this.tc_Control.Name = "tc_Control";
this.tc_Control.SelectedIndex = 0;
@@ -225,6 +236,13 @@ private void InitializeComponent()
this.tp_GTS.Text = "GTS";
this.tp_GTS.UseVisualStyleBackColor = true;
//
+ // tb_thread
+ //
+ this.tb_thread.Location = new System.Drawing.Point(193, 19);
+ this.tb_thread.Name = "tb_thread";
+ this.tb_thread.Size = new System.Drawing.Size(76, 20);
+ this.tb_thread.TabIndex = 31;
+ //
// cb_Reddit
//
this.cb_Reddit.AutoSize = true;
@@ -505,12 +523,33 @@ private void InitializeComponent()
//
this.disconnectTimer.Tick += new System.EventHandler(this.disconnectTimer_Tick);
//
- // tb_thread
+ // tb_Settings
//
- this.tb_thread.Location = new System.Drawing.Point(193, 19);
- this.tb_thread.Name = "tb_thread";
- this.tb_thread.Size = new System.Drawing.Size(76, 20);
- this.tb_thread.TabIndex = 31;
+ this.tb_Settings.Controls.Add(this.tb_Subreddit);
+ this.tb_Settings.Controls.Add(this.label4);
+ this.tb_Settings.Location = new System.Drawing.Point(4, 22);
+ this.tb_Settings.Name = "tb_Settings";
+ this.tb_Settings.Padding = new System.Windows.Forms.Padding(3);
+ this.tb_Settings.Size = new System.Drawing.Size(369, 495);
+ this.tb_Settings.TabIndex = 3;
+ this.tb_Settings.Text = "Settings";
+ this.tb_Settings.UseVisualStyleBackColor = true;
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Location = new System.Drawing.Point(7, 9);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(55, 13);
+ this.label4.TabIndex = 0;
+ this.label4.Text = "Subreddit:";
+ //
+ // tb_Subreddit
+ //
+ this.tb_Subreddit.Location = new System.Drawing.Point(68, 6);
+ this.tb_Subreddit.Name = "tb_Subreddit";
+ this.tb_Subreddit.Size = new System.Drawing.Size(293, 20);
+ this.tb_Subreddit.TabIndex = 1;
//
// MainForm
//
@@ -541,6 +580,8 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.nud_BoxInjection)).EndInit();
this.tp_Breeding.ResumeLayout(false);
this.tp_Breeding.PerformLayout();
+ this.tb_Settings.ResumeLayout(false);
+ this.tb_Settings.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -589,6 +630,10 @@ private void InitializeComponent()
private System.Windows.Forms.Button btn_Banlist;
private System.Windows.Forms.CheckBox cb_Reddit;
private System.Windows.Forms.TextBox tb_thread;
+ private System.Windows.Forms.ColumnHeader dexSent;
+ private System.Windows.Forms.TabPage tb_Settings;
+ private System.Windows.Forms.TextBox tb_Subreddit;
+ private System.Windows.Forms.Label label4;
}
}
diff --git a/Ledybot/Form1.cs b/Ledybot/Form1.cs
index be40140..a29b20c 100644
--- a/Ledybot/Form1.cs
+++ b/Ledybot/Form1.cs
@@ -177,14 +177,14 @@ private async void btn_Start_Click(object sender, EventArgs e)
botNumber = -1;
}
- public void AppendListViewItem(string szTrainerName, string szNickname, string fc)
+ public void AppendListViewItem(string szTrainerName, string szNickname, string szSent, string fc)
{
if (InvokeRequired)
{
- this.Invoke(new Action(AppendListViewItem), new object[] { szTrainerName, szNickname, fc });
+ this.Invoke(new Action(AppendListViewItem), new object[] { szTrainerName, szNickname, szSent, fc });
return;
}
- string[] row = { DateTime.Now.ToString("h:mm:ss"), szTrainerName, szNickname, fc.Insert(4, "-").Insert(9, "-") };
+ string[] row = { DateTime.Now.ToString("h:mm:ss"), szTrainerName, szNickname, szSent, fc.Insert(4, "-").Insert(9, "-") };
var listViewItem = new ListViewItem(row);
lv_log.Items.Add(listViewItem);
@@ -240,6 +240,9 @@ private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
Properties.Settings.Default.IP = tb_IP.Text;
Properties.Settings.Default.Deposited = tb_PokemonToFind.Text;
Properties.Settings.Default.Blacklist = cb_Blacklist.Checked;
+ Properties.Settings.Default.Reddit = cb_Reddit.Checked;
+ Properties.Settings.Default.Thread = tb_thread.Text;
+ Properties.Settings.Default.Subreddit = tb_Subreddit.Text;
Properties.Settings.Default.Save();
}
@@ -248,6 +251,9 @@ private void MainForm_Load(object sender, EventArgs e)
tb_IP.Text = Properties.Settings.Default.IP;
tb_PokemonToFind.Text = Properties.Settings.Default.Deposited;
cb_Blacklist.Checked = Properties.Settings.Default.Blacklist;
+ cb_Reddit.Checked = Properties.Settings.Default.Reddit;
+ tb_thread.Text = Properties.Settings.Default.Thread;
+ tb_Subreddit.Text = Properties.Settings.Default.Subreddit;
}
private void btn_BrowseInject_Click(object sender, EventArgs e)
@@ -470,20 +476,30 @@ public void updateJSON()
{
return;
}
- var json = "";
- using (WebClient wc = new WebClient())
- {
- json = wc.DownloadString("https://www.reddit.com/r/PokemonPlaza/comments/" + tb_thread.Text + ".json?limt=1000&showmore=true");
- }
- List data = JsonConvert.DeserializeObject>(json);
- foreach (ChildrenData cd in data[1].data.children)
+ try
{
- string fc = cd.data.flair.Substring(cd.data.flair.IndexOf('-', 4) - 4, 14);
- if (!commented.Contains(fc))
+ using (WebClient wc = new WebClient())
{
- commented.Add(fc);
+ wc.DownloadStringCompleted += (sender, e) =>
+ {
+ List data = JsonConvert.DeserializeObject>(e.Result);
+ foreach (ChildrenData cd in data[1].data.children)
+ {
+ string fc = (cd.data.flair != null && cd.data.flair.Length >= 14 ? cd.data.flair.Substring(cd.data.flair.IndexOf('-', 4) - 4, 14) : "").Replace("-", "");
+ if (!commented.Contains(fc) && fc != "")
+ {
+ commented.Add(fc);
+ }
+ }
+ };
+
+ wc.DownloadStringAsync(new Uri("https://www.reddit.com/r/" + tb_Subreddit.Text + "/comments/" + tb_thread.Text + ".json?limt=1000&showmore=true"));
}
}
+ catch
+ {
+
+ }
}
}
diff --git a/Ledybot/GTSBot7.cs b/Ledybot/GTSBot7.cs
index d25eb71..b0ba886 100644
--- a/Ledybot/GTSBot7.cs
+++ b/Ledybot/GTSBot7.cs
@@ -12,7 +12,7 @@ namespace Ledybot
class GTSBot7
{
- public enum gtsbotstates { botstart, startsearch, openpokemonwanted, openwhatpokemon, typepokemon, presssearch, startfind, findfromend, findfromstart, trade, research, botexit, updatecomments };
+ public enum gtsbotstates { botstart, startsearch, openpokemonwanted, openwhatpokemon, typepokemon, presssearch, startfind, findfromend, findfromstart, trade, research, botexit, updatecomments, quicksearch };
private uint addr_PageSize = 0x32A6A1A4;
private uint addr_PageEndStartRecord = 0x32A6A68C;
@@ -211,7 +211,7 @@ public async Task RunBot()
fc[4] = checksum;
long iFC = BitConverter.ToInt64(fc, 0);
szFC = iFC.ToString().PadLeft(12, '0');
- if (Program.f1.commented.Contains(szFC) && !details.Item6.Contains(BitConverter.ToInt32(principal, 0)) && !Program.f1.banlist.Contains(szFC))
+ if ((!bReddit || Program.f1.commented.Contains(szFC)) && !details.Item6.Contains(BitConverter.ToInt32(principal, 0)) && !Program.f1.banlist.Contains(szFC))
{
int gender = block[0xE];
int level = block[0xF];
@@ -334,7 +334,7 @@ public async Task RunBot()
fc[4] = checksum;
long iFC = BitConverter.ToInt64(fc, 0);
szFC = iFC.ToString().PadLeft(12, '0');
- if (Program.f1.commented.Contains(szFC) && !details.Item6.Contains(BitConverter.ToInt32(principal, 0)) && !Program.f1.banlist.Contains(szFC))
+ if ((!bReddit || Program.f1.commented.Contains(szFC)) && !details.Item6.Contains(BitConverter.ToInt32(principal, 0)) && !Program.f1.banlist.Contains(szFC))
{
int gender = block[0xE];
int level = block[0xF];
@@ -371,7 +371,7 @@ public async Task RunBot()
//}
if (tradeIndex == -1)
{
- if (listlength < 100)
+ if (listlength < 100 && startIndex >= 200)
{
for (int i = 0; i < listlength; i++)
{
@@ -420,29 +420,9 @@ public async Task RunBot()
botState = (int)gtsbotstates.research;
}
}
- else
+ else if (startIndex < 200)
{
- waitTaskbool = Program.helper.waitNTRwrite(addr_PageStartingIndex, 100000, iPID);
- if (await waitTaskbool)
- {
- startIndex -= 100;
- Program.helper.quickbuton(Program.PKTable.DpadLEFT, commandtime);
- await Task.Delay(commandtime + delaytime);
- Program.helper.quickbuton(Program.PKTable.DpadRIGHT, commandtime);
- await Task.Delay(commandtime + delaytime);
- Program.helper.quickbuton(Program.PKTable.DpadRIGHT, commandtime);
- await Task.Delay(commandtime + delaytime);
- await Task.Delay(3000);
- Program.helper.quicktouch(10, 10, commandtime);
- await Task.Delay(commandtime + delaytime + 250);
- Program.helper.quicktouch(10, 10, commandtime);
- await Task.Delay(commandtime + delaytime + 250);
- Program.helper.quicktouch(10, 10, commandtime);
- await Task.Delay(commandtime + delaytime + 250);
- Program.helper.quicktouch(10, 10, commandtime);
- await Task.Delay(commandtime + delaytime + 250);
- botState = (int)gtsbotstates.findfromstart;
- }
+ botState = (int)gtsbotstates.quicksearch;
}
}
}
@@ -472,7 +452,7 @@ public async Task RunBot()
{
details.Item6.Add(BitConverter.ToInt32(principal, 0));
}
- Program.f1.AppendListViewItem(szTrainerName, szNickname, szFC);
+ Program.f1.AppendListViewItem(szTrainerName, szNickname, dexnumber.ToString(), szFC);
//Inject the Pokemon to box1slot1
Program.scriptHelper.write(0x330d9838, cloneshort, iPID);
Program.helper.quickbuton(Program.PKTable.keyA, commandtime);
@@ -495,7 +475,16 @@ public async Task RunBot()
break;
}
}
+ }
+ foreach (System.Data.DataRow row in Program.gd.details.Rows)
+ {
+ if (row[0].ToString() == dexnumber.ToString())
+ {
+ int amount = int.Parse(row[6].ToString()) + 1;
+ row[6] = amount;
+ break;
+ }
}
await Task.Delay(10250);
@@ -542,6 +531,13 @@ public async Task RunBot()
}
}
break;
+ case (int)gtsbotstates.quicksearch:
+ Program.helper.quickbuton(Program.PKTable.keyB, commandtime);
+ await Task.Delay(commandtime + delaytime + 500);
+ await Program.helper.waittouch(160, 185);
+ await Task.Delay(2250);
+ botState = (int)gtsbotstates.findfromstart;
+ break;
case (int)gtsbotstates.research:
Program.helper.quicktouch(128, 64, commandtime);
await Task.Delay(commandtime + delaytime + 1000);
diff --git a/Ledybot/GiveawayDetails.cs b/Ledybot/GiveawayDetails.cs
index 989ca53..eb6b361 100644
--- a/Ledybot/GiveawayDetails.cs
+++ b/Ledybot/GiveawayDetails.cs
@@ -26,6 +26,7 @@ private void loadDetails()
details.Columns.Add("Gender Index", typeof(int));
details.Columns.Add("Level Index", typeof(int));
details.Columns.Add("Count", typeof(int));
+ details.Columns.Add("Traded", typeof(int));
if (File.Exists(Application.StartupPath + "\\giveawaydetails.xml"))
{
@@ -65,7 +66,7 @@ private void btn_Add_Click(object sender, EventArgs e)
}
}
}
- details.Rows.Add(input.dex, input.def, input.specific, input.gender + 1, input.level + 1, input.count);
+ details.Rows.Add(input.dex, input.def, input.specific, input.gender + 1, input.level + 1, input.count, 0);
Program.f1.giveawayDetails.Add(input.dex, new Tuple(input.def, input.specific, input.gender + 1, input.level + 1, input.count, new ArrayList()));
}
}
diff --git a/Ledybot/Program.cs b/Ledybot/Program.cs
index 5cbe7ba..1c6aef8 100644
--- a/Ledybot/Program.cs
+++ b/Ledybot/Program.cs
@@ -1,7 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using System.Windows.Forms;
namespace Ledybot
diff --git a/Ledybot/Properties/Settings.Designer.cs b/Ledybot/Properties/Settings.Designer.cs
index 7cc2bde..756c5b6 100644
--- a/Ledybot/Properties/Settings.Designer.cs
+++ b/Ledybot/Properties/Settings.Designer.cs
@@ -58,5 +58,41 @@ public string Deposited {
this["Deposited"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("5p3kgb")]
+ public string Thread {
+ get {
+ return ((string)(this["Thread"]));
+ }
+ set {
+ this["Thread"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]
+ public bool Reddit {
+ get {
+ return ((bool)(this["Reddit"]));
+ }
+ set {
+ this["Reddit"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("PokemonPlaza")]
+ public string Subreddit {
+ get {
+ return ((string)(this["Subreddit"]));
+ }
+ set {
+ this["Subreddit"] = value;
+ }
+ }
}
}
diff --git a/Ledybot/Properties/Settings.settings b/Ledybot/Properties/Settings.settings
index 60c7c3f..3591179 100644
--- a/Ledybot/Properties/Settings.settings
+++ b/Ledybot/Properties/Settings.settings
@@ -11,5 +11,14 @@
Ledyba
+
+ 5p3kgb
+
+
+ True
+
+
+ PokemonPlaza
+
\ No newline at end of file