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

[Custom Feature Question] help with healing all pokemon in pc

16
Posts
11
Years
    • Seen Apr 25, 2020
    i want to create a storage system similar to the lets go games where you can access your storage from anywhere in the game. i have successfully added the option of accessing storage from the pause menu, as well as disabled pokemon being healed when deposited. what im looking for is a way to heal all pokemon in storage when visiting a pokecenter. help with this would be much appreciated!
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Do you know where the Pokécenter heal script is? Should be easy enough to alter it so that in addition to healing the party it also loops over all the Pokémon in the PC and heals those too. What part are you having trouble with?
     
    16
    Posts
    11
    Years
    • Seen Apr 25, 2020
    Do you know where the Pokécenter heal script is? Should be easy enough to alter it so that in addition to healing the party it also loops over all the Pokémon in the PC and heals those too. What part are you having trouble with?
    the problem with the pokecenter script is it uses the event command "recover all..." and from there you can only choose entire party or player, and both just heal the party. i also found this script that again just heals the whole party:

    for i in $Trainer.party
    i.heal
    end

    i thought this might be a good starting point but no luck
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    the problem with the pokecenter script is it uses the event command "recover all..." and from there you can only choose entire party or player, and both just heal the party.
    Yeah, so my suggestion was to find that script in the Essentials code and modify it to loop over the Pokémon in storage...

    i also found this script that again just heals the whole party:

    Code:
    for i in $Trainer.party
      i.heal
    end

    i thought this might be a good starting point but no luck
    ... And that does look like a good starting point. But instead of looping over $Trainer.party you need to (additionally) loop over the Pokémon in $PokemonStorage, which you'll probably have to do by looping over the boxes in the storage, and then over each Pokémon in those boxes.
     
    Last edited:
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    where would i find that at? i searched through the scripts but not exactly sure what im looking for

    I don't know. Try searching all files (Ctrl+Shift+F) for ".heal" and work your way through until you find something that looks like the code for healing the party (i.e. similar to the code you posted earlier).

    Or you could try looking on the Essentials wiki for the name of the function to call from an event to heal the party, and see if you can find it by searching for "def name-of-function".
     
    Last edited:
    Back
    Top