• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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: [v13+] Pokémon Selection (similar to Stadium/Battle Tower)

FL

Pokémon Island Creator
  • 2,544
    Posts
    14
    Years
    • Seen yesterday
    [PokeCommunity.com] [v13+] Pokémon Selection (similar to Stadium/Battle Tower)
    [PokeCommunity.com] [v13+] Pokémon Selection (similar to Stadium/Battle Tower)

    Pokémon selection system similar to Stadium/Battle Tower, where you can choose a certain number and order of pokémon.

    Link
    Tested on Essentials v13, v18.1, v19.1, v20.1 and v21.1. If this script isn't working on latest Essentials version, please inform on this thread.
     
    Last edited:
    I tried to use this but when i try this script it directly goes in battle without selection.
    Can you write a example script? with battle.
     
    I tried to use this but when i try this script it directly goes in battle without selection.
    Can you write a example script? with battle.

    Follow the instructions. Notice n the first post:

    # To this script works, put it above main and use in script command # 'PokemonSelection.choose(min, max, canCancel, acceptFainted)'
     
    I tried to use this but when i try this script it directly goes in battle without selection.
    Can you write a example script? with battle.
    Code:
    PokemonSelection.choose(3,3)
    pbTrainerBattle(
      PBTrainers::YOUNGSTER,"Ben",
      _I("\bAww, I lost."))
    PokemonSelection.restore
     
    Wow, FL . nice script... However, It's always nice to see one of my features become less of a unique feature though lol.

    It's great to see you're still giving to the community too.
     
    Little help with this...
    Tried to follow instructions here but I'm getting a
    'PokemonSelection' Line60:SyntaxError

    I'm trying to set it up so that you can enter a 'Fighting Type' only contest, and I have put in all the species allowed to compete and placed it above Main in the scripts sections,
    ADVICE PLEASE???
     
    Little help with this...
    Tried to follow instructions here but I'm getting a
    'PokemonSelection' Line60:SyntaxError

    I'm trying to set it up so that you can enter a 'Fighting Type' only contest, and I have put in all the species allowed to compete and placed it above Main in the scripts sections,
    ADVICE PLEASE???
    Pokécommunity is breaking my scripts. How to solve this:
    Click Thread Tools, and then Show Printable Version, and copy that instead.
    Or use the thread print url: https://www.pokecommunity.com/printthread.php?t=290931




    How to limit selection by pokémon type

    Code:
    # This class uses a type array that only allows the pokémon as valid if it
    # has one of these types when bannedTypes=false or the reverse 
    # when bannedTypes=true
    class TypeRestriction
      def initialize(types, bannedTypes=true)
        @types=types
        @bannedTypes = bannedTypes
      end
    
      def isValid?(pokemon)
        ret=false
        for singleType in @types
          if pokemon.hasType?(singleType)
            ret = true
            break
          end
        end
        ret = !ret if @bannedTypes
        return ret
      end
    end

    Copy this code after my script last line. After line 'ret.ruleset.setNumberRange(min,max)' add 'ret.addPokemonRule(TypeRestriction.new([:FIGHTING],false))'.

    If you, instead of adding 'TypeRestriction.new([:FIGHTING],false))', you add 'TypeRestriction.new([:FIRE,:ICE],false))', only Fire and Ice pokémon would be allowed. If the call is 'TypeRestriction.new([:DRAGON,:FLYING],true))', Flying and Dragon pokémon will be banned.
     
    Ah that's got rid of the error nicely! Thanks.
    What script exactly would I need to use to open the battle now?

    Tried the one suggested near the start of the thread but that's giving me a large error now in game
     
    Ah that's got rid of the error nicely! Thanks.
    What script exactly would I need to use to open the battle now?

    Tried the one suggested near the start of the thread but that's giving me a large error now in game
    Code:
    PokemonSelection.choose(3,3)
    pbTrainerBattle(
      PBTrainers::YOUNGSTER,"Ben",
      _I("\bAww, I lost."))
    PokemonSelection.restore
    Use extendtext.exe or, probably, the small script command window will mess the text.
     
    Great script! I have a couple questions / issues. I am using essentials 17.2 and I have installed all scripts as instructed and everything seems to be working except one thing. Even with it set to not be able cancel the selection I am still able to do so in game. Any idea what the issue might be?

    Any help would be greatly appreciated!
     
    Last edited:
    Great script! I have a couple questions / issues. I am using essentials 17.2 and I have installed all scripts as instructed and everything seems to be working except one thing. Even with it set to not be able cancel the selection I am still able to do so in game. Any idea what the issue might be?
    When "canCancel" is false, the player is prompt to select the pokémon again when pressing cancel. This is happening? If so, the system was worked as should be.
     
    Last edited:
    Oh God. Crash to EBS:

    Spoiler:
     
    If i press cancel. I still have to choose pokemon?? I want that cancel button to cancel the battle.
    Can anyone that has had the same problem tell me how to fix it?
     
    If i press cancel. I still have to choose pokemon?? I want that cancel button to cancel the battle.
    Can anyone that has had the same problem tell me how to fix it?
    Pass 'canCancel' parameter as true. The method return 'false' if cancelled, use this on a conditional to skip the battle.
     
    Sorry, i need help... I want to make a rule in my own pokemon game, the rule is if battling mewtwo, player must be using deoxys and just deoxys. Can i using this script for it? or any script?
     
    Last edited:
    Back
    Top