Advertiser Content
Male
Seen 4 Days Ago
Posted August 5th, 2019
16 posts
7.3 Years
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!
Male
Seen 4 Days Ago
Posted August 5th, 2019
16 posts
7.3 Years
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

mgriffin

Online now
Posted 5 Hours Ago
766 posts
5.6 Years
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:

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.

mgriffin

Online now
Posted 5 Hours Ago
766 posts
5.6 Years
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".
Advertiser Content