• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Script for giving a pokemon with specific data

22
Posts
7
Years
    • Seen Jan 25, 2018
    I'm a noob at Essentials, and I can't seem to find what I have to do to give a pokemon with certain moves/stats.
    If someone can tell me what the script is, i will really appreciate it :)
    I need it for a beginning event in my game :p
     
    1,682
    Posts
    8
    Years
    • Seen today
    First of, check the wiki. It tells you how to modify almost every aspect of a pokemon.
    Also, if you check out the map called Pokemon Fan Club in clean v16+, it has examples of modifying pokemon after they are given.

    Here, I copied one for ya.
    Code:
    [COLOR="SeaGreen"]Comment: Editing a foreign Pok?mon added with this method 
    can only be done afterwards. Remember to add 
    "poke.calcStats" at the end.
    Comment: The added Pok?mon will always be at the end of the 
    player's party, so you can use $Trainer.lastParty to 
    locate it.[/COLOR]
    poke=$Trainer.lastParty
    poke.setAbility(2)   # Hidden Ability
    poke.setNature(:MODEST)
    poke.ballused=15     # Cherish Ball
    poke.makeShiny
    poke.calcStats
     
    1,224
    Posts
    10
    Years
  • First of, check the wiki. It tells you how to modify almost every aspect of a pokemon.
    Also, if you check out the map called Pokemon Fan Club in clean v16+, it has examples of modifying pokemon after they are given.

    Here, I copied one for ya.
    Code:
    [COLOR="SeaGreen"]Comment: Editing a foreign Pok?mon added with this method 
    can only be done afterwards. Remember to add 
    "poke.calcStats" at the end.
    Comment: The added Pok?mon will always be at the end of the 
    player's party, so you can use $Trainer.lastParty to 
    locate it.[/COLOR]
    poke=$Trainer.lastParty
    poke.setAbility(2)   # Hidden Ability
    poke.setNature(:MODEST)
    poke.ballused=15     # Cherish Ball
    poke.makeShiny
    poke.calcStats

    There's a slight problem with this solution. In some cases, the pokemon might be sent to the pc instead. The better option is to create the mon first, and then give it to the player
    Code:
    poke = PokeBattle_Pokemon.new(:MEW, 15, $Trainer)
    poke.setAbility(2)
    poke.setNature(:MODEST)
    poke.ballused=15
    poke.makeShiny
    poke.calcStats
    pbAddToParty(poke)
     
    Back
    Top