Do you mean like in grass/surfing/fishing or like when you battle a legendary?
If in grass/surfing/fishing you need to edit the encounters.txt file.
This wiki page has info for that: http://pokemonessentials.wikia.com/wiki/Encounters#Setting_wild_encounters_for_a_map
If its a legendary then theres a command you can use. pbWildBattle(PBSpecies::species,level,result,escape)
The wiki page has more info on the command: http://pokemonessentials.wikia.com/wiki/Event_encounters#Wild_battles_caused_by_an_event