species=PBSpecies::TOGEPI
dexdata=pbOpenDexData
pbDexDataOffset(dexdata,species,21)
eggsteps=dexdata.fgetw
dexdata.close
poke=PokeBattle_Pokemon.new(species,EGGINITIALLEVEL,$Trainer)
poke.calcstats
poke.name=_INTL("Egg")
poke.eggsteps=eggsteps
pbAddToPartySilent(poke)
i=rand(247)
Kernel.pbGenerateEgg(
PBSpecies::CATERPIE,1
)if i==0
Kernel.pbGenerateEgg(
PBSpecies::WEEDLE,1
) if i==1
Kernel.pbGenerateEgg(
PBSpecies::PIDGEY,1
)if i==2
I need it for these two things.p=PokeBattle_Pokemon.new(
PBSpecies::ARCEUS,100,$Trainer
)
# Arceus Eigakan Event
pbAutoLearnMove(p,PBMoves::JUDGMENT)
pbAutoLearnMove(p,PBMoves::ROAROFTIME)
pbAutoLearnMove(p,PBMoves::SPACIALREND)
pbAutoLearnMove(p,PBMoves::SHADOWFORCE)
# Add the Pokemon
$Trainer.party.push(p)
Just include a check before playing your lottery, so that you can't play with a full party. Then you can use your code just fine. This is by far the best and simplest solution.