• 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!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our 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.

Item that forces evolution

Yep, look at how the stones work

Code:
ItemHandlers::UseOnPokemon.add(:FIRESTONE,proc{|item,pokemon,scene|
   if (pokemon.isShadow? rescue false)
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   end
   newspecies=pbCheckEvolution(pokemon,item)
   if newspecies<=0
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   else
     pbFadeOutInWithMusic(99999){
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution(false)
        evo.pbEndScreen
        scene.pbRefreshAnnotations(proc{|p| pbCheckEvolution(p,item)>0 })
        scene.pbRefresh
     }
     next true
   end
})

ItemHandlers::UseOnPokemon.copy(:FIRESTONE,
   :THUNDERSTONE,:WATERSTONE,:LEAFSTONE,:MOONSTONE,
   :SUNSTONE,:DUSKSTONE,:DAWNSTONE,:SHINYSTONE[COLOR="Red"],:YOURITEMHERE[/COLOR])
 
Yep, look at how the stones work

Code:
ItemHandlers::UseOnPokemon.add(:FIRESTONE,proc{|item,pokemon,scene|
   if (pokemon.isShadow? rescue false)
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   end
   newspecies=pbCheckEvolution(pokemon,item)
   if newspecies<=0
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   else
     pbFadeOutInWithMusic(99999){
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution(false)
        evo.pbEndScreen
        scene.pbRefreshAnnotations(proc{|p| pbCheckEvolution(p,item)>0 })
        scene.pbRefresh
     }
     next true
   end
})

ItemHandlers::UseOnPokemon.copy(:FIRESTONE,
   :THUNDERSTONE,:WATERSTONE,:LEAFSTONE,:MOONSTONE,
   :SUNSTONE,:DUSKSTONE,:DAWNSTONE,:SHINYSTONE[COLOR="Red"],:YOURITEMHERE[/COLOR])
I would do an item that force the evolution and devolution (?) of all pokemon :D Can you help me?
 
i tried to do an item that force the evolutions of all pokemon. I modified the fire stone. Here is the script:
ItemHandlers::UseOnPokemon.add(:FIRESTONE,proc{|item,pokemon,scene|
if (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
if newspecies<=0
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pbFadeOutInWithMusic(99999){
evo=PokemonEvolutionScene.new
evo.pbStartScreen(pokemon,newspecies)
evo.pbEvolution
evo.pbEndScreen
}
next true
end
It gave me an error...



---------------------------
Pokemon Essentials
---------------------------
Exception: NameError

Message: undefined local variable or method `newspecies' for nil:NilClass

PokemonItemEffects:144

PokemonItemEffects:139:in `call'

PBEvent:150:in `trigger'

PokemonItems:196:in `triggerUseOnPokemon'

PokemonItems:517:in `pbUseItem'

PokemonItems:509:in `loop'

PokemonItems:531:in `pbUseItem'

PokemonItems:505:in `pbFadeOutIn'

PokemonItems:505:in `pbUseItem'

PokemonBag:695:in `pbStartScreen'



This exception was logged in

C:\Users\Utente\Saved Games/Pokemon Essentials/errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------


I also tried to do an item that decrease the level of pokemon of one unit, but when I choose it from the bag doesn't appear the option "use"

ItemHandlers::UseOnPokemon.add(:MYSTERYCANDY,proc{|item,pokemon,scene|
if pokemon.level<=PBExperience::MINLEVEL || (pokemon.isShadow? rescue false)
scene.pbDisplay(_INTL("It won't have any effect."))
next false
else
pbChangeLevel(pokemon,pokemon.level-1,scene)
scene.pbHardRefresh
next true
end

(I don't know if "MINLEVEL" EXIST AHAH )
 
Force Evolve
Code:
def pbForceEvo(pokemon)
  for form in pbGetEvolvedFormData(pokemon.species)
    newspecies=form[2]
  end
  return if !newspecies
  if newspecies>0
    evo=PokemonEvolutionScene.new
    evo.pbStartScreen(pokemon,newspecies)
    evo.pbEvolution
    evo.pbEndScreen
  end
end

Force DeEvolve
Code:
def pbForceDeEvo(pokemon)
  for form in pbGetEvolvedFormData(pokemon.species)
    newspecies=form[1]
  end
  return if !newspecies
  if newspecies>0
    evo=PokemonEvolutionScene.new
    evo.pbStartScreen(pokemon,newspecies)
    evo.pbEvolution
    evo.pbEndScreen
  end
end
 
Yep, look at how the stones work

Code:
ItemHandlers::UseOnPokemon.add(:FIRESTONE,proc{|item,pokemon,scene|
   if (pokemon.isShadow? rescue false)
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   end
   newspecies=pbCheckEvolution(pokemon,item)
   if newspecies<=0
     scene.pbDisplay(_INTL("It won't have any effect."))
     next false
   else
     pbFadeOutInWithMusic(99999){
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution(false)
        evo.pbEndScreen
        scene.pbRefreshAnnotations(proc{|p| pbCheckEvolution(p,item)>0 })
        scene.pbRefresh
     }
     next true
   end
})

ItemHandlers::UseOnPokemon.copy(:FIRESTONE,
   :THUNDERSTONE,:WATERSTONE,:LEAFSTONE,:MOONSTONE,
   :SUNSTONE,:DUSKSTONE,:DAWNSTONE,:SHINYSTONE[COLOR="Red"],:YOURITEMHERE[/COLOR])

What script section is this in? I have problems with adding new evolutionary items myself. In the bag I'm not seeing the "Use" option and I have selected "Use on a Pokemon" in the editor for the item and for the pokemon I set it to evolve to item, and the item I specified.
 
Back
Top