• 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.

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

  • 5
    Posts
    12
    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!
     
  • 772
    Posts
    13
    Years
    • UK
    • Seen May 22, 2024
    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