Advertisement
xCamero

Scaling trainer evolutions by Leilou

Jul 21st, 2017
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. I just wrote it into a new script ... but anywhere outside of any class works
  2. ================================================
  3. def evolvePokemonSilent(pokemon)
  4. newspecies=pbCheckEvolution(pokemon)
  5. if newspecies == -1
  6. return pokemon
  7. end
  8. newspeciesname=PBSpecies.getName(newspecies)
  9. oldspeciesname = pokemon.name
  10. pokemon.species=newspecies
  11. pokemon.name=newspeciesname if pokemon.name==oldspeciesname
  12. pokemon.calcStats
  13. return pokemon
  14. end
  15. ================================================
  16.  
  17. Then you go to where you want to do the evolution check ... i did it inPTrainer_NPCTrainers script in pbLoadTrainer method
  18. right before the last line of the method
  19. ================================================
  20. return success ? [opponent,items,party] : nil
  21. ================================================
  22.  
  23. insert this block of code here
  24. ================================================
  25. #check every pokemon if it can evolve and evolve it
  26. for i in 0 ... party.length
  27. while party[i] && (pbCheckEvolution(party[i]) > -1) do
  28. party[i] = evolvePokemonSilent(party[i])
  29. end
  30. end
  31. ================================================
  32.  
  33. it works on clean essentials 16.2
  34. it's evolve the pokemon multiple times
  35. like bulbasaur into venisaur if the conditions are met
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement