• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] How do I check a Pokemon's number of EVs, and reset them if they're illegally high?

  • 428
    Posts
    5
    Years
    pkmn = $Trainer.first_able_pokemon
    if
    pkmn.ev[:TOTAL] >510
    pkmn = $Trainer.first_able_pokemon
    pkmn.ev[:HP] = 0
    pkmn.ev[:ATTACK] = 0
    pkmn.ev[:DEFENSE] = 0
    pkmn.ev[:SPECIAL_ATTACK] = 0
    pkmn.ev[:SPECIAL_DEFENSE] = 0
    pkmn.ev[:SPEED] = 0
    else
    endif
    end

    I need this script to check the first Pokemon in my party, check his number of EVs, and if it's illegally high it needs to reset them all to 0. But I'm still new to scripting in this language. How do I pull it off?
     
    Last edited:
    Back
    Top