From the wiki: http://pokemonessentials.wikia.com/wiki/Trainers#Structure_of_trainer_events
When you create the battle, just edit the script in the conditional branch.
pbTrainerBattle(PBTrainers::PkMnTrainer,"Ash",_I("That was fun!"),false,4,true) would start a battle against Ash where it's not...