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

How to prevent depositing of a certain Pokémon species

5
Posts
8
Years
  • Hello everybody,

    I have another question for you.
    Please, please help me out with this. It will play an important role in my Game.

    I would like to change the script of the storage system, so that the player can't deposit a certain Pokémon species into the box.
    I know there is a Video on YouTube about this, but I swear I tried and checked it a thousand times and it just doesn`t work.
    I know how to prevent the release of a certain species, but the above mentioned just won't work. Maybe it is because the script in the video isn't compatible with the recent version of essentials?

    Does anybody have a script for this?

    And if you do, please tell me, where to place it in the storage script and if necessary what to remove instead.

    Thanks in advance! :)
    Greetings Cary-Ina
     
    59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    I'll try to look at this when I'm in front of a computer, but your best bet is checking the code in which the Pc doesn't let you deposit a Pokemon if it's your last one in the party, and instead of checking if it's the last, checking for a species.
     
    5
    Posts
    8
    Years
  • Hey Kiedisticelixer,
    Thank you for your quick answer!:) I'll have a look at what you suggested, but I fear I'm not good enough with scripting, to enter the right commands... :(
    If you find some spare time, could you please help me with that?

    Thanks again
    greetings :)
    Cary
     
    824
    Posts
    8
    Years
  • I actually did this in my party for a sidequest in my game. The "Pokemon" in question isn't actually a Pokemon, so no stuffing her in the PC...at least until her happiness is high enough. I'll have a look at the alterations I made - they're in a lot of different places in PScreen_Storage.
     
    824
    Posts
    8
    Years
  • This is all done in the script section PScreen_Storage:

    Step 1
    In the function "pbRelease", which starts around line 234, you should find the following code. Insert the red part:
    Code:
        if pokemon.isEgg?
          pbDisplay(_INTL("You can't release an Egg."))
          return false
        elsif pokemon.mail
          pbDisplay(_INTL("Please remove the mail."))
          return false[COLOR="Red"]
        elsif isConst?(pokemon.species,PBSpecies,:SPECIES) # <- replace with the species name in all caps
          pbDisplay(_INTL("This species can't be released."))
          return false[/COLOR]
        end
    This step can be ignored if you want the player to be able to release the species.

    Step 2
    In the function "pbStore", which starts around line 289, you should see the following code. Add the red part:
    Code:
        if pbAbleCount<=1 && pbAble?(@storage[box,index]) && !heldpoke
          pbDisplay(_INTL("That's your last Pokémon!"))
        elsif @storage[box,index].mail
          pbDisplay(_INTL("Please remove the Mail."))[COLOR="red"]
        elsif isConst?(@storage[box,index].species,PBSpecies,:SPECIES) # <- replace with the species name in all caps
          pbDisplay(_INTL("This species cannot be placed in storage."))[/COLOR]
        else

    Step 3
    In the function "pbSwap", which starts around line 367, you should find the following code. Add the red part:
    Code:
        if box==-1 && pbAble?(@storage[box,index]) && pbAbleCount<=1 && !pbAble?(@heldpkmn)
          pbDisplay(_INTL("That's your last Pokémon!"))
          return false
        end
        if box!=-1 && @heldpkmn.mail
          pbDisplay("Please remove the mail.")
          return false
        end[COLOR="red"]
        if box!=-1 && isConst?(@heldpkmn.species,PBSpecies,:SPECIES) # <- replace with the species name in all caps
          pbDisplay(_INTL("This species cannot be placed in storage."))
          return false
        end[/COLOR]

    Step 4
    Very similar to the last step. In the function "pbPlace", which starts around line 397, you should find the following code. Add the red part:
    Code:
        if box!=-1 && index>[email protected](box)
          pbDisplay("Can't place that there.")
          return
        end
        if box!=-1 && @heldpkmn.mail
          pbDisplay("Please remove the mail.")
          return
        end[COLOR="red"]
        if box!=-1 && isConst?(@heldpkmn.species,PBSpecies,:SPECIES) # <- replace with the species name in all caps
          pbDisplay(_INTL("This species cannot be placed in storage."))
          return false
        end[/COLOR]
     
    5
    Posts
    8
    Years
  • Dear Rot8er_ConeX,

    Thank you so much for your awesome support! Honestly you really did help me a great deal with your Reply! That is exactly what I was searching for. And it works just fine! :)
    I am so going to credit you for this!

    Again, thank you!
    Best wishes
    Cary
     
    Back
    Top