diff --git a/PokemonGo/RocketAPI/Client.cs b/PokemonGo/RocketAPI/Client.cs
index 94ccfa9..86f9f81 100644
--- a/PokemonGo/RocketAPI/Client.cs
+++ b/PokemonGo/RocketAPI/Client.cs
@@ -39,6 +39,9 @@ namespace PokemonGo.RocketAPI
private Request.Types.UnknownAuth _unknownAuth;
public static string AccessToken { get; set; } = string.Empty;
+ public delegate void ConsoleWriteDelegate(ConsoleColor color, string message);
+ public static event ConsoleWriteDelegate OnConsoleWrite;
+
public Client(ISettings settings)
{
_settings = settings;
@@ -60,6 +63,12 @@ namespace PokemonGo.RocketAPI
"application/x-www-form-urlencoded");
}
+ public bool HasServerSet()
+ {
+ Console.WriteLine(_apiUrl);
+ return _apiUrl != null;
+ }
+
public async Task<CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
double pokemonLng, MiscEnums.Item pokeball, int? pokemonCP)
{
@@ -86,24 +95,26 @@ namespace PokemonGo.RocketAPI
catchPokemonRequest);
}
- public async Task DoGoogleLogin(string email, string password)
+ public async Task DoGoogleLogin()
{
- _authType = AuthType.Google;
- GPSOAuthClient _GPSOclient = new GPSOAuthClient(email, password);
- Dictionary<string, string> _GPSOresponse = _GPSOclient.PerformMasterLogin();
- /* string json = JsonConvert.SerializeObject(_GPSOresponse, Formatting.Indented);
- Console.WriteLine(json); */
- if (_GPSOresponse.ContainsKey("Token"))
+ GoogleLogin.TokenResponseModel tokenResponse = null;
+
+ if (string.IsNullOrEmpty(_settings.GoogleRefreshToken) && string.IsNullOrEmpty(AccessToken))
{
- string token = _GPSOresponse["Token"];
- Dictionary<string, string> oauthResponse = _GPSOclient.PerformOAuth(
- token,
- "audience:server:client_id:848232511240-7so421jotr2609rmqakceuu1luuq0ptb.apps.googleusercontent.com",
- "com.nianticlabs.pokemongo",
- "321187995bc7cdc2b5fc91b11a96e2baa8602c62");
- /* string oauthJson = JsonConvert.SerializeObject(oauthResponse, Formatting.Indented);
- Console.WriteLine(oauthJson); */
- _accessToken = oauthResponse["Auth"];
+ var deviceCode = await GoogleLogin.GetDeviceCode();
+ tokenResponse = await GoogleLogin.GetAccessToken(deviceCode);
+ _accessToken = tokenResponse.id_token;
+ ColoredConsoleWrite(ConsoleColor.White, $"Put RefreshToken in settings for direct login: {tokenResponse.refresh_token}");
+ _settings.GoogleRefreshToken = tokenResponse.refresh_token;
+ AccessToken = tokenResponse.refresh_token;
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(_settings.GoogleRefreshToken))
+ tokenResponse = await GoogleLogin.GetAccessToken(_settings.GoogleRefreshToken);
+ else
+ tokenResponse = await GoogleLogin.GetAccessToken(AccessToken);
+ _accessToken = tokenResponse.id_token;
}
}
@@ -241,6 +252,7 @@ namespace PokemonGo.RocketAPI
return MiscEnums.Item.ITEM_MASTER_BALL;
}
+ ColoredConsoleWrite(ConsoleColor.Green, $"Poke Ball is being used");
return MiscEnums.Item.ITEM_POKE_BALL;
}
@@ -251,6 +263,11 @@ namespace PokemonGo.RocketAPI
System.Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text);
File.AppendAllText(AppDomain.CurrentDomain.BaseDirectory + @"\Logs.txt", "[" + DateTime.Now.ToString("HH:mm:ss tt") + "] " + text + "\n");
System.Console.ForegroundColor = originalColor;
+
+ if (OnConsoleWrite != null)
+ {
+ OnConsoleWrite(color, text);
+ }
}
public async Task<FortDetailsResponse> GetFort(string fortId, double fortLat, double fortLng)
diff --git a/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs b/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
index 81d97cb..e2524e9 100644
--- a/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
+++ b/PokemonGo/RocketAPI/Extensions/HttpClientExtensions.cs
@@ -28,12 +28,12 @@ namespace PokemonGo.RocketAPI.Extensions
return decodedResponse;
}
- private static bool waitingForResponse = false;
- public static async Task<TResponsePayload> PostProtoPayload<TRequest, TResponsePayload>(this HttpClient client,
- string url, TRequest request) where TRequest : IMessage<TRequest>
- where TResponsePayload : IMessage<TResponsePayload>, new()
- {
- ByteString payload = null;
+ private static bool waitingForResponse = false;
+ public static async Task<TResponsePayload> PostProtoPayload<TRequest, TResponsePayload>(this HttpClient client,
+ string url, TRequest request) where TRequest : IMessage<TRequest>
+ where TResponsePayload : IMessage<TResponsePayload>, new()
+ {
+ ByteString payload = null;
while (waitingForResponse)
await Task.Delay(30);
@@ -44,13 +44,9 @@ namespace PokemonGo.RocketAPI.Extensions
do
{
count++;
- ColoredConsoleWrite(ConsoleColor.Red, "ArgumentOutOfRangeException - Restarting");
- ColoredConsoleWrite(ConsoleColor.Red, ($"[DEBUG] [{DateTime.Now.ToString("HH:mm:ss")}] requesting {typeof(TResponsePayload).Name}"));
response = await PostProto(client, url, request);
waitingForResponse = false;
-
-
-
+
//Decode payload
//todo: multi-payload support
@@ -58,11 +54,29 @@ namespace PokemonGo.RocketAPI.Extensions
} while (response.Payload.Count < 1 && count < 30);
payload = response.Payload[0];
- var parsedPayload = new TResponsePayload();
- parsedPayload.MergeFrom(payload);
+ var parsedPayload = new TResponsePayload();
+ parsedPayload.MergeFrom(payload);
- return parsedPayload;
- }
+ return parsedPayload;
+ }
+
+
+ // public static async Task<TResponsePayload> PostProtoPayload<TRequest, TResponsePayload>(this HttpClient client,
+ // string url, TRequest request) where TRequest : IMessage<TRequest>
+ // where TResponsePayload : IMessage<TResponsePayload>, new()
+ // {
+ //// ColoredConsoleWrite(ConsoleColor.Red, ($"[DEBUG] [{DateTime.Now.ToString("HH:mm:ss")}] requesting {typeof(TResponsePayload).Name}"));
+ // var response = await PostProto(client, url, request);
+
+ // //Decode payload
+ // //todo: multi-payload support
+ // var payload = response.Payload[0];
+ // var parsedPayload = new TResponsePayload();
+ // parsedPayload.MergeFrom(payload);
+
+ // return parsedPayload;
+ // }
+
public static void ColoredConsoleWrite(ConsoleColor color, string text)
{
ConsoleColor originalColor = System.Console.ForegroundColor;
diff --git a/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs b/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
index 388738d..7cdf606 100644
--- a/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
+++ b/PokemonGo/RocketAPI/GeneratedCode/Payloads.cs
@@ -10071,6 +10071,11 @@ namespace PokemonGo.RocketAPI.GeneratedCode
set { fromFort_ = value; }
}
+ public float GetIV()
+ {
+ return ((float)(IndividualAttack + IndividualDefense + IndividualStamina) / (45.0f));
+ }
+
pbr::MessageDescriptor pb::IMessage.Descriptor
{
get { return Descriptor; }
diff --git a/PokemonGo/RocketAPI/ISettings.cs b/PokemonGo/RocketAPI/ISettings.cs
index edec062..9fc20db 100644
--- a/PokemonGo/RocketAPI/ISettings.cs
+++ b/PokemonGo/RocketAPI/ISettings.cs
@@ -18,14 +18,11 @@ namespace PokemonGo.RocketAPI
string GoogleRefreshToken { get; set; }
string PtcPassword { get; }
string PtcUsername { get; }
- string Email { get; }
- string Password { get; }
bool EvolveAllGivenPokemons { get; }
string TransferType { get; }
int TransferCPThreshold { get; }
int TransferIVThreshold { get; }
int TravelSpeed { get; }
- int ImageSize { get; }
bool Recycler { get; }
ICollection<KeyValuePair<AllEnum.ItemId, int>> ItemRecycleFilter { get; }
int RecycleItemsInterval { get; }
diff --git a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
index abde253..71e4fbd 100644
--- a/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
+++ b/PokemonGo/RocketAPI/PokemonGo.RocketAPI.csproj
@@ -44,7 +44,7 @@
<Private>True</Private>
</Reference>
<Reference Include="S2Geometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\..\packages\S2Geometry.1.0.1\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
+ <HintPath>..\..\packages\S2Geometry.1.0.3\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
diff --git a/PokemonGo/RocketAPI/Window/App.config b/PokemonGo/RocketAPI/Window/App.config
index a3cf5c7..6a36abc 100644
--- a/PokemonGo/RocketAPI/Window/App.config
+++ b/PokemonGo/RocketAPI/Window/App.config
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
@@ -18,14 +18,10 @@
<!--Username-->
<add key="PtcPassword" value="" />
<!--Password-->
- <add key="Email" value="" />
- <!--Google E-mail-->
- <add key="Password" value="" />
- <!--E-mail Password-->
<add key="GoogleRefreshToken" value="" />
- <add key="DefaultLatitude" value="-36.714359" />
+ <add key="DefaultLatitude" value="-34.915866" />
<!--Default Viaduct Harbour, Auckland, New Zealand-->
- <add key="DefaultLongitude" value="174.747205" />
+ <add key="DefaultLongitude" value="138.59798" />
<!--Default Viaduct Harbour, Auckland, New Zealand-->
<add key="LevelOutput" value="levelup" />
<!--2 Modes: "time": Every XXX seconds and "levelup" every levelup-->
@@ -41,19 +37,28 @@
<!--When to use RazzBerry cp/probability-->
<add key="RazzBerrySetting" value="0.4" />
<!--Cp Mode: Use RazzBerry when Pokemon is over this value; pobability Mode: Use Razzberry when % between 0 and 1 of catching is under this value-->
- <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" />
+ <add key="TransferType" value="Leave Strongest" />
+ <!--none/cp/leaveStrongest/duplicate/all Whitelists/blackslists for each type is in Program.cs-->
+ <add key="TransferCPThreshold" value="500" />
<!--transfer pokemon with CP less than this value if cp transfer type is selected. Whitelist in Program.cs-->
<add key="TransferIVThreshold" value="0" />
<!--transfer pokemon with IV less than this value if iv transfer type is selected. Whitelist in Program.cs-->
- <add key="TravelSpeed" value="60"/>
+ <add key="TravelSpeed" value="60" />
<!--The speed to travel in km/h-->
- <add key="ImageSize" value="50"/>
- <!--PokeUi image size-->
- <add key="CatchPokemon" value="true"/>
+ <add key="CatchPokemon" value="true" />
<!--Only visit pokestop and collect items-->
<add key="EvolveAllGivenPokemons" value="false" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
+
+ <add key="MaxItemPokeBall" value="100"/>
+ <add key="MaxItemGreatBall" value="100"/>
+ <add key="MaxItemUltraBall" value="100"/>
+ <add key="MaxItemMasterBall" value="200"/>
+ <add key="MaxItemRazzBerry" value="100"/>
+ <add key="MaxItemRevive" value="20"/>
+ <add key="MaxItemPotion" value="0"/>
+ <add key="MaxItemSuperPotion" value="0"/>
+ <add key="MaxItemHyperPotion" value="50"/>
+ <add key="MaxItemMaxPotion" value="100"/>
</appSettings>
</configuration>
diff --git a/PokemonGo/RocketAPI/Window/LocationManager.cs b/PokemonGo/RocketAPI/Window/LocationManager.cs
index 065febc..46a3b57 100644
--- a/PokemonGo/RocketAPI/Window/LocationManager.cs
+++ b/PokemonGo/RocketAPI/Window/LocationManager.cs
@@ -46,14 +46,12 @@ namespace PokemonGo.RocketAPI.Window
{
double R = 6371;
Func<double, double> toRad = x => x * (Math.PI / 180);
- double dLat = toRad(c2.latitude - this.latitude);
- double dLong = toRad(c2.longitude - c2.longitude);
+
double lat1 = toRad(this.latitude);
double lat2 = toRad(c2.latitude);
- double a = Math.Sin(dLat / 2) * Math.Sin(dLat / 2) +
- Math.Sin(dLong / 2) * Math.Sin(dLong / 2) * Math.Cos(lat1) * Math.Cos(lat2);
- double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));
- return R * c;
+ double dLng = toRad(c2.longitude - c2.longitude);
+
+ return Math.Acos(Math.Sin(lat1) * Math.Sin(lat2) + Math.Cos(lat1) * Math.Cos(lat2) * Math.Cos(dLng)) * R;
}
}
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
index a41b76d..534c29e 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
@@ -1,4 +1,4 @@
-namespace PokemonGo.RocketAPI.Window
+namespace PokemonGo.RocketAPI.Window
{
partial class MainForm
{
@@ -28,108 +28,111 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.logTextBox = new System.Windows.Forms.RichTextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.statusLabel = new System.Windows.Forms.ToolStripStatusLabel();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
- this.startBotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.mapToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.startStopBotToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.todoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
- this.pokemonToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.useLuckyEggToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.forceUnbanToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showAllToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+ this.gMapControl1 = new GMap.NET.WindowsForms.GMapControl();
+ this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
+ this.pkmnName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnCP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnAtkIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnDefIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnStaIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnTransferButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnPowerUpButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnEvolveButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.largePokemonImageList = new System.Windows.Forms.ImageList(this.components);
+ this.smallPokemonImageList = new System.Windows.Forms.ImageList(this.components);
+ this.button1 = new System.Windows.Forms.Button();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
this.SuspendLayout();
//
// logTextBox
//
this.logTextBox.BackColor = System.Drawing.Color.Black;
- this.logTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.logTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
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.ImeMode = System.Windows.Forms.ImeMode.Off;
- this.logTextBox.Location = new System.Drawing.Point(0, 24);
+ this.logTextBox.Location = new System.Drawing.Point(0, 32);
+ this.logTextBox.Margin = new System.Windows.Forms.Padding(4);
this.logTextBox.Name = "logTextBox";
this.logTextBox.ReadOnly = true;
- this.logTextBox.Size = new System.Drawing.Size(905, 471);
+ this.logTextBox.Size = new System.Drawing.Size(720, 450);
this.logTextBox.TabIndex = 0;
this.logTextBox.Text = "";
this.logTextBox.TextChanged += new System.EventHandler(this.logTextBox_TextChanged);
//
// statusStrip1
//
+ this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
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, 824);
this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(905, 22);
+ this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 19, 0);
+ this.statusStrip1.Size = new System.Drawing.Size(1178, 25);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
// statusLabel
//
this.statusLabel.Name = "statusLabel";
- this.statusLabel.Size = new System.Drawing.Size(39, 17);
+ this.statusLabel.Size = new System.Drawing.Size(49, 20);
this.statusLabel.Text = "Status";
//
// menuStrip1
//
+ this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.startBotToolStripMenuItem,
- this.mapToolStripMenuItem,
+ this.startStopBotToolStripMenuItem,
this.todoToolStripMenuItem,
- this.pokemonToolStripMenuItem2,
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.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
+ this.menuStrip1.Size = new System.Drawing.Size(1178, 28);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
- // startBotToolStripMenuItem
+ // startStopBotToolStripMenuItem
//
- this.startBotToolStripMenuItem.Name = "startBotToolStripMenuItem";
- this.startBotToolStripMenuItem.Size = new System.Drawing.Size(64, 20);
- this.startBotToolStripMenuItem.Text = "Start Bot";
- this.startBotToolStripMenuItem.Click += new System.EventHandler(this.startBotToolStripMenuItem_Click);
- //
- // mapToolStripMenuItem
- //
- this.mapToolStripMenuItem.Name = "mapToolStripMenuItem";
- this.mapToolStripMenuItem.Size = new System.Drawing.Size(43, 20);
- this.mapToolStripMenuItem.Text = "Map";
- this.mapToolStripMenuItem.Click += new System.EventHandler(this.mapToolStripMenuItem_Click);
+ this.startStopBotToolStripMenuItem.Name = "startStopBotToolStripMenuItem";
+ this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(79, 24);
+ this.startStopBotToolStripMenuItem.Text = "Start Bot";
+ this.startStopBotToolStripMenuItem.Click += new System.EventHandler(this.startStopBotToolStripMenuItem_Click);
//
// todoToolStripMenuItem
//
this.todoToolStripMenuItem.Name = "todoToolStripMenuItem";
- this.todoToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
+ this.todoToolStripMenuItem.Size = new System.Drawing.Size(74, 24);
this.todoToolStripMenuItem.Text = "Settings";
this.todoToolStripMenuItem.Click += new System.EventHandler(this.todoToolStripMenuItem_Click);
//
- // pokemonToolStripMenuItem2
- //
- this.pokemonToolStripMenuItem2.Name = "pokemonToolStripMenuItem2";
- this.pokemonToolStripMenuItem2.Size = new System.Drawing.Size(70, 20);
- this.pokemonToolStripMenuItem2.Text = "Pokemon";
- this.pokemonToolStripMenuItem2.Click += new System.EventHandler(this.pokemonToolStripMenuItem2_Click);
- //
// useLuckyEggToolStripMenuItem
//
this.useLuckyEggToolStripMenuItem.Name = "useLuckyEggToolStripMenuItem";
- this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(95, 20);
+ this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(115, 24);
this.useLuckyEggToolStripMenuItem.Text = "Use Lucky Egg";
this.useLuckyEggToolStripMenuItem.Click += new System.EventHandler(this.useLuckyEggToolStripMenuItem_Click);
//
// forceUnbanToolStripMenuItem
//
this.forceUnbanToolStripMenuItem.Name = "forceUnbanToolStripMenuItem";
- this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(86, 20);
+ this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(104, 24);
this.forceUnbanToolStripMenuItem.Text = "Force Unban";
this.forceUnbanToolStripMenuItem.Click += new System.EventHandler(this.forceUnbanToolStripMenuItem_Click);
//
@@ -143,24 +146,185 @@
this.showAllToolStripMenuItem1.Name = "showAllToolStripMenuItem1";
this.showAllToolStripMenuItem1.Size = new System.Drawing.Size(32, 19);
//
+ // gMapControl1
+ //
+ this.gMapControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.gMapControl1.Bearing = 0F;
+ this.gMapControl1.CanDragMap = true;
+ this.gMapControl1.EmptyTileColor = System.Drawing.Color.Navy;
+ this.gMapControl1.GrayScaleMode = false;
+ this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
+ this.gMapControl1.LevelsKeepInMemmory = 5;
+ this.gMapControl1.Location = new System.Drawing.Point(728, 32);
+ this.gMapControl1.Margin = new System.Windows.Forms.Padding(4);
+ this.gMapControl1.MarkersEnabled = true;
+ this.gMapControl1.MaxZoom = 2;
+ this.gMapControl1.MinZoom = 2;
+ this.gMapControl1.MouseWheelZoomType = GMap.NET.MouseWheelZoomType.MousePositionAndCenter;
+ this.gMapControl1.Name = "gMapControl1";
+ this.gMapControl1.NegativeMode = false;
+ this.gMapControl1.PolygonsEnabled = true;
+ this.gMapControl1.RetryLoadTile = 0;
+ this.gMapControl1.RoutesEnabled = true;
+ this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
+ this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
+ this.gMapControl1.ShowTileGridLines = false;
+ this.gMapControl1.Size = new System.Drawing.Size(450, 450);
+ this.gMapControl1.TabIndex = 23;
+ this.gMapControl1.Zoom = 0D;
+ //
+ // objectListView1
+ //
+ this.objectListView1.AllColumns.Add(this.pkmnName);
+ this.objectListView1.AllColumns.Add(this.pkmnCP);
+ this.objectListView1.AllColumns.Add(this.pkmnAtkIV);
+ this.objectListView1.AllColumns.Add(this.pkmnDefIV);
+ this.objectListView1.AllColumns.Add(this.pkmnStaIV);
+ this.objectListView1.AllColumns.Add(this.pkmnIV);
+ this.objectListView1.AllColumns.Add(this.pkmnTransferButton);
+ this.objectListView1.AllColumns.Add(this.pkmnPowerUpButton);
+ this.objectListView1.AllColumns.Add(this.pkmnEvolveButton);
+ this.objectListView1.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.objectListView1.CellEditUseWholeCell = false;
+ this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.pkmnName,
+ this.pkmnCP,
+ this.pkmnAtkIV,
+ this.pkmnDefIV,
+ this.pkmnStaIV,
+ this.pkmnIV,
+ this.pkmnTransferButton,
+ this.pkmnPowerUpButton,
+ this.pkmnEvolveButton});
+ this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
+ this.objectListView1.FullRowSelect = true;
+ this.objectListView1.GridLines = true;
+ this.objectListView1.LargeImageList = this.largePokemonImageList;
+ this.objectListView1.Location = new System.Drawing.Point(0, 490);
+ this.objectListView1.Margin = new System.Windows.Forms.Padding(4);
+ this.objectListView1.MultiSelect = false;
+ this.objectListView1.Name = "objectListView1";
+ this.objectListView1.RowHeight = 32;
+ this.objectListView1.ShowGroups = false;
+ this.objectListView1.Size = new System.Drawing.Size(1177, 285);
+ this.objectListView1.SmallImageList = this.smallPokemonImageList;
+ this.objectListView1.TabIndex = 25;
+ this.objectListView1.UseCompatibleStateImageBehavior = false;
+ this.objectListView1.View = System.Windows.Forms.View.Details;
+ //
+ // pkmnName
+ //
+ this.pkmnName.AspectName = "PokemonId";
+ this.pkmnName.AspectToStringFormat = "";
+ this.pkmnName.Text = "Name";
+ this.pkmnName.Width = 130;
+ //
+ // pkmnCP
+ //
+ this.pkmnCP.AspectName = "Cp";
+ this.pkmnCP.Text = "CP";
+ //
+ // pkmnAtkIV
+ //
+ this.pkmnAtkIV.AspectName = "IndividualAttack";
+ this.pkmnAtkIV.Text = "Attack IV";
+ this.pkmnAtkIV.Width = 70;
+ //
+ // pkmnDefIV
+ //
+ this.pkmnDefIV.AspectName = "IndividualDefense";
+ this.pkmnDefIV.Text = "Defense IV";
+ this.pkmnDefIV.Width = 70;
+ //
+ // pkmnStaIV
+ //
+ this.pkmnStaIV.AspectName = "IndividualStamina";
+ this.pkmnStaIV.Text = "Stamina IV";
+ this.pkmnStaIV.Width = 70;
+ //
+ // pkmnIV
+ //
+ this.pkmnIV.AspectName = "GetIV";
+ this.pkmnIV.AspectToStringFormat = "{0:P2}";
+ this.pkmnIV.Text = "Perfection";
+ //
+ // pkmnTransferButton
+ //
+ this.pkmnTransferButton.AspectName = "Id";
+ this.pkmnTransferButton.AspectToStringFormat = "Transfer";
+ this.pkmnTransferButton.ButtonSizing = BrightIdeasSoftware.OLVColumn.ButtonSizingMode.CellBounds;
+ this.pkmnTransferButton.IsButton = true;
+ this.pkmnTransferButton.Text = "";
+ //
+ // pkmnPowerUpButton
+ //
+ this.pkmnPowerUpButton.AspectName = "Id";
+ this.pkmnPowerUpButton.AspectToStringFormat = "Power Up";
+ this.pkmnPowerUpButton.ButtonSizing = BrightIdeasSoftware.OLVColumn.ButtonSizingMode.CellBounds;
+ this.pkmnPowerUpButton.IsButton = true;
+ this.pkmnPowerUpButton.Text = "";
+ //
+ // pkmnEvolveButton
+ //
+ this.pkmnEvolveButton.AspectName = "Id";
+ this.pkmnEvolveButton.AspectToStringFormat = "Evolve";
+ this.pkmnEvolveButton.IsButton = true;
+ this.pkmnEvolveButton.Text = "";
+ //
+ // largePokemonImageList
+ //
+ this.largePokemonImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.largePokemonImageList.ImageSize = new System.Drawing.Size(96, 96);
+ this.largePokemonImageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // smallPokemonImageList
+ //
+ this.smallPokemonImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
+ this.smallPokemonImageList.ImageSize = new System.Drawing.Size(32, 32);
+ this.smallPokemonImageList.TransparentColor = System.Drawing.Color.Transparent;
+ //
+ // 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(0, 784);
+ this.button1.Margin = new System.Windows.Forms.Padding(4);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(1178, 34);
+ this.button1.TabIndex = 26;
+ this.button1.Text = "Refresh";
+ this.button1.UseVisualStyleBackColor = true;
+ this.button1.Click += new System.EventHandler(this.button1_Click);
+ //
// MainForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(905, 517);
+ this.ClientSize = new System.Drawing.Size(1178, 849);
+ this.Controls.Add(this.gMapControl1);
this.Controls.Add(this.logTextBox);
+ this.Controls.Add(this.button1);
+ this.Controls.Add(this.objectListView1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.MaximizeBox = false;
this.Name = "MainForm";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "PokemonGo Rocket API";
this.Load += new System.EventHandler(this.MainForm_Load);
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -173,12 +337,24 @@
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem todoToolStripMenuItem;
private System.Windows.Forms.ToolStripStatusLabel statusLabel;
- private System.Windows.Forms.ToolStripMenuItem startBotToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem startStopBotToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showAllToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem showAllToolStripMenuItem1;
- private System.Windows.Forms.ToolStripMenuItem pokemonToolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem useLuckyEggToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem forceUnbanToolStripMenuItem;
- private System.Windows.Forms.ToolStripMenuItem mapToolStripMenuItem;
+ private GMap.NET.WindowsForms.GMapControl gMapControl1;
+ private BrightIdeasSoftware.ObjectListView objectListView1;
+ private BrightIdeasSoftware.OLVColumn pkmnName;
+ private BrightIdeasSoftware.OLVColumn pkmnCP;
+ private BrightIdeasSoftware.OLVColumn pkmnAtkIV;
+ private BrightIdeasSoftware.OLVColumn pkmnDefIV;
+ private BrightIdeasSoftware.OLVColumn pkmnStaIV;
+ private BrightIdeasSoftware.OLVColumn pkmnIV;
+ private BrightIdeasSoftware.OLVColumn pkmnTransferButton;
+ private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.ImageList smallPokemonImageList;
+ private System.Windows.Forms.ImageList largePokemonImageList;
+ private BrightIdeasSoftware.OLVColumn pkmnPowerUpButton;
+ private BrightIdeasSoftware.OLVColumn pkmnEvolveButton;
}
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs
index fa85042..81fb192 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.cs
@@ -18,26 +18,86 @@ using PokemonGo.RocketAPI.Enums;
using PokemonGo.RocketAPI.Exceptions;
using PokemonGo.RocketAPI.Extensions;
using PokemonGo.RocketAPI.GeneratedCode;
+using System.Configuration;
+using GMap.NET;
+using GMap.NET.MapProviders;
+using GMap.NET.WindowsForms;
+using GMap.NET.WindowsForms.Markers;
+using GMap.NET.WindowsForms.ToolTips;
+using System.Threading;
+using BrightIdeasSoftware;
+using PokemonGo.RocketAPI.Helpers;
namespace PokemonGo.RocketAPI.Window
{
public partial class MainForm : Form
{
+ public static MainForm Instance;
+ public static SynchronizationContext synchronizationContext;
+
+ GMapOverlay searchAreaOverlay = new GMapOverlay("areas");
+ GMapOverlay pokestopsOverlay = new GMapOverlay("pokestops");
+ GMapOverlay pokemonsOverlay = new GMapOverlay("pokemons");
+ GMapOverlay playerOverlay = new GMapOverlay("players");
+
+ GMarkerGoogle playerMarker;
+
+ IEnumerable<FortData> pokeStops;
+ IEnumerable<WildPokemon> wildPokemons;
+
public MainForm()
{
InitializeComponent();
+ synchronizationContext = SynchronizationContext.Current;
ClientSettings = Settings.Instance;
+ Client.OnConsoleWrite += Client_OnConsoleWrite;
+ Instance = this;
}
private void MainForm_Load(object sender, EventArgs e)
{
+ gMapControl1.MapProvider = GoogleMapProvider.Instance;
+ gMapControl1.Manager.Mode = AccessMode.ServerOnly;
+ GMapProvider.WebProxy = null;
+ gMapControl1.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
+ gMapControl1.DragButton = MouseButtons.Left;
+
+ gMapControl1.MinZoom = 1;
+ gMapControl1.MaxZoom = 20;
+ gMapControl1.Zoom = 15;
+
+ gMapControl1.Overlays.Add(searchAreaOverlay);
+ gMapControl1.Overlays.Add(pokestopsOverlay);
+ gMapControl1.Overlays.Add(pokemonsOverlay);
+ gMapControl1.Overlays.Add(playerOverlay);
+
+ playerMarker = new GMarkerGoogle(new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude),
+ GMarkerGoogleType.orange_small);
+ playerOverlay.Markers.Add(playerMarker);
+
+ InitializeMap();
+ InitializePokemonForm();
+ }
+
+ public void Restart()
+ {
+ InitializeMap();
+ InitializePokemonForm();
+ }
+
+ private void InitializeMap()
+ {
+ playerMarker.Position = new PointLatLng(ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude);
+ searchAreaOverlay.Polygons.Clear();
+ S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), searchAreaOverlay);
}
public static ISettings ClientSettings;
private static int Currentlevel = -1;
private static int TotalExperience = 0;
private static int TotalPokemon = 0;
+ private static bool Stopping = false;
private static bool ForceUnbanning = false;
private static bool FarmingStops = false;
private static bool FarmingPokemons = false;
@@ -46,6 +106,7 @@ namespace PokemonGo.RocketAPI.Window
Client client;
+ Client client2;
LocationManager locationManager;
public static double GetRuntime()
{
@@ -110,6 +171,17 @@ namespace PokemonGo.RocketAPI.Window
}
}
+ public void ConsoleClear()
+ {
+ if (InvokeRequired)
+ {
+ Invoke(new Action(ConsoleClear));
+ return;
+ }
+
+ logTextBox.Clear();
+ }
+
public void SetStatusText(string text)
{
if (InvokeRequired)
@@ -184,24 +256,32 @@ namespace PokemonGo.RocketAPI.Window
private async void Execute()
{
- client = new Client(ClientSettings);
- this.locationManager = new LocationManager(client, ClientSettings.TravelSpeed);
+ if (client == null)
+ {
+ client = new Client(ClientSettings);
+ this.locationManager = new LocationManager(client, ClientSettings.TravelSpeed);
+ }
try
{
- switch (ClientSettings.AuthType)
+ if (!client.HasServerSet())
{
- case AuthType.Ptc:
- ColoredConsoleWrite(Color.Green, "Login Type: Pokemon Trainers Club");
- await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
- break;
- case AuthType.Google:
- ColoredConsoleWrite(Color.Green, "Login Type: Google");
- await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
+ switch (ClientSettings.AuthType)
+ {
+ case AuthType.Ptc:
+ ColoredConsoleWrite(Color.Green, "Login Type: Pokemon Trainers Club");
+ await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
+ break;
+ case AuthType.Google:
+ 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;
+ }
- break;
+ await client.SetServer();
}
-
- await client.SetServer();
var profile = await client.GetProfile();
var settings = await client.GetSettings();
var mapObjects = await client.GetMapObjects();
@@ -284,17 +364,31 @@ namespace PokemonGo.RocketAPI.Window
await Task.Delay(25);
// await ForceUnban(client);
- ColoredConsoleWrite(Color.Red, $"No nearby useful locations found. Please wait 10 seconds.");
- await Task.Delay(10000);
- CheckVersion();
- Execute();
+ if (!Stopping)
+ {
+ ColoredConsoleWrite(Color.Red, $"No nearby useful locations found. Please wait 10 seconds.");
+ await Task.Delay(10000);
+ CheckVersion();
+ Execute();
+ }
+ else
+ {
+ ConsoleClear();
+ ColoredConsoleWrite(Color.Red, $"Bot successfully stopped.");
+ startStopBotToolStripMenuItem.Text = "Start";
+ Stopping = false;
+ bot_started = false;
+ }
+ }
+ catch (Exception ex)
+ {
+ ColoredConsoleWrite(Color.Red, ex.ToString());
+ if (!Stopping)
+ {
+ client = null;
+ Execute();
+ }
}
- catch (TaskCanceledException) { ColoredConsoleWrite(Color.Red, "Task Canceled Exception - Restarting"); Execute(); }
- catch (UriFormatException) { ColoredConsoleWrite(Color.Red, "System URI Format Exception - Restarting"); Execute(); }
- catch (ArgumentOutOfRangeException) { ColoredConsoleWrite(Color.Red, "ArgumentOutOfRangeException - Restarting"); Execute(); }
- catch (ArgumentNullException) { ColoredConsoleWrite(Color.Red, "Argument Null Refference - Restarting"); Execute(); }
- catch (NullReferenceException) { ColoredConsoleWrite(Color.Red, "Null Refference - Restarting"); Execute(); }
- catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); Execute(); }
}
private static string CallAPI(string elem, double lat, double lon)
@@ -342,16 +436,32 @@ namespace PokemonGo.RocketAPI.Window
foreach (var pokemon in pokemons)
{
- if (ForceUnbanning)
+ if (ForceUnbanning || Stopping)
break;
FarmingPokemons = true;
await locationManager.update(pokemon.Latitude, pokemon.Longitude);
+
+ string pokemonName;
+ if (ClientSettings.Language == "german")
+ {
+ string name_english = Convert.ToString(pokemon.PokemonId);
+ var request = (HttpWebRequest)WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" + name_english);
+ var response = (HttpWebResponse)request.GetResponse();
+ pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
+ }
+ else
+ pokemonName = Convert.ToString(pokemon.PokemonId);
+
+ await client.UpdatePlayerLocation(pokemon.Latitude, pokemon.Longitude);
+ UpdatePlayerLocation(pokemon.Latitude, pokemon.Longitude);
+ UpdateMap();
var encounterPokemonResponse = await client.EncounterPokemon(pokemon.EncounterId, pokemon.SpawnpointId);
var pokemonCP = encounterPokemonResponse?.WildPokemon?.PokemonData?.Cp;
- var pokemonIV = Math.Round(Perfect(encounterPokemonResponse?.WildPokemon?.PokemonData));
+ var pokemonIV = Math.Round((double)encounterPokemonResponse?.WildPokemon?.PokemonData.GetIV() * 100);
CatchPokemonResponse caughtPokemonResponse;
+ ColoredConsoleWrite(Color.Green, $"Encounter a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
do
{
if (ClientSettings.RazzBerryMode == "cp")
@@ -363,20 +473,14 @@ namespace PokemonGo.RocketAPI.Window
caughtPokemonResponse = await client.CatchPokemon(pokemon.EncounterId, pokemon.SpawnpointId, pokemon.Latitude, pokemon.Longitude, MiscEnums.Item.ITEM_POKE_BALL, pokemonCP); ; //note: reverted from settings because this should not be part of settings but part of logic
} while (caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchMissed || caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchEscape);
- string pokemonName;
- if (ClientSettings.Language == "german")
- {
- string name_english = Convert.ToString(pokemon.PokemonId);
- var request = (HttpWebRequest)WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" + name_english);
- var response = (HttpWebResponse)request.GetResponse();
- pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
- }
- else
- pokemonName = Convert.ToString(pokemon.PokemonId);
-
if (caughtPokemonResponse.Status == CatchPokemonResponse.Types.CatchStatus.CatchSuccess)
{
- ColoredConsoleWrite(Color.Green, $"We caught a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
+ Color c = Color.LimeGreen;
+ if (pokemonIV >= 80)
+ {
+ c = Color.Yellow;
+ }
+ ColoredConsoleWrite(c, $"We caught a {pokemonName} with {pokemonCP} CP and {pokemonIV}% IV");
foreach (int xp in caughtPokemonResponse.Scores.Xp)
TotalExperience += xp;
TotalPokemon += 1;
@@ -414,31 +518,85 @@ namespace PokemonGo.RocketAPI.Window
FarmingPokemons = false;
await Task.Delay(3000);
}
+ pokemons = null;
}
- private async Task ExecuteFarmingPokestopsAndPokemons(Client client, IEnumerable<FortData> pokeStops = null)
+ private void UpdatePlayerLocation(double latitude, double longitude)
{
- var mapObjects = await client.GetMapObjects();
- if (pokeStops == null)
+ synchronizationContext.Post(new SendOrPostCallback(o =>
{
- pokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime());
- }
- HashSet<FortData> pokeStopSet = new HashSet<FortData>(pokeStops);
- IEnumerable<FortData> nextPokeStopList = null;
- if (!ForceUnbanning)
+ playerMarker.Position = (PointLatLng)o;
+
+ searchAreaOverlay.Polygons.Clear();
+
+ }), new PointLatLng(latitude, longitude));
+
+ ColoredConsoleWrite(Color.Cyan, $"Moving player location to Lat: {latitude}, Lng: {longitude}");
+ }
+
+ private void UpdateMap()
+ {
+ synchronizationContext.Post(new SendOrPostCallback(o =>
+ {
+ pokestopsOverlay.Markers.Clear();
+ List<PointLatLng> routePoint = new List<PointLatLng>();
+ foreach (var pokeStop in pokeStops)
+ {
+ GMarkerGoogleType type = GMarkerGoogleType.blue_small;
+ if (pokeStop.CooldownCompleteTimestampMs > DateTime.UtcNow.ToUnixTime())
+ {
+ type = GMarkerGoogleType.gray_small;
+ }
+ var pokeStopLoc = new PointLatLng(pokeStop.Latitude, pokeStop.Longitude);
+ var pokestopMarker = new GMarkerGoogle(pokeStopLoc, type);
+ //pokestopMarker.ToolTipMode = MarkerTooltipMode.OnMouseOver;
+ //pokestopMarker.ToolTip = new GMapBaloonToolTip(pokestopMarker);
+ pokestopsOverlay.Markers.Add(pokestopMarker);
+
+ routePoint.Add(pokeStopLoc);
+ }
+ pokestopsOverlay.Routes.Clear();
+ pokestopsOverlay.Routes.Add(new GMapRoute(routePoint, "Walking Path"));
+
+
+ pokemonsOverlay.Markers.Clear();
+ if (wildPokemons != null)
+ {
+ foreach (var pokemon in wildPokemons)
+ {
+ var pokemonMarker = new GMarkerGoogle(new PointLatLng(pokemon.Latitude, pokemon.Longitude),
+ GMarkerGoogleType.red_small);
+ pokemonsOverlay.Markers.Add(pokemonMarker);
+ }
+ }
+
+ S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(ClientSettings.DefaultLongitude, ClientSettings.DefaultLatitude), searchAreaOverlay);
+ }), null);
+ }
+
+ private async Task ExecuteFarmingPokestopsAndPokemons(Client client)
+ {
+ var mapObjects = await client.GetMapObjects();
+
+ FortData[] rawPokeStops = mapObjects.MapCells.SelectMany(i => i.Forts).Where(i => i.Type == FortType.Checkpoint).ToArray();
+ pokeStops = PokeStopOptimizer.Optimize(rawPokeStops, ClientSettings.DefaultLatitude, ClientSettings.DefaultLongitude, pokestopsOverlay);
+ wildPokemons = mapObjects.MapCells.SelectMany(i => i.WildPokemons);
+ if (!ForceUnbanning && !Stopping)
ColoredConsoleWrite(Color.Cyan, $"Visiting {pokeStops.Count()} PokeStops");
+ UpdateMap();
+
foreach (var pokeStop in pokeStops)
{
- if (ForceUnbanning)
+ if (ForceUnbanning || Stopping)
break;
FarmingStops = true;
-
- double pokeStopDistance = locationManager.getDistance(pokeStop.Latitude, pokeStop.Longitude);
await locationManager.update(pokeStop.Latitude, pokeStop.Longitude);
+ UpdatePlayerLocation(pokeStop.Latitude, pokeStop.Longitude);
+ UpdateMap();
+
var fortInfo = await client.GetFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
var fortSearch = await client.SearchFort(pokeStop.Id, pokeStop.Latitude, pokeStop.Longitude);
-
StringWriter PokeStopOutput = new StringWriter();
PokeStopOutput.Write($"");
if (fortInfo.Name != string.Empty)
@@ -456,37 +614,20 @@ 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
- * traversed and which are ready to be farmed again. */
- var pokeStopsNearPokeStop = pokeStopMapObjects.MapCells.SelectMany(i => i.Forts).Where(i =>
- i.Type == FortType.Checkpoint
- && i.CooldownCompleteTimestampMs < DateTime.UtcNow.ToUnixTime()
- && !pokeStopSet.Contains(i)
- );
-
- /* We choose the longest list of farmable PokeStops to traverse next, though we could use a different
- * criterion, such as the number of PokeStops with lures in the list.*/
- if (pokeStopsNearPokeStop.Count() > (nextPokeStopList == null ? 0 : nextPokeStopList.Count()))
- {
- nextPokeStopList = pokeStopsNearPokeStop;
- }
-
+ pokeStop.CooldownCompleteTimestampMs = DateTime.UtcNow.ToUnixTime() + 300000;
+
if (ClientSettings.CatchPokemon)
await ExecuteCatchAllNearbyPokemons(client);
}
FarmingStops = false;
- if (nextPokeStopList != null)
- {
- client.RecycleItems(client);
- await ExecuteFarmingPokestopsAndPokemons(client, nextPokeStopList);
- }
+
+ client.RecycleItems(client);
+ await ExecuteFarmingPokestopsAndPokemons(client);
}
private async Task ForceUnban(Client client)
{
- if (!ForceUnbanning)
+ if (!ForceUnbanning && !Stopping)
{
ColoredConsoleWrite(Color.LightGreen, "Waiting for last farming action to be complete...");
ForceUnbanning = true;
@@ -539,7 +680,7 @@ namespace PokemonGo.RocketAPI.Window
}
else
{
- ColoredConsoleWrite(Color.Red, "A force unban attempt is in action... Please wait.");
+ ColoredConsoleWrite(Color.Red, "A action is in play... Please wait.");
}
@@ -561,39 +702,12 @@ namespace PokemonGo.RocketAPI.Window
private async Task TransferAllButStrongestUnwantedPokemon(Client client)
{
- //ColoredConsoleWrite(ConsoleColor.White, $"Firing up the meat grinder");
-
- var unwantedPokemonTypes = new[]
+ var unwantedPokemonTypes = new List<PokemonId>();
+ for (int i = 1; i <= 151; i++)
{
- PokemonId.Pidgey,
- PokemonId.Rattata,
- PokemonId.Weedle,
- PokemonId.Zubat,
- PokemonId.Caterpie,
- PokemonId.Pidgeotto,
- PokemonId.NidoranFemale,
- PokemonId.Paras,
- PokemonId.Venonat,
- PokemonId.Psyduck,
- PokemonId.Poliwag,
- PokemonId.Slowpoke,
- PokemonId.Drowzee,
- PokemonId.Gastly,
- PokemonId.Goldeen,
- PokemonId.Staryu,
- PokemonId.Magikarp,
- PokemonId.Clefairy,
- PokemonId.Eevee,
- PokemonId.Tentacool,
- PokemonId.Dratini,
- PokemonId.Ekans,
- PokemonId.Jynx,
- PokemonId.Lickitung,
- PokemonId.Spearow,
- PokemonId.NidoranFemale,
- PokemonId.NidoranMale
- };
-
+ unwantedPokemonTypes.Add((PokemonId)i);
+ }
+
var inventory = await client.GetInventory();
var pokemons = inventory.InventoryDelta.InventoryItems
.Select(i => i.InventoryItemData?.Pokemon)
@@ -609,25 +723,17 @@ namespace PokemonGo.RocketAPI.Window
var unwantedPokemon =
pokemonOfDesiredType.Skip(1) // keep the strongest one for potential battle-evolving
.ToList();
-
- //ColoredConsoleWrite(ConsoleColor.White, $"Grinding {unwantedPokemon.Count} pokemons of type {unwantedPokemonType}");
+
await TransferAllGivenPokemons(client, unwantedPokemon);
}
-
- //ColoredConsoleWrite(ConsoleColor.White, $"Finished grinding all the meat");
}
- public static float Perfect(PokemonData poke)
- {
- return ((float)(poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina) / (3.0f * 15.0f)) * 100.0f;
- }
-
- private async Task TransferAllGivenPokemons(Client client, IEnumerable<PokemonData> unwantedPokemons, float keepPerfectPokemonLimit = 80.0f)
+ private async Task TransferAllGivenPokemons(Client client, IEnumerable<PokemonData> unwantedPokemons, float keepPerfectPokemonLimit = 0.8f)
{
foreach (var pokemon in unwantedPokemons)
{
- if (Perfect(pokemon) >= keepPerfectPokemonLimit) continue;
- ColoredConsoleWrite(Color.White, $"Pokemon {pokemon.PokemonId} with {pokemon.Cp} CP has IV percent less than {keepPerfectPokemonLimit}%");
+ if (pokemon.GetIV() >= keepPerfectPokemonLimit) continue;
+ ColoredConsoleWrite(Color.White, $"Pokemon {pokemon.PokemonId} with {pokemon.Cp} CP has IV percent less than {keepPerfectPokemonLimit * 100}%");
if (pokemon.Favorite == 0)
{
@@ -718,7 +824,7 @@ namespace PokemonGo.RocketAPI.Window
inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Pokemon)
.Where(p => p != null && p?.PokemonId > 0);
- var dupes = allpokemons.OrderBy(x => Perfect(x)).Select((x, i) => new { index = i, value = x })
+ var dupes = allpokemons.OrderBy(x => x.GetIV()).Select((x, i) => new { index = i, value = x })
.GroupBy(x => x.value.PokemonId)
.Where(x => x.Skip(1).Any());
@@ -741,7 +847,7 @@ namespace PokemonGo.RocketAPI.Window
else
pokemonName = Convert.ToString(dubpokemon.PokemonId);
ColoredConsoleWrite(Color.DarkGreen,
- $"Transferred {pokemonName} with {Math.Round(Perfect(dubpokemon))}% IV (Highest is {Math.Round(Perfect(dupes.ElementAt(i).Last().value))}% IV)");
+ $"Transferred {pokemonName} with {Math.Round(dubpokemon.GetIV() * 100)}% IV (Highest is {Math.Round(dupes.ElementAt(i).Last().value.GetIV() * 100)}% IV)");
}
}
@@ -945,26 +1051,58 @@ namespace PokemonGo.RocketAPI.Window
settingsForm.Show();
}
- private void startBotToolStripMenuItem_Click(object sender, EventArgs e)
+ private static bool bot_started = false;
+ private void startStopBotToolStripMenuItem_Click(object sender, EventArgs e)
{
- startBotToolStripMenuItem.Enabled = false;
- Task.Run(() =>
+ if (!bot_started)
{
- try
+ bot_started = true;
+ startStopBotToolStripMenuItem.Text = "Stop Bot";
+ Task.Run(() =>
{
- //ColoredConsoleWrite(ConsoleColor.White, "Coded by Ferox - edited by NecronomiconCoding");
- CheckVersion();
- Execute();
- }
- catch (PtcOfflineException)
+ try
+ {
+ //ColoredConsoleWrite(ConsoleColor.White, "Coded by Ferox - edited by NecronomiconCoding");
+ CheckVersion();
+ Execute();
+ }
+ catch (PtcOfflineException)
+ {
+ ColoredConsoleWrite(Color.Red, "PTC Servers are probably down OR your credentials are wrong. Try google");
+ }
+ catch (Exception ex)
+ {
+ ColoredConsoleWrite(Color.Red, $"Unhandled exception: {ex}");
+ }
+ });
+ }
+ else
+ {
+ if (!ForceUnbanning)
{
- ColoredConsoleWrite(Color.Red, "PTC Servers are probably down OR your credentials are wrong. Try google");
+ Stopping = true;
+ ColoredConsoleWrite(Color.Red, $"Stopping the bot.. Waiting for the last action to be complete.");
}
- catch (Exception ex)
+ else
{
- ColoredConsoleWrite(Color.Red, $"Unhandled exception: {ex}");
+ ColoredConsoleWrite(Color.Red, $"An action is in play, please wait until it's done.");
}
- });
+ }
+ }
+
+ private void Client_OnConsoleWrite(ConsoleColor color, string message)
+ {
+ Color c = Color.White;
+ switch(color)
+ {
+ case ConsoleColor.Green:
+ c = Color.Green;
+ break;
+ case ConsoleColor.DarkCyan:
+ c = Color.DarkCyan;
+ break;
+ }
+ ColoredConsoleWrite(c, message);
}
private void showAllToolStripMenuItem3_Click(object sender, EventArgs e)
@@ -1048,10 +1186,199 @@ namespace PokemonGo.RocketAPI.Window
pForm.Show();
}
- private void mapToolStripMenuItem_Click(object sender, EventArgs e)
+
+
+ #region POKEMON LIST
+ IEnumerable<PokemonFamily> families;
+
+ private void InitializePokemonForm()
+ {
+ objectListView1.ButtonClick += PokemonListButton_Click;
+
+ pkmnName.ImageGetter = delegate (object rowObject)
+ {
+ PokemonData pokemon = (PokemonData)rowObject;
+
+ String key = pokemon.PokemonId.ToString();
+
+ if (!objectListView1.SmallImageList.Images.ContainsKey(key))
+ {
+ Image largeImage = GetPokemonImage((int)pokemon.PokemonId);
+ objectListView1.SmallImageList.Images.Add(key, largeImage);
+ objectListView1.LargeImageList.Images.Add(key, largeImage);
+ }
+ return key;
+ };
+
+ objectListView1.CellToolTipShowing += delegate (object sender, ToolTipShowingEventArgs args)
+ {
+ PokemonData pokemon = (PokemonData)args.Model;
+ if (args.ColumnIndex == 8)
+ {
+ int candyOwned = families
+ .Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
+ .Select(f => f.Candy)
+ .First();
+ args.Text = candyOwned + " Candy";
+ }
+ };
+ }
+
+ private static Image GetPokemonImage(int pokemonId)
+ {
+ var Sprites = AppDomain.CurrentDomain.BaseDirectory + "Sprites\\";
+ string location = Sprites + pokemonId + ".png";
+ if (!Directory.Exists(Sprites))
+ Directory.CreateDirectory(Sprites);
+ if (!File.Exists(location))
+ {
+ WebClient wc = new WebClient();
+ wc.DownloadFile("http://pokeapi.co/media/sprites/pokemon/" + pokemonId + ".png", @location);
+ }
+ return Image.FromFile(location);
+ }
+
+ private async void ReloadPokemonList()
+ {
+ button1.Enabled = false;
+ objectListView1.Enabled = false;
+
+ if (client2 == null)
+ {
+ client2 = new Client(ClientSettings);
+ }
+ try
+ {
+ if (!client2.HasServerSet())
+ {
+ switch (ClientSettings.AuthType)
+ {
+ case AuthType.Ptc:
+ ColoredConsoleWrite(Color.Green, "Login Type: Pokemon Trainers Club");
+ await client2.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
+ break;
+ case AuthType.Google:
+ 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 client2.DoGoogleLogin();
+ break;
+ }
+
+ await client2.SetServer();
+ }
+ var inventory = await client2.GetInventory();
+ var pokemons =
+ inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Pokemon)
+ .Where(p => p != null && p?.PokemonId > 0).OrderByDescending(key => key.Cp);
+
+ families = inventory.InventoryDelta.InventoryItems
+ .Select(i => i.InventoryItemData?.PokemonFamily)
+ .Where(p => p != null && (int)p?.FamilyId > 0)
+ .OrderByDescending(p => (int)p.FamilyId);
+
+ var currentScrollPosition = objectListView1.LowLevelScrollPosition;
+ objectListView1.SetObjects(pokemons);
+ objectListView1.LowLevelScroll(currentScrollPosition.X, currentScrollPosition.Y);
+ }
+ catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); client2 = null; ReloadPokemonList(); }
+
+ button1.Enabled = true;
+ objectListView1.Enabled = true;
+ }
+
+ private void PokemonListButton_Click(object sender, CellClickEventArgs e)
+ {
+ try
+ {
+ PokemonData pokemon = (PokemonData)e.Model;
+ if (e.ColumnIndex == 6)
+ {
+ TransferPokemon(pokemon);
+ }
+ else if (e.ColumnIndex == 7)
+ {
+ PowerUpPokemon(pokemon);
+ }
+ else if (e.ColumnIndex == 8)
+ {
+ EvolvePokemon(pokemon);
+ }
+ }
+ catch (Exception ex) { ColoredConsoleWrite(Color.Red, ex.ToString()); client2 = null; ReloadPokemonList(); }
+ }
+
+ private async void TransferPokemon(PokemonData pokemon)
+ {
+ if (MessageBox.Show($"Are you sure you want to transfer {pokemon.PokemonId.ToString()} with {pokemon.Cp} CP?", "Confirmation", MessageBoxButtons.YesNo) == DialogResult.Yes)
+ {
+ var transferPokemonResponse = await client2.TransferPokemon(pokemon.Id);
+ string message = "";
+ string caption = "";
+
+ if (transferPokemonResponse.Status == 1)
+ {
+ message = $"{pokemon.PokemonId} was transferred\n{transferPokemonResponse.CandyAwarded} candy awarded";
+ caption = $"{pokemon.PokemonId} transferred";
+ ReloadPokemonList();
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be transferred";
+ caption = $"Transfer {pokemon.PokemonId} failed";
+ }
+
+ MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+ }
+
+ private async void PowerUpPokemon(PokemonData pokemon)
+ {
+ var evolvePokemonResponse = await client2.PowerUp(pokemon.Id);
+ string message = "";
+ string caption = "";
+
+ if (evolvePokemonResponse.Result == 1)
+ {
+ message = $"{pokemon.PokemonId} successfully upgraded.";
+ caption = $"{pokemon.PokemonId} upgraded";
+ ReloadPokemonList();
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be upgraded";
+ caption = $"Upgrade {pokemon.PokemonId} failed";
+ }
+
+ MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+
+ private async void EvolvePokemon(PokemonData pokemon)
+ {
+ var evolvePokemonResponse = await client2.EvolvePokemon(pokemon.Id);
+ string message = "";
+ string caption = "";
+
+ 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}";
+ ReloadPokemonList();
+ }
+ else
+ {
+ message = $"{pokemon.PokemonId} could not be evolved";
+ caption = $"Evolve {pokemon.PokemonId} failed";
+ }
+
+ MessageBox.Show(message, caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
+ }
+
+ private void button1_Click(object sender, EventArgs e)
{
- var mForm = new MapForm(ref client);
- mForm.Show();
+ ReloadPokemonList();
}
+ #endregion
}
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.resx b/PokemonGo/RocketAPI/Window/MainForm.resx
index 0772257..1821e28 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.resx
+++ b/PokemonGo/RocketAPI/Window/MainForm.resx
@@ -123,6 +123,12 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 18</value>
</metadata>
+ <metadata name="largePokemonImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>357, 18</value>
+ </metadata>
+ <metadata name="smallPokemonImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>247, 18</value>
+ </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>58</value>
</metadata>
diff --git a/PokemonGo/RocketAPI/Window/PokeStopOptimizer.cs b/PokemonGo/RocketAPI/Window/PokeStopOptimizer.cs
new file mode 100644
index 0000000..a7768af
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/PokeStopOptimizer.cs
@@ -0,0 +1,68 @@
+using GMap.NET.WindowsForms;
+using PokemonGo.RocketAPI.GeneratedCode;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace PokemonGo.RocketAPI.Window
+{
+ public static class PokeStopOptimizer
+ {
+ public static List<FortData> Optimize(FortData[] pokeStops, double cLatitude, double cLongitude, GMapOverlay routeOverlay)
+ {
+ List<FortData> optimizedRoute = new List<FortData>(pokeStops);
+
+ // NN
+ FortData NN = FindNN(optimizedRoute, cLatitude, cLongitude);
+ optimizedRoute.Remove(NN);
+ optimizedRoute.Insert(0, NN);
+ for (int i=1; i<pokeStops.Length; i++)
+ {
+ NN = FindNN(optimizedRoute.Skip(i), NN.Latitude, NN.Longitude);
+ optimizedRoute.Remove(NN);
+ optimizedRoute.Insert(i, NN);
+ }
+
+ // 2-Opt
+
+
+ return optimizedRoute;
+ }
+
+ private static List<FortData> Optimize2Opt(List<FortData> pokeStops)
+ {
+ List<FortData> optimizedRoute = new List<FortData>();
+
+ int n = pokeStops.Count;
+
+ for (int ai = 0; ai < n; ai++)
+ {
+ for (int ci = 0; ci < n; ci++)
+ {
+ int bi = (ai + 1) % n;
+ int di = (ci + 1) % n;
+ }
+ }
+
+ return optimizedRoute;
+ }
+
+ private static FortData FindNN(IEnumerable<FortData> pokeStops, double cLatitude, double cLongitude)
+ {
+ return pokeStops.OrderBy(p => GetDistance(cLatitude, cLongitude, p.Latitude, p.Longitude)).First();
+ }
+
+ private static float GetDistance(double lat1, double lng1, double lat2, double lng2)
+ {
+ double R = 6371e3;
+ Func<double, float> toRad = x => (float)(x * (Math.PI / 180));
+ lat1 = toRad(lat1);
+ lat2 = toRad(lat2);
+ float dLng = toRad(lng2 - lng1);
+
+ return (float)(Math.Acos(Math.Sin(lat1)*Math.Sin(lat2) + Math.Cos(lat1)*Math.Cos(lat2)*Math.Cos(dLng)) * R);
+ }
+ }
+}
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.cs b/PokemonGo/RocketAPI/Window/PokeUi.cs
index 3ee7962..1ef0d50 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.cs
@@ -44,7 +44,7 @@ namespace PokemonGo.RocketAPI.Window
await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
break;
case AuthType.Google:
- await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
+ await client.DoGoogleLogin();
break;
}
await client.SetServer();
@@ -62,7 +62,7 @@ namespace PokemonGo.RocketAPI.Window
- var imageSize = ClientSettings.ImageSize;
+ var imageSize = 50;
if ((imageSize > 96) || (imageSize < 1)) // no bigger than orig size and no smaller than 1x1
imageSize = 50;
diff --git a/PokemonGo/RocketAPI/Window/PokemonForm.cs b/PokemonGo/RocketAPI/Window/PokemonForm.cs
index 6f36da2..89cfe15 100644
--- a/PokemonGo/RocketAPI/Window/PokemonForm.cs
+++ b/PokemonGo/RocketAPI/Window/PokemonForm.cs
@@ -38,7 +38,7 @@ namespace PokemonGo.RocketAPI.Window
await client.DoPtcLogin(ClientSettings.PtcUsername, ClientSettings.PtcPassword);
break;
case AuthType.Google:
- await client.DoGoogleLogin(ClientSettings.Email, ClientSettings.Password);
+ await client.DoGoogleLogin();
break;
}
diff --git a/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj b/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
index 1c8ccf1..bfc3390 100644
--- a/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
+++ b/PokemonGo/RocketAPI/Window/PokemonGo.RocketAPI.Window.csproj
@@ -48,6 +48,14 @@
<Reference Include="Google.Protobuf">
<HintPath>..\..\..\packages\Google.Protobuf.3.0.0-beta3\lib\dotnet\Google.Protobuf.dll</HintPath>
</Reference>
+ <Reference Include="ObjectListView, Version=2.9.1.1072, Culture=neutral, PublicKeyToken=b1c5bf581481bcd4, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\ObjectListView.Official.2.9.1\lib\net20\ObjectListView.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
+ <Reference Include="S2Geometry, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\S2Geometry.1.0.3\lib\portable-net45+wp8+win8\S2Geometry.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
@@ -84,6 +92,7 @@
<Compile Include="PokemonForm.Designer.cs">
<DependentUpon>PokemonForm.cs</DependentUpon>
</Compile>
+ <Compile Include="PokeStopOptimizer.cs" />
<Compile Include="PokeUi.cs">
<SubType>Form</SubType>
</Compile>
@@ -92,6 +101,7 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="S2GMapDrawer.cs" />
<Compile Include="Settings.cs" />
<Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
diff --git a/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs b/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs
new file mode 100644
index 0000000..7fc3371
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/S2GMapDrawer.cs
@@ -0,0 +1,36 @@
+using Google.Common.Geometry;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using GMap.NET.WindowsForms;
+using GMap.NET.WindowsForms.Markers;
+using GMap.NET;
+using System.Drawing;
+
+namespace PokemonGo.RocketAPI.Window
+{
+ class S2GMapDrawer
+ {
+ public static void DrawS2Cells(List<ulong> cellsIds, GMapOverlay mapLayer)
+ {
+ for (int i=0; i<cellsIds.Count; i++)
+ {
+ S2CellId cellId = new S2CellId(cellsIds[i]);
+ S2Cell cell = new S2Cell(cellId);
+
+ List<PointLatLng> points = new List<PointLatLng>();
+ for (int j=0; j<4; j++)
+ {
+ S2LatLng point = new S2LatLng(cell.GetVertex(j));
+ points.Add(new PointLatLng(point.LatDegrees, point.LngDegrees));
+ }
+ GMapPolygon polygon = new GMapPolygon(points, "mypolygon");
+ polygon.Fill = new SolidBrush(Color.FromArgb(50, Color.Red));
+ polygon.Stroke = new Pen(Color.Red, 1);
+ mapLayer.Polygons.Add(polygon);
+ }
+ }
+ }
+}
diff --git a/PokemonGo/RocketAPI/Window/Settings.cs b/PokemonGo/RocketAPI/Window/Settings.cs
index 9f238c2..e807eec 100644
--- a/PokemonGo/RocketAPI/Window/Settings.cs
+++ b/PokemonGo/RocketAPI/Window/Settings.cs
@@ -47,7 +47,6 @@ namespace PokemonGo.RocketAPI.Window
public int TransferCPThreshold => GetSetting() != string.Empty ? int.Parse(GetSetting(), CultureInfo.InvariantCulture) : 0;
public int TransferIVThreshold => GetSetting() != string.Empty ? int.Parse(GetSetting(), CultureInfo.InvariantCulture) : 0;
public int TravelSpeed => GetSetting() != string.Empty ? int.Parse(GetSetting(), CultureInfo.InvariantCulture) : 60;
- public int ImageSize => GetSetting() != string.Empty ? int.Parse(GetSetting(), CultureInfo.InvariantCulture) : 50;
public bool EvolveAllGivenPokemons => GetSetting() != string.Empty && Convert.ToBoolean(GetSetting(), CultureInfo.InvariantCulture);
public bool CatchPokemon => GetSetting() != string.Empty && Convert.ToBoolean(GetSetting(), CultureInfo.InvariantCulture);
@@ -63,8 +62,6 @@ namespace PokemonGo.RocketAPI.Window
public string PtcUsername => GetSetting() != string.Empty ? GetSetting() : "username";
public string PtcPassword => GetSetting() != string.Empty ? GetSetting() : "password";
- public string Email => GetSetting() != string.Empty ? GetSetting() : "Email";
- public string Password => GetSetting() != string.Empty ? GetSetting() : "Password";
public double DefaultLatitude
{
@@ -86,18 +83,29 @@ namespace PokemonGo.RocketAPI.Window
public bool Recycler => GetSetting() != string.Empty && Convert.ToBoolean(GetSetting(), CultureInfo.InvariantCulture);
+ private int MaxItemPokeBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemGreatBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemUltraBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemMasterBall => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemRazzBerry => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemRevive => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemSuperPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemHyperPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+ private int MaxItemMaxPotion => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 500;
+
ICollection<KeyValuePair<ItemId, int>> ISettings.ItemRecycleFilter => new[]
{
- new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, 20),
- new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, 50),
- new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, 100),
- new KeyValuePair<ItemId, int>(ItemId.ItemMasterBall, 200),
- new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, 20),
- new KeyValuePair<ItemId, int>(ItemId.ItemRevive, 20),
- new KeyValuePair<ItemId, int>(ItemId.ItemPotion, 0),
- new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, 0),
- new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, 50),
- new KeyValuePair<ItemId, int>(ItemId.ItemMaxPotion, 100)
+ new KeyValuePair<ItemId, int>(ItemId.ItemPokeBall, MaxItemPokeBall),
+ new KeyValuePair<ItemId, int>(ItemId.ItemGreatBall, MaxItemGreatBall),
+ new KeyValuePair<ItemId, int>(ItemId.ItemUltraBall, MaxItemUltraBall),
+ new KeyValuePair<ItemId, int>(ItemId.ItemMasterBall, MaxItemMasterBall),
+ new KeyValuePair<ItemId, int>(ItemId.ItemRazzBerry, MaxItemRazzBerry),
+ new KeyValuePair<ItemId, int>(ItemId.ItemRevive, MaxItemRevive),
+ new KeyValuePair<ItemId, int>(ItemId.ItemPotion, MaxItemPotion),
+ new KeyValuePair<ItemId, int>(ItemId.ItemSuperPotion, MaxItemSuperPotion),
+ new KeyValuePair<ItemId, int>(ItemId.ItemHyperPotion, MaxItemHyperPotion),
+ new KeyValuePair<ItemId, int>(ItemId.ItemMaxPotion, MaxItemMaxPotion)
};
public int RecycleItemsInterval => GetSetting() != string.Empty ? Convert.ToInt16(GetSetting()) : 60;
diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
index 9d34f6d..f827a36 100644
--- a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs
@@ -61,12 +61,6 @@
this.TravelSpeedText = new System.Windows.Forms.Label();
this.TravelSpeedBox = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
- this.EmailLoginText = new System.Windows.Forms.Label();
- this.EmailPasswordText = new System.Windows.Forms.Label();
- this.EmailLoginBox = new System.Windows.Forms.TextBox();
- this.EmailPasswordBox = new System.Windows.Forms.TextBox();
- this.label7 = new System.Windows.Forms.Label();
- this.ImageSizeBox = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit();
this.panel1.SuspendLayout();
@@ -75,9 +69,10 @@
// authTypeLabel
//
this.authTypeLabel.AutoSize = true;
- this.authTypeLabel.Location = new System.Drawing.Point(3, 7);
+ this.authTypeLabel.Location = new System.Drawing.Point(4, 9);
+ this.authTypeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.authTypeLabel.Name = "authTypeLabel";
- this.authTypeLabel.Size = new System.Drawing.Size(63, 13);
+ this.authTypeLabel.Size = new System.Drawing.Size(83, 17);
this.authTypeLabel.TabIndex = 0;
this.authTypeLabel.Text = "Login Type:";
this.authTypeLabel.Click += new System.EventHandler(this.authTypeLabel_Click);
@@ -88,72 +83,80 @@
this.authTypeCb.Items.AddRange(new object[] {
"google",
"Ptc"});
- this.authTypeCb.Location = new System.Drawing.Point(68, 4);
+ this.authTypeCb.Location = new System.Drawing.Point(91, 5);
+ this.authTypeCb.Margin = new System.Windows.Forms.Padding(4);
this.authTypeCb.Name = "authTypeCb";
- this.authTypeCb.Size = new System.Drawing.Size(136, 21);
+ this.authTypeCb.Size = new System.Drawing.Size(180, 24);
this.authTypeCb.TabIndex = 1;
this.authTypeCb.SelectedIndexChanged += new System.EventHandler(this.authTypeCb_SelectedIndexChanged);
//
// ptcUserLabel
//
this.ptcUserLabel.AutoSize = true;
- this.ptcUserLabel.Location = new System.Drawing.Point(3, 36);
+ this.ptcUserLabel.Location = new System.Drawing.Point(4, 44);
+ this.ptcUserLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.ptcUserLabel.Name = "ptcUserLabel";
- this.ptcUserLabel.Size = new System.Drawing.Size(58, 13);
+ this.ptcUserLabel.Size = new System.Drawing.Size(77, 17);
this.ptcUserLabel.TabIndex = 2;
this.ptcUserLabel.Text = "Username:";
//
// ptcPasswordLabel
//
this.ptcPasswordLabel.AutoSize = true;
- this.ptcPasswordLabel.Location = new System.Drawing.Point(3, 62);
+ this.ptcPasswordLabel.Location = new System.Drawing.Point(4, 76);
+ this.ptcPasswordLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.ptcPasswordLabel.Name = "ptcPasswordLabel";
- this.ptcPasswordLabel.Size = new System.Drawing.Size(56, 13);
+ this.ptcPasswordLabel.Size = new System.Drawing.Size(73, 17);
this.ptcPasswordLabel.TabIndex = 3;
this.ptcPasswordLabel.Text = "Password:";
//
// latLabel
//
this.latLabel.AutoSize = true;
- this.latLabel.Location = new System.Drawing.Point(3, 88);
+ this.latLabel.Location = new System.Drawing.Point(4, 108);
+ this.latLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.latLabel.Name = "latLabel";
- this.latLabel.Size = new System.Drawing.Size(48, 13);
+ this.latLabel.Size = new System.Drawing.Size(63, 17);
this.latLabel.TabIndex = 4;
this.latLabel.Text = "Latitude:";
//
// longiLabel
//
this.longiLabel.AutoSize = true;
- this.longiLabel.Location = new System.Drawing.Point(3, 114);
+ this.longiLabel.Location = new System.Drawing.Point(4, 140);
+ this.longiLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.longiLabel.Name = "longiLabel";
- this.longiLabel.Size = new System.Drawing.Size(57, 13);
+ this.longiLabel.Size = new System.Drawing.Size(75, 17);
this.longiLabel.TabIndex = 5;
this.longiLabel.Text = "Longitude:";
//
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(3, 140);
+ this.label1.Location = new System.Drawing.Point(4, 172);
+ this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(87, 13);
+ this.label1.Size = new System.Drawing.Size(116, 17);
this.label1.TabIndex = 6;
this.label1.Text = "Razzberry Mode:";
//
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(3, 193);
+ this.label2.Location = new System.Drawing.Point(4, 238);
+ this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(76, 13);
+ this.label2.Size = new System.Drawing.Size(102, 17);
this.label2.TabIndex = 7;
this.label2.Text = "Transfer Type:";
//
// label3
//
this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(3, 321);
+ this.label3.Location = new System.Drawing.Point(4, 395);
+ this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(91, 13);
+ this.label3.Size = new System.Drawing.Size(117, 17);
this.label3.TabIndex = 8;
this.label3.Text = "Evolve Pokemon:";
this.label3.Click += new System.EventHandler(this.label3_Click);
@@ -161,49 +164,55 @@
// label4
//
this.label4.AutoSize = true;
- this.label4.Location = new System.Drawing.Point(3, 220);
+ this.label4.Location = new System.Drawing.Point(4, 271);
+ this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(74, 13);
+ this.label4.Size = new System.Drawing.Size(98, 17);
this.label4.TabIndex = 9;
this.label4.Text = "CP Threshold:";
//
// label5
//
this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(3, 167);
+ this.label5.Location = new System.Drawing.Point(4, 206);
+ this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(93, 13);
+ this.label5.Size = new System.Drawing.Size(125, 17);
this.label5.TabIndex = 10;
this.label5.Text = "Razzberry Setting:";
//
// ptcUserText
//
- this.ptcUserText.Location = new System.Drawing.Point(68, 33);
+ this.ptcUserText.Location = new System.Drawing.Point(91, 41);
+ this.ptcUserText.Margin = new System.Windows.Forms.Padding(4);
this.ptcUserText.Name = "ptcUserText";
- this.ptcUserText.Size = new System.Drawing.Size(136, 20);
+ this.ptcUserText.Size = new System.Drawing.Size(180, 22);
this.ptcUserText.TabIndex = 11;
//
// ptcPassText
//
- this.ptcPassText.Location = new System.Drawing.Point(68, 62);
+ this.ptcPassText.Location = new System.Drawing.Point(91, 76);
+ this.ptcPassText.Margin = new System.Windows.Forms.Padding(4);
this.ptcPassText.Name = "ptcPassText";
- this.ptcPassText.Size = new System.Drawing.Size(136, 20);
+ this.ptcPassText.Size = new System.Drawing.Size(180, 22);
this.ptcPassText.TabIndex = 12;
//
// latitudeText
//
- this.latitudeText.Location = new System.Drawing.Point(104, 85);
+ this.latitudeText.Location = new System.Drawing.Point(139, 105);
+ this.latitudeText.Margin = new System.Windows.Forms.Padding(4);
this.latitudeText.Name = "latitudeText";
this.latitudeText.ReadOnly = true;
- this.latitudeText.Size = new System.Drawing.Size(100, 20);
+ this.latitudeText.Size = new System.Drawing.Size(132, 22);
this.latitudeText.TabIndex = 13;
//
// longitudeText
//
- this.longitudeText.Location = new System.Drawing.Point(104, 111);
+ this.longitudeText.Location = new System.Drawing.Point(139, 137);
+ this.longitudeText.Margin = new System.Windows.Forms.Padding(4);
this.longitudeText.Name = "longitudeText";
this.longitudeText.ReadOnly = true;
- this.longitudeText.Size = new System.Drawing.Size(100, 20);
+ this.longitudeText.Size = new System.Drawing.Size(132, 22);
this.longitudeText.TabIndex = 14;
//
// razzmodeCb
@@ -212,16 +221,18 @@
this.razzmodeCb.Items.AddRange(new object[] {
"probability",
"cp"});
- this.razzmodeCb.Location = new System.Drawing.Point(104, 137);
+ this.razzmodeCb.Location = new System.Drawing.Point(139, 169);
+ this.razzmodeCb.Margin = new System.Windows.Forms.Padding(4);
this.razzmodeCb.Name = "razzmodeCb";
- this.razzmodeCb.Size = new System.Drawing.Size(100, 21);
+ this.razzmodeCb.Size = new System.Drawing.Size(132, 24);
this.razzmodeCb.TabIndex = 15;
//
// razzSettingText
//
- this.razzSettingText.Location = new System.Drawing.Point(104, 164);
+ this.razzSettingText.Location = new System.Drawing.Point(139, 202);
+ this.razzSettingText.Margin = new System.Windows.Forms.Padding(4);
this.razzSettingText.Name = "razzSettingText";
- this.razzSettingText.Size = new System.Drawing.Size(100, 20);
+ this.razzSettingText.Size = new System.Drawing.Size(132, 22);
this.razzSettingText.TabIndex = 16;
//
// transferTypeCb
@@ -235,26 +246,29 @@
"Duplicate",
"IV Duplicate",
"All"});
- this.transferTypeCb.Location = new System.Drawing.Point(104, 190);
+ this.transferTypeCb.Location = new System.Drawing.Point(139, 234);
+ this.transferTypeCb.Margin = new System.Windows.Forms.Padding(4);
this.transferTypeCb.Name = "transferTypeCb";
- this.transferTypeCb.Size = new System.Drawing.Size(100, 21);
+ this.transferTypeCb.Size = new System.Drawing.Size(132, 24);
this.transferTypeCb.TabIndex = 17;
this.transferTypeCb.SelectedIndexChanged += new System.EventHandler(this.transferTypeCb_SelectedIndexChanged);
//
// transferCpThresText
//
- this.transferCpThresText.Location = new System.Drawing.Point(104, 220);
+ this.transferCpThresText.Location = new System.Drawing.Point(139, 271);
+ this.transferCpThresText.Margin = new System.Windows.Forms.Padding(4);
this.transferCpThresText.Name = "transferCpThresText";
- this.transferCpThresText.Size = new System.Drawing.Size(100, 20);
+ this.transferCpThresText.Size = new System.Drawing.Size(132, 22);
this.transferCpThresText.TabIndex = 18;
this.transferCpThresText.TextChanged += new System.EventHandler(this.transferCpThresText_TextChanged);
//
// evolveAllChk
//
this.evolveAllChk.AutoSize = true;
- this.evolveAllChk.Location = new System.Drawing.Point(104, 321);
+ this.evolveAllChk.Location = new System.Drawing.Point(139, 395);
+ this.evolveAllChk.Margin = new System.Windows.Forms.Padding(4);
this.evolveAllChk.Name = "evolveAllChk";
- this.evolveAllChk.Size = new System.Drawing.Size(15, 14);
+ this.evolveAllChk.Size = new System.Drawing.Size(18, 17);
this.evolveAllChk.TabIndex = 19;
this.evolveAllChk.UseVisualStyleBackColor = true;
this.evolveAllChk.CheckedChanged += new System.EventHandler(this.evolveAllChk_CheckedChanged);
@@ -263,9 +277,10 @@
//
this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.saveBtn.Location = new System.Drawing.Point(0, 341);
+ this.saveBtn.Location = new System.Drawing.Point(0, 420);
+ this.saveBtn.Margin = new System.Windows.Forms.Padding(4);
this.saveBtn.Name = "saveBtn";
- this.saveBtn.Size = new System.Drawing.Size(198, 95);
+ this.saveBtn.Size = new System.Drawing.Size(264, 117);
this.saveBtn.TabIndex = 20;
this.saveBtn.Text = "Save";
this.saveBtn.UseVisualStyleBackColor = true;
@@ -280,7 +295,8 @@
this.gMapControl1.GrayScaleMode = false;
this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
this.gMapControl1.LevelsKeepInMemmory = 5;
- this.gMapControl1.Location = new System.Drawing.Point(3, 16);
+ this.gMapControl1.Location = new System.Drawing.Point(4, 20);
+ this.gMapControl1.Margin = new System.Windows.Forms.Padding(4);
this.gMapControl1.MarkersEnabled = true;
this.gMapControl1.MaxZoom = 2;
this.gMapControl1.MinZoom = 2;
@@ -293,7 +309,7 @@
this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
this.gMapControl1.ShowTileGridLines = false;
- this.gMapControl1.Size = new System.Drawing.Size(468, 388);
+ this.gMapControl1.Size = new System.Drawing.Size(624, 478);
this.gMapControl1.TabIndex = 22;
this.gMapControl1.Zoom = 0D;
this.gMapControl1.Load += new System.EventHandler(this.gMapControl1_Load);
@@ -306,9 +322,11 @@
this.groupBox1.Controls.Add(this.trackBar);
this.groupBox1.Controls.Add(this.gMapControl1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.groupBox1.Location = new System.Drawing.Point(221, 9);
+ this.groupBox1.Location = new System.Drawing.Point(295, 11);
+ this.groupBox1.Margin = new System.Windows.Forms.Padding(4);
this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(474, 442);
+ this.groupBox1.Padding = new System.Windows.Forms.Padding(4);
+ this.groupBox1.Size = new System.Drawing.Size(632, 544);
this.groupBox1.TabIndex = 25;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Location";
@@ -317,9 +335,10 @@
//
this.FindAdressButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.FindAdressButton.Location = new System.Drawing.Point(338, 410);
+ this.FindAdressButton.Location = new System.Drawing.Point(451, 505);
+ this.FindAdressButton.Margin = new System.Windows.Forms.Padding(4);
this.FindAdressButton.Name = "FindAdressButton";
- this.FindAdressButton.Size = new System.Drawing.Size(130, 26);
+ this.FindAdressButton.Size = new System.Drawing.Size(173, 32);
this.FindAdressButton.TabIndex = 25;
this.FindAdressButton.Text = "Find Location";
this.FindAdressButton.UseVisualStyleBackColor = true;
@@ -327,36 +346,32 @@
//
// AdressBox
//
- this.AdressBox.Location = new System.Drawing.Point(6, 416);
+ this.AdressBox.Location = new System.Drawing.Point(8, 512);
+ this.AdressBox.Margin = new System.Windows.Forms.Padding(4);
this.AdressBox.Name = "AdressBox";
- this.AdressBox.Size = new System.Drawing.Size(326, 20);
+ this.AdressBox.Size = new System.Drawing.Size(433, 22);
this.AdressBox.TabIndex = 25;
//
// trackBar
//
this.trackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.trackBar.BackColor = System.Drawing.SystemColors.Info;
- this.trackBar.Location = new System.Drawing.Point(426, 16);
+ this.trackBar.Location = new System.Drawing.Point(568, 20);
+ this.trackBar.Margin = new System.Windows.Forms.Padding(4);
this.trackBar.Name = "trackBar";
this.trackBar.Orientation = System.Windows.Forms.Orientation.Vertical;
- this.trackBar.Size = new System.Drawing.Size(45, 104);
+ this.trackBar.Size = new System.Drawing.Size(56, 128);
this.trackBar.TabIndex = 25;
this.trackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft;
this.trackBar.Scroll += new System.EventHandler(this.trackBar_Scroll);
//
// panel1
//
- this.panel1.Controls.Add(this.label7);
- this.panel1.Controls.Add(this.ImageSizeBox);
- this.panel1.Controls.Add(this.EmailLoginText);
+ this.panel1.Controls.Add(this.TravelSpeedBox);
this.panel1.Controls.Add(this.CatchPokemonBox);
- this.panel1.Controls.Add(this.EmailPasswordText);
this.panel1.Controls.Add(this.CatchPokemonText);
- this.panel1.Controls.Add(this.EmailPasswordBox);
- this.panel1.Controls.Add(this.EmailLoginBox);
this.panel1.Controls.Add(this.transferIVThresText);
this.panel1.Controls.Add(this.TravelSpeedText);
- this.panel1.Controls.Add(this.TravelSpeedBox);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.authTypeLabel);
this.panel1.Controls.Add(this.authTypeCb);
@@ -380,18 +395,20 @@
this.panel1.Controls.Add(this.ptcUserText);
this.panel1.Controls.Add(this.ptcPassText);
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
- this.panel1.Location = new System.Drawing.Point(9, 9);
+ this.panel1.Location = new System.Drawing.Point(12, 11);
+ this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(212, 442);
+ this.panel1.Size = new System.Drawing.Size(283, 544);
this.panel1.TabIndex = 26;
this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
//
// CatchPokemonBox
//
this.CatchPokemonBox.AutoSize = true;
- this.CatchPokemonBox.Location = new System.Drawing.Point(104, 298);
+ this.CatchPokemonBox.Location = new System.Drawing.Point(139, 367);
+ this.CatchPokemonBox.Margin = new System.Windows.Forms.Padding(4);
this.CatchPokemonBox.Name = "CatchPokemonBox";
- this.CatchPokemonBox.Size = new System.Drawing.Size(15, 14);
+ this.CatchPokemonBox.Size = new System.Drawing.Size(18, 17);
this.CatchPokemonBox.TabIndex = 26;
this.CatchPokemonBox.UseVisualStyleBackColor = true;
this.CatchPokemonBox.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
@@ -399,107 +416,65 @@
// CatchPokemonText
//
this.CatchPokemonText.AutoSize = true;
- this.CatchPokemonText.Location = new System.Drawing.Point(3, 298);
+ this.CatchPokemonText.Location = new System.Drawing.Point(4, 367);
+ this.CatchPokemonText.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.CatchPokemonText.Name = "CatchPokemonText";
- this.CatchPokemonText.Size = new System.Drawing.Size(86, 13);
+ this.CatchPokemonText.Size = new System.Drawing.Size(111, 17);
this.CatchPokemonText.TabIndex = 25;
this.CatchPokemonText.Text = "Catch Pokemon:";
this.CatchPokemonText.Click += new System.EventHandler(this.label7_Click);
//
// transferIVThresText
//
- this.transferIVThresText.Location = new System.Drawing.Point(104, 220);
+ this.transferIVThresText.Location = new System.Drawing.Point(139, 271);
+ this.transferIVThresText.Margin = new System.Windows.Forms.Padding(4);
this.transferIVThresText.Name = "transferIVThresText";
- this.transferIVThresText.Size = new System.Drawing.Size(100, 20);
+ this.transferIVThresText.Size = new System.Drawing.Size(132, 22);
this.transferIVThresText.TabIndex = 24;
this.transferIVThresText.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// TravelSpeedText
//
this.TravelSpeedText.AutoSize = true;
- this.TravelSpeedText.Location = new System.Drawing.Point(3, 275);
+ this.TravelSpeedText.Location = new System.Drawing.Point(4, 338);
+ this.TravelSpeedText.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.TravelSpeedText.Name = "TravelSpeedText";
- this.TravelSpeedText.Size = new System.Drawing.Size(102, 13);
+ this.TravelSpeedText.Size = new System.Drawing.Size(131, 17);
this.TravelSpeedText.TabIndex = 23;
this.TravelSpeedText.Text = "Travel Speed km/h:";
//
// TravelSpeedBox
//
- this.TravelSpeedBox.Location = new System.Drawing.Point(104, 272);
+ this.TravelSpeedBox.Location = new System.Drawing.Point(139, 335);
+ this.TravelSpeedBox.Margin = new System.Windows.Forms.Padding(4);
this.TravelSpeedBox.Name = "TravelSpeedBox";
- this.TravelSpeedBox.Size = new System.Drawing.Size(100, 20);
+ this.TravelSpeedBox.Size = new System.Drawing.Size(132, 22);
this.TravelSpeedBox.TabIndex = 22;
this.TravelSpeedBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label6
//
this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(3, 220);
+ this.label6.Location = new System.Drawing.Point(4, 271);
+ this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(70, 13);
+ this.label6.Size = new System.Drawing.Size(92, 17);
this.label6.TabIndex = 21;
this.label6.Text = "IV Threshold:";
this.label6.Click += new System.EventHandler(this.label6_Click);
//
- // EmailLoginText
- //
- this.EmailLoginText.AutoSize = true;
- this.EmailLoginText.Location = new System.Drawing.Point(3, 36);
- this.EmailLoginText.Name = "EmailLoginText";
- this.EmailLoginText.Size = new System.Drawing.Size(35, 13);
- this.EmailLoginText.TabIndex = 27;
- this.EmailLoginText.Text = "Email:";
- //
- // EmailPasswordText
- //
- this.EmailPasswordText.AutoSize = true;
- this.EmailPasswordText.Location = new System.Drawing.Point(3, 62);
- this.EmailPasswordText.Name = "EmailPasswordText";
- this.EmailPasswordText.Size = new System.Drawing.Size(56, 13);
- this.EmailPasswordText.TabIndex = 28;
- this.EmailPasswordText.Text = "Password:";
- //
- // EmailLoginBox
- //
- this.EmailLoginBox.Location = new System.Drawing.Point(68, 33);
- this.EmailLoginBox.Name = "EmailLoginBox";
- this.EmailLoginBox.Size = new System.Drawing.Size(136, 20);
- this.EmailLoginBox.TabIndex = 29;
- //
- // EmailPasswordBox
- //
- this.EmailPasswordBox.Location = new System.Drawing.Point(68, 62);
- this.EmailPasswordBox.Name = "EmailPasswordBox";
- this.EmailPasswordBox.Size = new System.Drawing.Size(136, 20);
- this.EmailPasswordBox.TabIndex = 30;
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Location = new System.Drawing.Point(3, 249);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(100, 13);
- this.label7.TabIndex = 32;
- this.label7.Text = "PokeUi Image Size:";
- //
- // ImageSizeBox
- //
- this.ImageSizeBox.Location = new System.Drawing.Point(104, 246);
- this.ImageSizeBox.Name = "ImageSizeBox";
- this.ImageSizeBox.Size = new System.Drawing.Size(100, 20);
- this.ImageSizeBox.TabIndex = 31;
- //
// SettingsForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(704, 460);
+ this.ClientSize = new System.Drawing.Size(939, 566);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MinimumSize = new System.Drawing.Size(630, 360);
+ this.Margin = new System.Windows.Forms.Padding(4);
+ this.MinimumSize = new System.Drawing.Size(834, 432);
this.Name = "SettingsForm";
- this.Padding = new System.Windows.Forms.Padding(9);
+ this.Padding = new System.Windows.Forms.Padding(12, 11, 12, 11);
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Settings";
@@ -549,11 +524,5 @@
private System.Windows.Forms.Button FindAdressButton;
private System.Windows.Forms.CheckBox CatchPokemonBox;
private System.Windows.Forms.Label CatchPokemonText;
- private System.Windows.Forms.Label EmailLoginText;
- private System.Windows.Forms.Label EmailPasswordText;
- private System.Windows.Forms.TextBox EmailLoginBox;
- private System.Windows.Forms.TextBox EmailPasswordBox;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.TextBox ImageSizeBox;
}
}
diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.cs b/PokemonGo/RocketAPI/Window/SettingsForm.cs
index 808d322..e2d8518 100644
--- a/PokemonGo/RocketAPI/Window/SettingsForm.cs
+++ b/PokemonGo/RocketAPI/Window/SettingsForm.cs
@@ -10,11 +10,18 @@ using GMap.NET.MapProviders;
using GMap.NET;
using System.Configuration;
using System.Globalization;
+using GMap.NET.WindowsForms;
+using PokemonGo.RocketAPI.Helpers;
+using GMap.NET.WindowsForms.Markers;
namespace PokemonGo.RocketAPI.Window
{
partial class SettingsForm : Form
{
+ GMapOverlay searchAreaOverlay = new GMapOverlay("areas");
+ GMapOverlay playerOverlay = new GMapOverlay("players");
+ GMarkerGoogle playerMarker;
+
public SettingsForm()
{
InitializeComponent();
@@ -26,8 +33,6 @@ namespace PokemonGo.RocketAPI.Window
authTypeCb.Text = Settings.Instance.AuthType.ToString();
ptcUserText.Text = Settings.Instance.PtcUsername.ToString();
ptcPassText.Text = Settings.Instance.PtcPassword.ToString();
- EmailLoginBox.Text = Settings.Instance.Email.ToString();
- EmailPasswordBox.Text = Settings.Instance.Password.ToString();
latitudeText.Text = Settings.Instance.DefaultLatitude.ToString();
longitudeText.Text = Settings.Instance.DefaultLongitude.ToString();
razzmodeCb.Text = Settings.Instance.RazzBerryMode;
@@ -38,7 +43,6 @@ namespace PokemonGo.RocketAPI.Window
evolveAllChk.Checked = Settings.Instance.EvolveAllGivenPokemons;
CatchPokemonBox.Checked = Settings.Instance.CatchPokemon;
TravelSpeedBox.Text = Settings.Instance.TravelSpeed.ToString();
- ImageSizeBox.Text = Settings.Instance.ImageSize.ToString();
// Initialize map:
//use google provider
gMapControl1.MapProvider = GoogleMapProvider.Instance;
@@ -56,24 +60,30 @@ namespace PokemonGo.RocketAPI.Window
//zoom min/max; default both = 2
- gMapControl1.DragButton = MouseButtons.Left;
+ gMapControl1.DragButton = MouseButtons.Right;
gMapControl1.CenterPen = new Pen(Color.Red, 2);
gMapControl1.MinZoom = trackBar.Maximum = 1;
gMapControl1.MaxZoom = trackBar.Maximum = 20;
trackBar.Value = 10;
+ gMapControl1.Overlays.Add(searchAreaOverlay);
+ gMapControl1.Overlays.Add(playerOverlay);
+
+ playerMarker = new GMarkerGoogle(gMapControl1.Position, GMarkerGoogleType.orange_small);
+ playerOverlay.Markers.Add(playerMarker);
+
+ S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(gMapControl1.Position.Lng, gMapControl1.Position.Lat), searchAreaOverlay);
+
//set zoom
- gMapControl1.Zoom = trackBar.Value;
+ gMapControl1.Zoom = trackBar.Value;
}
private void saveBtn_Click(object sender, EventArgs e)
{
Settings.Instance.SetSetting(authTypeCb.Text, "AuthType");
- Settings.Instance.SetSetting(EmailLoginBox.Text, "Email");
- Settings.Instance.SetSetting(EmailPasswordBox.Text, "Password");
- Settings.Instance.SetSetting(ptcUserText.Text, "PtcUsername");
- Settings.Instance.SetSetting(ptcPassText.Text, "PtcPassword");
+ Settings.Instance.SetSetting(ptcUserText.Text, "PtcUsername");
+ Settings.Instance.SetSetting(ptcPassText.Text, "PtcPassword");
Settings.Instance.SetSetting(latitudeText.Text.Replace(',', '.'), "DefaultLatitude");
Settings.Instance.SetSetting(longitudeText.Text.Replace(',', '.'), "DefaultLongitude");
@@ -89,10 +99,12 @@ namespace PokemonGo.RocketAPI.Window
Settings.Instance.SetSetting(transferCpThresText.Text, "TransferCPThreshold");
Settings.Instance.SetSetting(transferIVThresText.Text, "TransferIVThreshold");
Settings.Instance.SetSetting(TravelSpeedBox.Text, "TravelSpeed");
- Settings.Instance.SetSetting(ImageSizeBox.Text, "ImageSize");
Settings.Instance.SetSetting(evolveAllChk.Checked ? "true" : "false", "EvolveAllGivenPokemons");
Settings.Instance.SetSetting(CatchPokemonBox.Checked ? "true" : "false", "CatchPokemon");
Settings.Instance.Reload();
+
+ MainForm.Instance.Restart();
+
Close();
}
@@ -100,10 +112,6 @@ namespace PokemonGo.RocketAPI.Window
{
if (authTypeCb.Text == "google")
{
- EmailLoginBox.Visible = true;
- EmailLoginText.Visible = true;
- EmailPasswordBox.Visible = true;
- EmailPasswordText.Visible = true;
ptcUserText.Visible = false;
ptcPassText.Visible = false;
ptcUserLabel.Visible = false;
@@ -111,10 +119,6 @@ namespace PokemonGo.RocketAPI.Window
}
else
{
- EmailLoginBox.Visible = false;
- EmailLoginText.Visible = false;
- EmailPasswordBox.Visible = false;
- EmailPasswordText.Visible = false;
ptcUserText.Visible = true;
ptcPassText.Visible = true;
ptcUserLabel.Visible = true;
@@ -124,20 +128,23 @@ namespace PokemonGo.RocketAPI.Window
private void gMapControl1_MouseClick(object sender, MouseEventArgs e)
{
- Point localCoordinates = e.Location;
- gMapControl1.Position = gMapControl1.FromLocalToLatLng(localCoordinates.X, localCoordinates.Y);
-
- if (e.Clicks >= 2)
+ if (e.Button == MouseButtons.Left)
{
- gMapControl1.Zoom += 5;
+ Point localCoordinates = e.Location;
+ PointLatLng clickedCoord = gMapControl1.FromLocalToLatLng(localCoordinates.X, localCoordinates.Y);
+
+ double X = Math.Round(clickedCoord.Lng, 6);
+ double Y = Math.Round(clickedCoord.Lat, 6);
+ string longitude = X.ToString();
+ string latitude = Y.ToString();
+ latitudeText.Text = latitude;
+ longitudeText.Text = longitude;
+
+ playerMarker.Position = clickedCoord;
+
+ searchAreaOverlay.Polygons.Clear();
+ S2GMapDrawer.DrawS2Cells(S2Helper.GetNearbyCellIds(X, Y), searchAreaOverlay);
}
-
- double X = Math.Round(gMapControl1.Position.Lng, 6);
- double Y = Math.Round(gMapControl1.Position.Lat, 6);
- string longitude = X.ToString();
- string latitude = Y.ToString();
- latitudeText.Text = latitude;
- longitudeText.Text = longitude;
}
private void trackBar_Scroll(object sender, EventArgs e)
diff --git a/PokemonGo/RocketAPI/Window/packages.config b/PokemonGo/RocketAPI/Window/packages.config
new file mode 100644
index 0000000..7d8915d
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/packages.config
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="ObjectListView.Official" version="2.9.1" targetFramework="net45" />
+ <package id="S2Geometry" version="1.0.3" targetFramework="net45" />
+</packages>
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/packages.config b/PokemonGo/RocketAPI/packages.config
index e4d1dce..87ca41a 100644
--- a/PokemonGo/RocketAPI/packages.config
+++ b/PokemonGo/RocketAPI/packages.config
@@ -7,6 +7,6 @@
<package id="Google.Protobuf.Tools" version="3.0.0-beta3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
- <package id="S2Geometry" version="1.0.1" targetFramework="net45" />
+ <package id="S2Geometry" version="1.0.3" targetFramework="net45" />
<package id="VarintBitConverter" version="1.0.0.0" targetFramework="net45" />
</packages>
\ No newline at end of file
diff --git a/README.md b/README.md
index f396ae3..74a65a8 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,9 @@
# Pokemon-Go-Rocket-API
+# Discusion not controlled by me but by user 1461748123
+* Discord channel for user and developer discussions.
+* https://discord.gg/y6EU2qY
+
#Window
![alt tag](https://github.com/DetectiveSquirrel/Pokemon-Go-Rocket-API/blob/master/MainWindow.png)
![alt tag](https://github.com/DetectiveSquirrel/Pokemon-Go-Rocket-API/blob/master/MainPokeUi.png)
@@ -27,17 +31,27 @@ A Pokémon Go bot in C#
* Logs everything into Logs.txt
## Getting Started
-
-Go to PokemonGo\RocketAPI\Window\App.config -> Edit the Settings you like -> Build and Run (CTRL+F5)
+Build and Run (CTRL+F5)
# Settings
## AuthType
-* *Google* - Google login
-* *Ptc* - Pokémon Trainer Club login with username/password combination
+* *google* - Google login
+* *ptc* - Pokémon Trainer Club
## PtcUsername
-* *username* for PTC account. No need for when using Google.
-* *password* for PTC account. No need for when using Google.
+* *username* - for PTC account. No need for when using Google.
+
+## PtcPassword
+* *password* - for PTC account. No need for when using Google.
+
+## Email
+* *email@gmail.com* - for Google account. No need for when using PTC.
+
+## Password
+* *password* - for Google account. No need for when using PTC.
+
+## GoogleRefreshToken
+* *token* - for Google account. No need for wen using PTC. (Obsolete)
## DefaultLatitude
* *12.345678* - Latitude of your location you want to use the bot in. Number between -90 and +90. Doesn't matter how many numbers stand after the comma.
@@ -68,7 +82,8 @@ Go to PokemonGo\RocketAPI\Window\App.config -> Edit the Settings you like -> Bui
* *probability* - Use RazzBerry when Pokémon catch chance is under a specific percentage.
## RazzBerrySetting
-* *value* - CP: Use RazzBerry when Pokémon is over this value | Probability Mode: Use Razzberry when % of catching is under this value
+* *cp value* - If RazzBerryMode is cp. Use RazzBerry when Pokémon is over this value
+* *probability value* - If RazzBerryMode is probability. Use Razzberry when % of catching is under this value. Between 0 and 1.
## TransferType
* *none* - disables transferring
@@ -80,6 +95,19 @@ Go to PokemonGo\RocketAPI\Window\App.config -> Edit the Settings you like -> Bui
## TransferCPThreshold
* *CP* - transfers all Pokémon with less CP than this value.
+## TransferIVThreshold
+* *IV* - transfers all Pokémon with less IV than this value. Between 0 and 1.
+
+## TravelSpeed
+* *Speed* - Travel speed in km/h
+
+## ImageSize
+* *px* - Pixel size for Pokémon Thumbnails
+
+## CatchPokemon
+* *true* - Catch Pokémon and get Items from PokéStops
+* *false* - Don't catch Pokémon and get Items from PokéStops
+
## EvolveAllGivenPokemons
* *false* - Evolves no Pokémon.
* *true* - Evolves all Pokémon.
\ No newline at end of file
You may download the files in Public Git.