diff --git a/PokemonGo/RocketAPI/Client.cs b/PokemonGo/RocketAPI/Client.cs
index 097f82d..c3d5094 100644
--- a/PokemonGo/RocketAPI/Client.cs
+++ b/PokemonGo/RocketAPI/Client.cs
@@ -160,7 +160,27 @@ namespace PokemonGo.RocketAPI
releasePokemonRequest);
}
- private async Task<MiscEnums.Item> GetBestBall(int? pokemonCP)
+
+ public async Task<EvolvePokemonOut> PowerUp(ulong pokemonId)
+ {
+ var customRequest = new EvolvePokemon
+ {
+ PokemonId = pokemonId
+ };
+
+ var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
+ new Request.Types.Requests
+ {
+ Type = (int)RequestType.UPGRADE_POKEMON,
+ Message = customRequest.ToByteString()
+ });
+ return
+ await
+ _httpClient.PostProtoPayload<Request, EvolvePokemonOut>($"https://{_apiUrl}/rpc",
+ releasePokemonRequest);
+ }
+
+ private async Task<MiscEnums.Item> GetBestBall(int? pokemonCP)
{
var inventory = await GetInventory();
diff --git a/PokemonGo/RocketAPI/Console/App.config b/PokemonGo/RocketAPI/Console/App.config
index d7cfe10..98a593f 100644
--- a/PokemonGo/RocketAPI/Console/App.config
+++ b/PokemonGo/RocketAPI/Console/App.config
@@ -12,12 +12,12 @@
</assemblyBinding>
</runtime>
<appSettings>
- <add key="AuthType" value="Ptc" /> <!--Google/Ptc-->
+ <add key="AuthType" value="Google" /> <!--Google/Ptc-->
<add key="PtcUsername" value="username" /> <!--Username-->
<add key="PtcPassword" value="pw" /> <!--Password-->
<add key="GoogleRefreshToken" value="" />
- <add key="DefaultLatitude" value="-36.842887" /> <!--Default Viaduct Harbour, Auckland, New Zealand-->
- <add key="DefaultLongitude" value="174.766365" /> <!--Default Viaduct Harbour, Auckland, New Zealand-->
+ <add key="DefaultLatitude" value="45.030152" /> <!--Default Viaduct Harbour, Auckland, New Zealand-->
+ <add key="DefaultLongitude" value="-93.31931" /> <!--Default Viaduct Harbour, Auckland, New Zealand-->
<add key="LevelOutput" value="levelup" /> <!--2 Modes: "time": Every XXX seconds and "levelup" every levelup-->
<add key="LevelTimeInterval" value="1" /> <!--Pick 1 if levelup and time in seconds if "time"-->
<add key="Recycler" value="true" /> <!--Recycler master switch-->
@@ -28,7 +28,7 @@
<add key="TransferType" value="duplicate" /> <!--none/cp/iv/leaveStrongest/duplicate/all Whitelists/blackslists for each type is in Program.cs-->
<add key="TransferCPThreshold" value="0" /> <!--transfer pokemon with CP less than this value if cp transfer type is selected. Whitelist in Program.cs-->
<add key="TransferIVThreshold" value="80" /> <!--transfer pokemon with IV less than this value if iv transfer type is selected. Whitelist in Program.cs-->
- <add key="EvolveAllGivenPokemons" value="false" />
+ <add key="EvolveAllGivenPokemons" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
index 2379d18..addeace 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
@@ -39,6 +39,7 @@
this.useLuckyEggToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showAllToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.forceUnbanToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
@@ -49,9 +50,9 @@
this.logTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.logTextBox.ForeColor = System.Drawing.Color.White;
- this.logTextBox.Location = new System.Drawing.Point(0, 24);
+ this.logTextBox.Location = new System.Drawing.Point(0, 25);
this.logTextBox.Name = "logTextBox";
- this.logTextBox.Size = new System.Drawing.Size(905, 471);
+ this.logTextBox.Size = new System.Drawing.Size(905, 430);
this.logTextBox.TabIndex = 0;
this.logTextBox.Text = "";
this.logTextBox.TextChanged += new System.EventHandler(this.logTextBox_TextChanged);
@@ -60,7 +61,7 @@
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statusLabel});
- this.statusStrip1.Location = new System.Drawing.Point(0, 495);
+ this.statusStrip1.Location = new System.Drawing.Point(0, 455);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(905, 22);
this.statusStrip1.TabIndex = 1;
@@ -69,7 +70,7 @@
// statusLabel
//
this.statusLabel.Name = "statusLabel";
- this.statusLabel.Size = new System.Drawing.Size(39, 17);
+ this.statusLabel.Size = new System.Drawing.Size(43, 17);
this.statusLabel.Text = "Status";
//
// menuStrip1
@@ -78,10 +79,11 @@
this.startBotToolStripMenuItem,
this.todoToolStripMenuItem,
this.pokemonToolStripMenuItem2,
- this.useLuckyEggToolStripMenuItem});
+ this.useLuckyEggToolStripMenuItem,
+ this.forceUnbanToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(905, 24);
+ this.menuStrip1.Size = new System.Drawing.Size(905, 25);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
@@ -109,7 +111,7 @@
// useLuckyEggToolStripMenuItem
//
this.useLuckyEggToolStripMenuItem.Name = "useLuckyEggToolStripMenuItem";
- this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(95, 20);
+ this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(105, 21);
this.useLuckyEggToolStripMenuItem.Text = "Use Lucky Egg";
this.useLuckyEggToolStripMenuItem.Click += new System.EventHandler(this.useLuckyEggToolStripMenuItem_Click);
//
@@ -123,11 +125,18 @@
this.showAllToolStripMenuItem1.Name = "showAllToolStripMenuItem1";
this.showAllToolStripMenuItem1.Size = new System.Drawing.Size(32, 19);
//
+ // forceUnbanToolStripMenuItem
+ //
+ this.forceUnbanToolStripMenuItem.Name = "forceUnbanToolStripMenuItem";
+ this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(94, 21);
+ this.forceUnbanToolStripMenuItem.Text = "Force Unban";
+ this.forceUnbanToolStripMenuItem.Click += new System.EventHandler(this.forceUnbanToolStripMenuItem_Click);
+ //
// MainForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(905, 517);
+ this.ClientSize = new System.Drawing.Size(905, 477);
this.Controls.Add(this.logTextBox);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
@@ -158,6 +167,7 @@
private System.Windows.Forms.ToolStripMenuItem showAllToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem pokemonToolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem useLuckyEggToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem forceUnbanToolStripMenuItem;
}
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs
index 6ddd4c3..6fb4b26 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.cs
@@ -31,13 +31,16 @@ namespace PokemonGo.RocketAPI.Window
private void MainForm_Load(object sender, EventArgs e)
{
-
+
}
public static ISettings ClientSettings;
private static int Currentlevel = -1;
private static int TotalExperience = 0;
private static int TotalPokemon = 0;
+ private static bool ForceUnbanning = false;
+ private static bool FarmingStops = false;
+ private static bool FarmingPokemons = false;
private static DateTime TimeStarted = DateTime.Now;
public static DateTime InitSessionDateTime = DateTime.Now;
@@ -192,7 +195,7 @@ namespace PokemonGo.RocketAPI.Window
ColoredConsoleWrite(Color.Green, "Login Type: Google");
if (ClientSettings.GoogleRefreshToken == "")
ColoredConsoleWrite(Color.Green, "Now opening www.Google.com/device and copying the 8 digit code to your clipboard");
-
+
await client.DoGoogleLogin();
break;
}
@@ -269,6 +272,11 @@ namespace PokemonGo.RocketAPI.Window
await Task.Delay(5000);
PrintLevel(client);
await ExecuteFarmingPokestopsAndPokemons(client);
+
+ while (ForceUnbanning)
+ await Task.Delay(25);
+
+ // await ForceUnban(client);
ColoredConsoleWrite(Color.Red, $"No nearby useful locations found. Please wait 10 seconds.");
await Task.Delay(10000);
CheckVersion();
@@ -327,6 +335,11 @@ namespace PokemonGo.RocketAPI.Window
foreach (var pokemon in pokemons)
{
+ if (ForceUnbanning)
+ break;
+
+ FarmingPokemons = true;
+
await locationManager.update(pokemon.Latitude, pokemon.Longitude);
var encounterPokemonResponse = await client.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnpointId);
var pokemonCP = encounterPokemonResponse?.WildPokemon?.PokemonData?.Cp;
@@ -391,6 +404,7 @@ namespace PokemonGo.RocketAPI.Window
break;
}
+ FarmingPokemons = false;
await Task.Delay(3000);
}
}
@@ -404,9 +418,15 @@ namespace PokemonGo.RocketAPI.Window
}
HashSet<FortData> pokeStopSet = new HashSet<FortData>(pokeStops);
IEnumerable<FortData> nextPokeStopList = null;
- ColoredConsoleWrite(Color.Cyan, $"Visiting {pokeStops.Count()} PokeStops");
+ if (!ForceUnbanning)
+ ColoredConsoleWrite(Color.Cyan, $"Visiting {pokeStops.Count()} PokeStops");
foreach (var pokeStop in pokeStops)
{
+ if (ForceUnbanning)
+ break;
+
+ FarmingStops = true;
+
double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
@@ -428,6 +448,7 @@ namespace PokemonGo.RocketAPI.Window
if (fortSearch.ExperienceAwarded != 0)
TotalExperience += (fortSearch.ExperienceAwarded);
+
var pokeStopMapObjects = await client.GetMapObjects();
/* Gets all pokeStops near this pokeStop which are not in the set of pokeStops being currently
@@ -448,6 +469,7 @@ namespace PokemonGo.RocketAPI.Window
if (ClientSettings.CatchPokemon)
await ExecuteCatchAllNearbyPokemons(client);
}
+ FarmingStops = false;
if (nextPokeStopList != null)
{
client.RecycleItems(client);
@@ -455,6 +477,67 @@ namespace PokemonGo.RocketAPI.Window
}
}
+ private async Task ForceUnban(Client client)
+ {
+ if (!ForceUnbanning)
+ {
+ ColoredConsoleWrite(Color.LightGreen, "Waiting for last farming action to be complete...");
+ ForceUnbanning = true;
+
+ while (FarmingStops || FarmingPokemons)
+ {
+ await Task.Delay(25);
+ }
+
+ ColoredConsoleWrite(Color.LightGreen, "Starting force unban...");
+
+ var mapObjects = await client.GetMapObjects();
+ var pokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime());
+
+ await Task.Delay(10000);
+ bool done = false;
+
+ foreach (var pokeStop in pokeStops)
+ {
+
+ double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
+ await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
+ var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
+
+ if (fortInfo.Name != string.Empty)
+ {
+ ColoredConsoleWrite(Color.LightGreen, "Chosen PokeStop " + fortInfo.Name + " for force unban");
+ for (int i = 1; i <= 50; i++)
+ {
+ var fortSearch = await client.SearchFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
+ if (fortSearch.ExperienceAwarded == 0)
+ {
+ ColoredConsoleWrite(Color.LightGreen, "Attempt: " + i);
+ }
+ else
+ {
+ ColoredConsoleWrite(Color.LightGreen, "Fuck yes, you are now unbanned! Total attempts: " + i);
+ done = true;
+ break;
+ }
+ }
+ }
+
+ if (!done)
+ ColoredConsoleWrite(Color.LightGreen, "Force unban failed, please try again.");
+
+ ForceUnbanning = false;
+ break;
+ }
+ }
+ else
+ {
+ ColoredConsoleWrite(Color.Red, "A force unban attempt is in action... Please wait.");
+ }
+
+
+ }
+
private string GetFriendlyItemsString(IEnumerable<FortSearchResponse.Types.ItemAward> items)
{
var enumerable = items as IList<FortSearchResponse.Types.ItemAward> ?? items.ToList();
@@ -886,7 +969,7 @@ namespace PokemonGo.RocketAPI.Window
// todo: add player stats later
}
- private async void useLuckyEggToolStripMenuItem_Click(object sender ,EventArgs e)
+ private async void useLuckyEggToolStripMenuItem_Click(object sender, EventArgs e)
{
if (client != null)
{
@@ -900,7 +983,7 @@ namespace PokemonGo.RocketAPI.Window
var useItemXpBoostRequest = await client.UseItemXpBoost(ItemId.ItemLuckyEgg);
ColoredConsoleWrite(Color.Green, $"Using a Lucky Egg, we have {LuckyEgg.Count} left.");
ColoredConsoleWrite(Color.Yellow, $"Lucky Egg Valid until: {DateTime.Now.AddMinutes(30).ToString()}");
-
+
var stripItem = sender as ToolStripMenuItem;
stripItem.Enabled = false;
await Task.Delay(30000);
@@ -922,6 +1005,25 @@ namespace PokemonGo.RocketAPI.Window
}
}
+ private async void forceUnbanToolStripMenuItem_Click(object sender, EventArgs e)
+ {
+ if (client != null)
+ {
+ if (ForceUnbanning)
+ {
+ ColoredConsoleWrite(Color.Red, "A force unban attempt is in action... Please wait.");
+ }
+ else
+ {
+ await ForceUnban(client);
+ }
+ }
+ else
+ {
+ ColoredConsoleWrite(Color.Red, "Please start the bot before trying to force unban");
+ }
+ }
+
private void showAllToolStripMenuItem2_Click(object sender, EventArgs e)
{
@@ -939,6 +1041,7 @@ namespace PokemonGo.RocketAPI.Window
var pForm = new PokeUi();
pForm.Show();
+
}
}
}
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
index d12f59b..16fa9be 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
@@ -28,69 +28,119 @@
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
- this.listView1 = new System.Windows.Forms.ListView();
- this.button1 = new System.Windows.Forms.Button();
- this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
- this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
- this.contextMenuStrip1.SuspendLayout();
- this.SuspendLayout();
- //
- // listView1
- //
- this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
+ this.listView1 = new System.Windows.Forms.ListView();
+ this.button1 = new System.Windows.Forms.Button();
+ this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.button2 = new System.Windows.Forms.Button();
+ this.button3 = new System.Windows.Forms.Button();
+ this.btnUpgrade = new System.Windows.Forms.Button();
+ this.contextMenuStrip1.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // listView1
+ //
+ this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.listView1.Location = new System.Drawing.Point(12, 12);
- this.listView1.Name = "listView1";
- this.listView1.Size = new System.Drawing.Size(411, 314);
- this.listView1.TabIndex = 0;
- this.listView1.UseCompatibleStateImageBehavior = false;
- this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
- this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
- //
- // button1
- //
- this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ this.listView1.Location = new System.Drawing.Point(16, 14);
+ this.listView1.Margin = new System.Windows.Forms.Padding(4);
+ this.listView1.Name = "listView1";
+ this.listView1.Size = new System.Drawing.Size(795, 458);
+ this.listView1.TabIndex = 0;
+ this.listView1.UseCompatibleStateImageBehavior = false;
+ this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
+ this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
+ //
+ // button1
+ //
+ this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.button1.Location = new System.Drawing.Point(12, 332);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(411, 26);
- this.button1.TabIndex = 3;
- this.button1.Text = "Reload";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // contextMenuStrip1
- //
- this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
- this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.button1.Location = new System.Drawing.Point(16, 489);
+ this.button1.Margin = new System.Windows.Forms.Padding(4);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(795, 32);
+ this.button1.TabIndex = 3;
+ this.button1.Text = "Reload";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
+ // contextMenuStrip1
+ //
+ this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
+ this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1});
- this.contextMenuStrip1.Name = "contextMenuStrip1";
- this.contextMenuStrip1.Size = new System.Drawing.Size(118, 26);
- //
- // toolStripMenuItem1
- //
- this.toolStripMenuItem1.Name = "toolStripMenuItem1";
- this.toolStripMenuItem1.Size = new System.Drawing.Size(117, 22);
- this.toolStripMenuItem1.Text = "Transfer";
- this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
- //
- // PokeUi
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(435, 363);
- this.Controls.Add(this.button1);
- this.Controls.Add(this.listView1);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Name = "PokeUi";
- this.Text = "PokeUi";
- this.Load += new System.EventHandler(this.PokeUi_Load);
- this.contextMenuStrip1.ResumeLayout(false);
- this.ResumeLayout(false);
+ this.contextMenuStrip1.Name = "contextMenuStrip1";
+ this.contextMenuStrip1.Size = new System.Drawing.Size(137, 30);
+ //
+ // toolStripMenuItem1
+ //
+ this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+ this.toolStripMenuItem1.Size = new System.Drawing.Size(136, 26);
+ this.toolStripMenuItem1.Text = "Transfer";
+ this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+ //
+ // button2
+ //
+ this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.button2.Location = new System.Drawing.Point(16, 529);
+ this.button2.Margin = new System.Windows.Forms.Padding(4);
+ this.button2.Name = "button2";
+ this.button2.Size = new System.Drawing.Size(795, 32);
+ this.button2.TabIndex = 4;
+ this.button2.Text = "Evolve Selected";
+ this.button2.UseVisualStyleBackColor = true;
+ this.button2.Click += new System.EventHandler(this.button2_Click);
+ //
+ // button3
+ //
+ this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.button3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.button3.Location = new System.Drawing.Point(16, 609);
+ this.button3.Margin = new System.Windows.Forms.Padding(4);
+ this.button3.Name = "button3";
+ this.button3.Size = new System.Drawing.Size(795, 32);
+ this.button3.TabIndex = 5;
+ this.button3.Text = "Transfer Selected";
+ this.button3.UseVisualStyleBackColor = true;
+ this.button3.Click += new System.EventHandler(this.button3_Click);
+ //
+ // btnUpgrade
+ //
+ this.btnUpgrade.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnUpgrade.Location = new System.Drawing.Point(16, 569);
+ this.btnUpgrade.Margin = new System.Windows.Forms.Padding(4);
+ this.btnUpgrade.Name = "btnUpgrade";
+ this.btnUpgrade.Size = new System.Drawing.Size(795, 32);
+ this.btnUpgrade.TabIndex = 6;
+ this.btnUpgrade.Text = "Upgrade Selected";
+ this.btnUpgrade.UseVisualStyleBackColor = true;
+ this.btnUpgrade.Click += new System.EventHandler(this.btnUpgrade_Click);
+ //
+ // PokeUi
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(829, 664);
+ this.Controls.Add(this.btnUpgrade);
+ this.Controls.Add(this.button3);
+ this.Controls.Add(this.button2);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.listView1);
+ this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.Name = "PokeUi";
+ this.Text = "PokeUi";
+ this.Load += new System.EventHandler(this.PokeUi_Load);
+ this.contextMenuStrip1.ResumeLayout(false);
+ this.ResumeLayout(false);
}
@@ -100,5 +150,8 @@
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
- }
+ private System.Windows.Forms.Button button2;
+ private System.Windows.Forms.Button button3;
+ private System.Windows.Forms.Button btnUpgrade;
+ }
}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.cs b/PokemonGo/RocketAPI/Window/PokeUi.cs
index 8f2d7b6..1975c4f 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.cs
@@ -16,7 +16,7 @@ namespace PokemonGo.RocketAPI.Window
{
public partial class PokeUi : Form
{
- private Client client;
+ private static Client client;
public PokeUi()
{
InitializeComponent();
@@ -32,9 +32,9 @@ namespace PokemonGo.RocketAPI.Window
private async void Execute()
{
- button1.Enabled = false;
+ EnabledButton(false);
- client = new Client(ClientSettings);
+ client = new Client(ClientSettings);
try
{
@@ -88,6 +88,9 @@ namespace PokemonGo.RocketAPI.Window
//listViewItem.SubItems.Add();
listViewItem.ImageKey = pokemon.PokemonId.ToString();
+ var pokemonId2 = pokemon.PokemonId;
+ var pokemonName = pokemon.Id;
+
listViewItem.Text = string.Format("{0}\n{1} CP", pokemon.PokemonId, pokemon.Cp);
listViewItem.ToolTipText = currentCandy + " Candy\n" + currIv + "% IV";
@@ -96,9 +99,10 @@ namespace PokemonGo.RocketAPI.Window
}
- button1.Enabled = true;
+ EnabledButton(true);
- }
+
+ }
catch (TaskCanceledException) { Execute(); }
catch (UriFormatException) { Execute(); }
catch (ArgumentOutOfRangeException) { Execute(); }
@@ -107,6 +111,13 @@ namespace PokemonGo.RocketAPI.Window
catch (Exception ex) { Execute(); }
}
+ private void EnabledButton(bool enabled)
+ {
+ button1.Enabled = enabled;
+ button2.Enabled = enabled;
+ button3.Enabled = enabled;
+ btnUpgrade.Enabled = enabled;
+ }
private static Bitmap GetPokemonImage(int pokemonId)
{
@@ -162,5 +173,137 @@ namespace PokemonGo.RocketAPI.Window
}
listView1.Items.Remove(listView1.SelectedItems[0]);
}
- }
+
+ private async void button2_Click(object sender, EventArgs e)
+ {
+ var selectedItems = this.listView1.SelectedItems;
+
+ foreach (ListViewItem selectedItem in selectedItems)
+ {
+ await evolvePokemon((PokemonData)selectedItem.Tag);
+ }
+
+ this.listView1.Clear();
+ Execute();
+ }
+
+ private async void button3_Click(object sender, EventArgs e)
+ {
+ var selectedItems = this.listView1.SelectedItems;
+
+ foreach (ListViewItem selectedItem in selectedItems)
+ {
+ await transferPokemon((PokemonData)selectedItem.Tag);
+ }
+
+ this.listView1.Clear();
+ Execute();
+ }
+
+ private static async Task evolvePokemon(PokemonData pokemon)
+ {
+ try
+ {
+ var evolvePokemonResponse = await client.EvolvePokemon(pokemon.Id);
+ string message = "";
+ string caption = "";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ DialogResult result;
+
+ if (evolvePokemonResponse.Result == 1)
+ {
+ message = $"{pokemon.PokemonId} successfully evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}\n{evolvePokemonResponse.ExpAwarded} experience awarded\n{evolvePokemonResponse.CandyAwarded} candy awarded";
+ caption = $"{pokemon.PokemonId} evolved into {evolvePokemonResponse.EvolvedPokemon.PokemonType}";
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be evolved";
+ caption = $"Evolve {pokemon.PokemonId} failed";
+ }
+
+ result = MessageBox.Show(message, caption, buttons, MessageBoxIcon.Information);
+ }
+ catch (TaskCanceledException) { await evolvePokemon(pokemon); }
+ catch (UriFormatException) { await evolvePokemon(pokemon); }
+ catch (ArgumentOutOfRangeException) { await evolvePokemon(pokemon); }
+ catch (ArgumentNullException) { await evolvePokemon(pokemon); }
+ catch (NullReferenceException) { await evolvePokemon(pokemon); }
+ catch (Exception ex) { await evolvePokemon(pokemon); }
+ }
+
+ private static async Task transferPokemon(PokemonData pokemon)
+ {
+ try
+ {
+ var transferPokemonResponse = await client.TransferPokemon(pokemon.Id);
+ string message = "";
+ string caption = "";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ DialogResult result;
+
+ if (transferPokemonResponse.Status == 1)
+ {
+ message = $"{pokemon.PokemonId} was transferred\n{transferPokemonResponse.CandyAwarded} candy awarded";
+ caption = $"{pokemon.PokemonId} transferred";
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be transferred";
+ caption = $"Transfer {pokemon.PokemonId} failed";
+ }
+
+ result = MessageBox.Show(message, caption, buttons, MessageBoxIcon.Information);
+ }
+ catch (TaskCanceledException) { await transferPokemon(pokemon); }
+ catch (UriFormatException) { await transferPokemon(pokemon); }
+ catch (ArgumentOutOfRangeException) { await transferPokemon(pokemon); }
+ catch (ArgumentNullException) { await transferPokemon(pokemon); }
+ catch (NullReferenceException) { await transferPokemon(pokemon); }
+ catch (Exception ex) { await transferPokemon(pokemon); }
+ }
+
+ private async void btnUpgrade_Click(object sender, EventArgs e)
+ {
+ var selectedItems = listView1.SelectedItems;
+
+ foreach (ListViewItem selectedItem in selectedItems)
+ {
+ await PowerUp((PokemonData)selectedItem.Tag);
+ }
+
+ listView1.Clear();
+ Execute();
+ }
+
+ private static async Task PowerUp(PokemonData pokemon)
+ {
+ try
+ {
+ var evolvePokemonResponse = await client.PowerUp(pokemon.Id);
+ string message = "";
+ string caption = "";
+ MessageBoxButtons buttons = MessageBoxButtons.OK;
+ DialogResult result;
+
+ if (evolvePokemonResponse.Result == 1)
+ {
+ message = $"{pokemon.PokemonId} successfully upgraded.";
+ caption = $"{pokemon.PokemonId} upgraded";
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be upgraded";
+ caption = $"Upgrade {pokemon.PokemonId} failed";
+ }
+
+ result = MessageBox.Show(message, caption, buttons, MessageBoxIcon.Information);
+ }
+ catch (TaskCanceledException) { await PowerUp(pokemon); }
+ catch (UriFormatException) { await PowerUp(pokemon); }
+ catch (ArgumentOutOfRangeException) { await PowerUp(pokemon); }
+ catch (ArgumentNullException) { await PowerUp(pokemon); }
+ catch (NullReferenceException) { await PowerUp(pokemon); }
+ catch (Exception ex) { await PowerUp(pokemon); }
+ }
+ }
}
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
index cc46c5b..b614cd6 100644
--- a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
+++ b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.6.4.5")]
+[assembly: AssemblyVersion("1.6.5.1")]
[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.cs b/PokemonGo/RocketAPI/Window/SettingsForm.cs
index 12cfe79..00b42f7 100644
--- a/PokemonGo/RocketAPI/Window/SettingsForm.cs
+++ b/PokemonGo/RocketAPI/Window/SettingsForm.cs
@@ -9,6 +9,7 @@ using System.Windows.Forms;
using GMap.NET.MapProviders;
using GMap.NET;
using System.Configuration;
+using System.Globalization;
namespace PokemonGo.RocketAPI.Window
{
@@ -45,8 +46,8 @@ namespace PokemonGo.RocketAPI.Window
string lat = ConfigurationManager.AppSettings["DefaultLatitude"];
string longit = ConfigurationManager.AppSettings["DefaultLongitude"];
lat.Replace(',', '.');
- longit.Replace(',', '.');
- gMapControl1.Position = new PointLatLng(Convert.ToDouble(lat), Convert.ToDouble(longit));
+ longit.Replace(',', '.');
+ gMapControl1.Position = new PointLatLng(double.Parse(lat.Replace(",", "."), CultureInfo.InvariantCulture), double.Parse(longit.Replace(",", "."), CultureInfo.InvariantCulture));
diff --git a/README.md b/README.md
index 75d12a3..54403be 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@

-A Pokemon Go bot in C#
+A Pokémon Go bot in C#
## Features
* PTC / Google Login
@@ -20,9 +20,11 @@ A Pokemon Go bot in C#
* Evolve Pokémon
* Transfer Pokémon
* Auto-Recycle uneeded items
+* View all Pokémon CP/IV %
+* Transfer/Powerup/Evolve Pokémon
* Output level and needed XP for levelup
-* Output Username, Level, Stardust, XP/hour, Pokemon/hour in Console Title
-* German/English pokemon names
+* Output Username, Level, Stardust, XP/hour, Pokémon/hour in Console Title
+* German/English Pokémon names
* Automatic use of Razzberries
* Automatic Update checker
* Logs everything into Logs.txt
@@ -57,33 +59,33 @@ Go to PokemonGo\RocketAPI\Console\App.config -> Edit the Settings you like -> Bu
* *seconds* - After X seconds it will print the current level and experience needed for levelup when using *time* mode.
## Recycler
-* *false* Recycler not active.
-* *true* Recycler active.
+* *false* - Recycler not active.
+* *true* - Recycler active.
## RecycleItemsInterval
-* *seconds* After X seconds it recycles items from the filter in *Settings.cs*.
+* *seconds* - After X seconds it recycles items from the filter in *Settings.cs*.
## Language
-* *english* Outputs caught Pokémon in english name.
-* *german* Outputs caught Pokémon in german name.
+* *english* - Outputs caught Pokémon in english name.
+* *german* - Outputs caught Pokémon in german name.
## RazzBerryMode
-* *cp* - Use RazzBerry when Pokemon is over specific CP.
-* *probability* - Use RazzBerry when Pokemon catch chance is under a specific percentage.
+* *cp* - Use RazzBerry when Pokémon is over specific CP.
+* *probability* - Use RazzBerry when Pokémon catch chance is under a specific percentage.
## RazzBerrySetting
-* *value* CP: Use RazzBerry when Pokemon is over this value | Probability Mode: Use Razzberry when % of catching is under this value
+* *value* - CP: Use RazzBerry when Pokémon is over this value | Probability Mode: Use Razzberry when % of catching is under this value
## TransferType
* *none* - disables transferring
-* *cp* - transfers all pokemon below the CP threshold in the app.config, EXCEPT for those types specified in program.cs in TransferAllWeakPokemon
-* *leaveStrongest* - transfers all but the highest CP pokemon of each type SPECIFIED IN program.cs in TransferAllButStrongestUnwantedPokemon (those that aren't specified are untouched)
-* *duplicate* - same as above but for all pokemon (no need to specify type), (will not transfer favorited pokemon)
-* *all* - transfers all pokemon
+* *cp* - transfers all Pokémon below the CP threshold in the app.config, EXCEPT for those types specified in program.cs in TransferAllWeakPokemon
+* *leaveStrongest* - transfers all but the highest CP Pokémon of each type SPECIFIED IN program.cs in TransferAllButStrongestUnwantedPokemon (those that aren't specified are untouched)
+* *duplicate* - same as above but for all Pokémon (no need to specify type), (will not transfer favorited Pokémon)
+* *all* - transfers all Pokémon
## TransferCPThreshold
-* *CP* transfers all Pokémon with less CP than this value.
+* *CP* - transfers all Pokémon with less CP than this value.
## EvolveAllGivenPokemons
-* *false* Evolves no Pokémon.
-* *true* Evolves all Pokémon.
+* *false* - Evolves no Pokémon.
+* *true* - Evolves all Pokémon.
\ No newline at end of file
You may download the files in Public Git.