RocketBot icon indicating copy to clipboard operation
RocketBot copied to clipboard

how to edit pokemon white/black list?

Open Epic81 opened this issue 10 years ago • 8 comments

I would like to know how to edit the white/black list. I want to be able to transfer all weak cp pokemon <200 but retain all pidgeys regardless of cp

Epic81 avatar Aug 01 '16 19:08 Epic81

yeah, for current cp mode, it keeps almost all the rare pokemon(magikarp, haunter, magneton, other evolved pokemon, etc).

lYesterdaYl avatar Aug 01 '16 20:08 lYesterdaYl

If you use "CP" as your transfer type, you can put a CP threshold from which the bot will decide to transfer your pokemon. You can fill it to 200 if you want the anything under 200 to be transfered. For the current implementation, only Eevee and Magikarp will be kept regardless of its CP.

wsalim1610 avatar Aug 02 '16 04:08 wsalim1610

Thanks. I currently have my settings to cp 200 but my question is where is the script located to edit the pokemon that are kept. I want to keep Magikarp and Pidgeys only I have all eevee over 1500 already.

Epic81 avatar Aug 02 '16 04:08 Epic81

It's on MainForm.cs. You can search for a function called TransferAllWeakPokemon. The list is there.

wsalim1610 avatar Aug 02 '16 04:08 wsalim1610

Awesome thanks.

Epic81 avatar Aug 02 '16 05:08 Epic81

Here are some pics of the process for everyone else to see. Comes already with a built-in list just remove the // from the PokemonId.(PokemontoKeep). screen shot 08-01-16 at 10 58 pm 001 screen shot 08-01-16 at 10 58 pm screen shot 08-01-16 at 10 59 pm 001 screen shot 08-01-16 at 10 59 pm

Epic81 avatar Aug 02 '16 06:08 Epic81

I made a change to make this process a bit easier for those that aren't comfortable making code changes. This moves the selection process out of the code and into the app.config. The next logical step would be adding something to the settings dialog.

App.config stuff doesn't copy paste well here so I attached a file to this post with those changes. app.config changes.txt

In Mainform.cs change the top of TransferAllWeakPokemon() to look like this (note that you can just delete the commented out lines as well):

        //ColoredConsoleWrite(ConsoleColor.White, $"Firing up the meat grinder");

        // PokemonId[] doNotTransfer = new[] //these will not be transferred even when below the CP threshold
        //{ // DO NOT EMPTY THIS ARRAY
        //    //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.Eevee//,
        //    //PokemonId.Dratini
        //};

        // Get the do not transfer list from app.config
        List<PokemonId> doNotTransfer = new List<PokemonId>();
        var DoNotTransferList = ConfigurationManager.GetSection("DoNotTransferList") as NameValueCollection;
        if (DoNotTransferList != null)
        {
            foreach (var key in DoNotTransferList.AllKeys)
            {
                string val = DoNotTransferList.GetValues(key).FirstOrDefault();
                if (val.ToLower() == "true")
                {
                    try
                    {
                        PokemonId pokeId = (PokemonId)Enum.Parse(typeof(PokemonId), key);
                        doNotTransfer.Add(pokeId);
                    }
                    catch
                    {
                        ColoredConsoleWrite(Color.Red, $"Invalid entry in DoNotTransferList: {key}.");
                    }
                }
            }
        }

Then modify the DoNotTransferList section of the app.config file to suit your own taste.

BillOatman avatar Aug 03 '16 13:08 BillOatman

I attempted to put this change into the beta branch and submitted a pull request to get it to the main branch. Hopefully I did it right :)

BillOatman avatar Aug 03 '16 18:08 BillOatman