I've streamlined the process a little bit, to make it more efficient and easier to call for trades.
Changes:
Initialization of the Trading Process:
To initiate a trade, you can use the pbChoosePokemonForTradePC method with the chosen Pokémon species. For example:
pbChoosePokemonForTradePC(:RATTATA)
Finalization of the Trading Process:
To complete the trade, use the pbStartTradePC method with the following parameters. Most of them are optional:
pbStartTradePC(:HAUNTER, _I("HaHa"), _I("Andrea"), 1)
- The first argument is the Pokémon species you want to trade (required).
- The second argument is the nickname of the traded Pokémon. If left empty, it defaults to the Pokémon's name.
- The third argument is the trainer name (OT Name) for the traded Pokémon. If left empty, it defaults to the Event's name.
- The fourth argument is the gender of the traded Pokémon, defaulted to 0 (Male).
If you wish to change a specific argument, simply pass nil for the other optional arguments. For example:
pbStartTradePC(:HAUNTER, nil, _I("Jim"))
This means you're changing the trainer name to "Jim" while keeping the default nickname and gender.
You can also use a minimal call like this:
pbStartTradePC(:HAUNTER)
This will use defaults for the nickname (Pokémon's name), trainer name (Event's name), and gender (Male). Not all arguments need to be filled, but if you pass an argument, it must be provided. For example, pbStartTradePC(:HAUNTER, _I("Boo")) will set the nickname to "Boo" while using defaults for the other parameters.