• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Question] Script that checks Pokemon Level and number in Party?

  • 5
    Posts
    13
    Years
    • Seen Feb 16, 2012
    I am trying to do these 2 things...

    1.Check amount of Pokemon in party, if more than __ you can't continue
    2.Check levels of Pokemon in party, if any are higher than __ you can't continue

    Also Battle Tower doesn't seem to work right. It deletes any Pokemon you don't choose to battle with.(I have the newest version)

    Is there a fix for this?

    I'm new to essentials so please help!
     
    Well, you can get the number of pokemon in a party by using
    $Trainer.party.length

    so you could do something along the lines of
    if $Trainer.party.length > 4


    For levels, you can use
    $Trainer.party[0].level
    which is the level of the first pokemon in the party, for other positions replace the 0 with 0-5

    You can do
    if $Trainer.party[0].level > 50
    for pokemon levels greater than 50
     
    Back
    Top