What in particular would you like to know? The random team generation is done through a routine which was made by FBI agent, I've asked him if I can share it and if he says yeah I'll send it to you, but the basic gist of it is that it generates a random number using the built in function, compares the resultant value with those in a table which consist of blacklisted species (legendaries and whatnot), and then repeats this thrice to generate a full team. The rest of it is just a lot of scripting: the Trainers are generated using random and createsprite, with their Trainer sprites being set based on a variable. The BP is just a variable which is incremented by one after each battle's victory, with the BP shop being a lot of multichoices. Setting the team to level 50 is done by one of FBI agent's public routines in his ASM Resource Thread, and the team selection and "cutting" is done using the built-in specials 0x9F, 0x27, 0x28 and probably a few others that I've forgotten.
If you want to take a look at my scripts feel free to ask.
If you want to take a look at my scripts feel free to ask.