• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • 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.

[Scripting Question] A way to call the Rare Candy script?

Yes.
Just copy the script inside the Rare Candy, and change some lines around
I did it for you because I am so nice!
Try it out and see if it works!

def pbDoRareCandyEffect(index = 0)
pkmn = $player.party[index]
if pkmn.shadowPokemon? || pkmn.egg?
pbMessage(_INTL("It won't have any effect."))
next false
end
if pkmn.level >= GameData::GrowthRate.max_level
new_species = pkmn.check_evolution_on_level_up
if !Settings::RARE_CANDY_USABLE_AT_MAX_LEVEL || !new_species
pbMessage(_INTL("It won't have any effect."))
return false
end
# Check for evolution
pbFadeOutInWithMusic do
evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn, new_species)
evo.pbEvolution
evo.pbEndScreen
end
return true
end
# Level up
pbSEPlay("Pkmn level up")
# Tricked scene into not crashing by putting any non nil object at third argument
pbChangeLevel(pkmn, pkmn.level + qty, pkmn)
return true
end

Hope this helps!
Swdfm
 
Yes.
Just copy the script inside the Rare Candy, and change some lines around
I did it for you because I am so nice!
Try it out and see if it works!

def pbDoRareCandyEffect(index = 0)
pkmn = $player.party[index]
if pkmn.shadowPokemon? || pkmn.egg?
pbMessage(_INTL("It won't have any effect."))
next false
end
if pkmn.level >= GameData::GrowthRate.max_level
new_species = pkmn.check_evolution_on_level_up
if !Settings::RARE_CANDY_USABLE_AT_MAX_LEVEL || !new_species
pbMessage(_INTL("It won't have any effect."))
return false
end
# Check for evolution
pbFadeOutInWithMusic do
evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn, new_species)
evo.pbEvolution
evo.pbEndScreen
end
return true
end
# Level up
pbSEPlay("Pkmn level up")
# Tricked scene into not crashing by putting any non nil object at third argument
pbChangeLevel(pkmn, pkmn.level + qty, pkmn)
return true
end

Hope this helps!
Swdfm
Thanks for responding!

I just came back to this post to update it with the fix I found. But it looks like you beat me too it! Thanks for helping everyone that found this thread.
 
Back
Top