# v18PP Does not restore

This thread pertains to v18 of Pokémon Essentials.

#### Akvagirl

##### Shiny hunting for Mudkip
Member
If I use Recover All:Entire Party It does not restore the PP of the Pokemon and If a Pokemon faints it's also does not restore its PP and it's really important in a Pokemon game so please help!

#### Golisopod User

Member
Try using
Code:
for i in $Trainer.party i.heal end #### Akvagirl ##### Shiny hunting for Mudkip Member Try using Code: for i in$Trainer.party
i.heal
end
I tried and it didn't work.

#### NettoHikari

##### Cooltrainer
Member
I tried and it didn't work.
Can you show what your function "def healPP(index=-1)" inside PokeBattle_Pokemon looks like?

#### Akvagirl

##### Shiny hunting for Mudkip
Member
Can you show what your function "def healPP(index=-1)" inside PokeBattle_Pokemon looks like?

#### NettoHikari

##### Cooltrainer
Member
That looks correct, then can you also show the function "def heal" inside the same script section? Both functions restore PP for me (using the GitHub version). Can you also try running the following code:
Ruby:
for i in $Trainer.party i.healPP end #### Akvagirl ##### Shiny hunting for Mudkip Member That looks correct, then can you also show the function "def heal" inside the same script section? Both functions restore PP for me (using the GitHub version). Can you also try running the following code: Ruby: for i in$Trainer.party
i.healPP
end

I tried using

for i in $Trainer.party i.healPP end and it's also doesn't work. #### NettoHikari ##### Cooltrainer Member View attachment 1202 I tried using for i in$Trainer.party
i.healPP
end

and it's also doesn't work.
That also looks correct. I'm sorry to say that it must be something you've done in your own project that is causing this bug. Did you add any third-party scripts that might be messing with these functions? If you CTRL + Shift + F search for "def heal" or "def healPP", do you get any results besides what you showed in PokeBattle_Pokemon? If you do then check to make sure those aren't overwriting the code in PokeBattle_Pokemon in such a way that they don't heal PP.

#### Akvagirl

##### Shiny hunting for Mudkip
Member
That also looks correct. I'm sorry to say that it must be something you've done in your own project that is causing this bug. Did you add any third-party scripts that might be messing with these functions? If you CTRL + Shift + F search for "def heal" or "def healPP", do you get any results besides what you showed in PokeBattle_Pokemon? If you do then check to make sure those aren't overwriting the code in PokeBattle_Pokemon in such a way that they don't heal PP.
Hi, so it's been a while now, I just wanted to do other things and I just forgot about my game, but a few hours ago my friend asked me about the game, so I looked at the scripts and then I thought maybe the PP thing doesn't work because of the Nuzlocke script, so I removed the script and yeah, the PP didn't restore because of the Nuzlocke script, but I really want the Nuzlock script to be in the game so... do you now how I can fix this problem?

#### NettoHikari

##### Cooltrainer
Member
Hi, so it's been a while now, I just wanted to do other things and I just forgot about my game, but a few hours ago my friend asked me about the game, so I looked at the scripts and then I thought maybe the PP thing doesn't work because of the Nuzlocke script, so I removed the script and yeah, the PP didn't restore because of the Nuzlocke script, but I really want the Nuzlock script to be in the game so... do you now how I can fix this problem?
JV's Nuzlocke script works such that fainted Pokemon don't get healed at all, including PP. Because why would you want to be able to revive fainted Pokemon in Nuzlocke mode? Now, I'm looking at the script and I don't see any issues with it not being able to heal the PP of Pokemon that are not fainted. Tell me exactly what happened when you were testing healing with the Nuzlocke script - are you saying that all of your Pokemon, whether fainted or unfainted, only got their HP and status healed, and NOT their PP? Or is it something else?

#### Akvagirl

##### Shiny hunting for Mudkip
Member
JV's Nuzlocke script works such that fainted Pokemon don't get healed at all, including PP. Because why would you want to be able to revive fainted Pokemon in Nuzlocke mode? Now, I'm looking at the script and I don't see any issues with it not being able to heal the PP of Pokemon that are not fainted. Tell me exactly what happened when you were testing healing with the Nuzlocke script - are you saying that all of your Pokemon, whether fainted or unfainted, only got their HP and status healed, and NOT their PP? Or is it something else?
I battled a trainer, healed my Pokemon and they only got their HP and status healed, but not the PP.
I was testing it in Nuzlocke mode AND in normal mode but no matter what mode I'm in, the PP does not restore.

#### NettoHikari

##### Cooltrainer
Member
I battled a trainer, healed my Pokemon and they only got their HP and status healed, but not the PP.
I was testing it in Nuzlocke mode AND in normal mode but no matter what mode I'm in, the PP does not restore.
I would suggest trying to redownload the Nuzlocke script, install it correctly, and try again. If it still doesn't heal PP, DM me your Scripts.rxdata and I'll have a look. I don't think anyone else has ever gotten this issue with the Nuzlocke script, so it is definitely something in your game that is causing it.

#### Akvagirl

##### Shiny hunting for Mudkip
Member
I would suggest trying to redownload the Nuzlocke script, install it correctly, and try again. If it still doesn't heal PP, DM me your Scripts.rxdata and I'll have a look. I don't think anyone else has ever gotten this issue with the Nuzlocke script, so it is definitely something in your game that is causing it.
Okay so... It works now! I just deleted the script, saved my project, added the script again, saved the project again and now it's working... I don't know if I did something different this time but it works so thanks for all the help!!!