Ame, I have a temporary solution for Pokemon obtained from in-game events.
If you just tweak the one above a bit and stick it in place of the normal pbAddPokemon script in the event it should work
e.g.
poke=PokeBattle_Pokemon.new(:GOLDEEN,10,$Trainer)
pbAddPokemon(poke)
i=rand(3)
poke.setAbility(0) if i==0
poke.setAbility(1) if i==1
poke.setAbility(2) if i==2
I've only tried this on Pokes with 3 abilities at the moment, though. But it should work on those with 2...