diff --git a/PoGo.NecroBot.Logic/Common/Translations.cs b/PoGo.NecroBot.Logic/Common/Translations.cs index 953a5a18c..1e02529a7 100644 --- a/PoGo.NecroBot.Logic/Common/Translations.cs +++ b/PoGo.NecroBot.Logic/Common/Translations.cs @@ -340,7 +340,7 @@ public class Translation : ITranslation new KeyValuePair(TranslationString.NoIncenseAvailable, "No Incense Available"), new KeyValuePair(TranslationString.UseIncenseActive, "Incense Already Active"), new KeyValuePair(TranslationString.AmountPkmSeenCaught, - "Amount of Pokemon Seen:{}:151, Amount of Pokemon Caught:{}:151"), + "Amount of Pokemon Seen: {0}/151, Amount of Pokemon Caught: {1}/151"), new KeyValuePair(TranslationString.PkmPotentialEvolveCount, "[Evolves] Potential Evolves: {}"), new KeyValuePair(TranslationString.PkmNotEnoughRessources, diff --git a/PoGo.NecroBot.Logic/Inventory.cs b/PoGo.NecroBot.Logic/Inventory.cs index 2bac36d42..64d9bc7a9 100644 --- a/PoGo.NecroBot.Logic/Inventory.cs +++ b/PoGo.NecroBot.Logic/Inventory.cs @@ -308,15 +308,12 @@ public async Task> GetPokeDexItems() var hfgds = await _client.Inventory.GetInventory(); for (int i = 0; i < hfgds.InventoryDelta.InventoryItems.Count; i++) { - if (hfgds.InventoryDelta.InventoryItems[i].ToString().ToLower().Contains("pokedex") && hfgds.InventoryDelta.InventoryItems[i].ToString().ToLower().Contains("timescaptured")) + if (hfgds.InventoryDelta.InventoryItems[i].ToString().ToLower().Contains("pokedex") && hfgds.InventoryDelta.InventoryItems[i].ToString().ToLower().Contains("timesencountered")) { PokeDex.Add(hfgds.InventoryDelta.InventoryItems[i]); } - - } return PokeDex; - } public async Task> GetPokemonFamilies() diff --git a/PoGo.NecroBot.Logic/Settings.cs b/PoGo.NecroBot.Logic/Settings.cs index 35eeed05b..d0703e785 100644 --- a/PoGo.NecroBot.Logic/Settings.cs +++ b/PoGo.NecroBot.Logic/Settings.cs @@ -151,10 +151,10 @@ public class GlobalSettings public bool PrioritizeIvOverCp = false; //luckyandincense public bool UseEggIncubators = true; - public bool UseLuckyEggConstantly = true; + public bool UseLuckyEggConstantly = false; public int UseLuckyEggsMinPokemonAmount = 30; public bool UseLuckyEggsWhileEvolving = false; - public bool UseIncenseConstantly = true; + public bool UseIncenseConstantly = false; //snipe public bool UseSnipeOnlineLocationServer = true; public bool UseSnipeLocationServer = false; @@ -178,13 +178,13 @@ public class GlobalSettings public int TotalAmountOfPotionsToKeep = 80; public int TotalAmountOfRevivesToKeep = 60; //balls - public int UseGreatBallAboveCp = 750; - public int UseUltraBallAboveCp = 1000; + public int UseGreatBallAboveCp = 1000; + public int UseUltraBallAboveCp = 1250; public int UseMasterBallAboveCp = 1500; - public int UseGreatBallAboveIv = 80; + public int UseGreatBallAboveIv = 85; public int UseUltraBallAboveIv = 90; - public double UseGreatBallBelowCatchProbability = 0.5; - public double UseUltraBallBelowCatchProbability = 0.4; + public double UseGreatBallBelowCatchProbability = 0.3; + public double UseUltraBallBelowCatchProbability = 0.2; public double UseMasterBallBelowCatchProbability = 0.05; //transfer public bool TransferDuplicatePokemon = true; diff --git a/PoGo.NecroBot.Logic/Tasks/FarmPokestopsGPXTask.cs b/PoGo.NecroBot.Logic/Tasks/FarmPokestopsGPXTask.cs index efec15193..e4cd01d7b 100644 --- a/PoGo.NecroBot.Logic/Tasks/FarmPokestopsGPXTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/FarmPokestopsGPXTask.cs @@ -100,6 +100,12 @@ public static async Task Execute(ISession session, CancellationToken cancellatio Longitude = pokeStop.Longitude }); } + else + { + await RecycleItemsTask.Execute(session, cancellationToken); + + } + if (fortSearch.ItemsAwarded.Count > 0) { await session.Inventory.RefreshCachedInventory(); diff --git a/PoGo.NecroBot.Logic/Tasks/FarmPokestopsTask.cs b/PoGo.NecroBot.Logic/Tasks/FarmPokestopsTask.cs index 48b06630d..54d94578d 100644 --- a/PoGo.NecroBot.Logic/Tasks/FarmPokestopsTask.cs +++ b/PoGo.NecroBot.Logic/Tasks/FarmPokestopsTask.cs @@ -145,13 +145,14 @@ await session.Navigation.Move(new GeoCoordinate(pokeStop.Latitude, pokeStop.Long Longitude = pokeStop.Longitude, InventoryFull = fortSearch.Result == FortSearchResponse.Types.Result.InventoryFull }); + await RecycleItemsTask.Execute(session, cancellationToken); break; //Continue with program as loot was succesfull. } } while (fortTry < retryNumber - zeroCheck); //Stop trying if softban is cleaned earlier or if 40 times fort looting failed. - await Task.Delay(1000, cancellationToken); + //await Task.Delay(1000, cancellationToken); await eggWalker.ApplyDistance(distance, cancellationToken); diff --git a/PoGo.NecroBot.Logic/Tasks/GetPokeDexCount.cs b/PoGo.NecroBot.Logic/Tasks/GetPokeDexCount.cs index a9480668e..82963b590 100644 --- a/PoGo.NecroBot.Logic/Tasks/GetPokeDexCount.cs +++ b/PoGo.NecroBot.Logic/Tasks/GetPokeDexCount.cs @@ -6,33 +6,25 @@ using System.Threading; using System.Threading.Tasks; using PoGo.NecroBot.Logic.Logging; +using PoGo.NecroBot.Logic.Common; namespace PoGo.NecroBot.Logic.Tasks { class GetPokeDexCount { - - public static async Task Execute(ISession session, CancellationToken cancellationToken) { - int Amount = 0; + int timesCaptured = 0; var PokeDex = await session.Inventory.GetPokeDexItems(); for (int i = 0; i < PokeDex.Count; i++) { var CaughtPokemon = PokeDex[i].ToString().Split(new[] { "timesCaptured" }, StringSplitOptions.None); var split = CaughtPokemon[1].Split(' '); int Times = int.Parse(split[1]); - if (Times == 0) - { - - - } - else - { - Amount++; - } + if (Times > 0) + timesCaptured++; } - Logger.Write("Amount Of Pokemon Seen:" + PokeDex.Count + ":151" + ", Amount Of Pokemon Caught:" + Amount + ":151"); + Logger.Write(session.Translation.GetTranslation(TranslationString.AmountPkmSeenCaught, PokeDex.Count, timesCaptured)); } } } \ No newline at end of file