Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # * Show Species Introdution - by FL (Credits will be apreciated)
- #===============================================================================
- #
- # This script is for Pokémon Essentials. It shows a picture with the pokémon
- # species in a border, show a message with the name and kind, play it cry and
- # mark it as seen in pokédex. Good to make the starter selection event.
- #
- #===============================================================================
- #
- # To this script works, put it above main.
- #
- # To call it, use showSpeciesIntro(species,complement) where the specie is
- # the species number and complement is an optional string complement (like
- # "f" or "_3") to show other sprites like the female one or the other
- # forms ones.
- # Ex: 'showSpeciesIntro(4)' shows Charmander,
- # 'showSpeciesIntro(PBSpecies::CHIKORITA)' shows Chikorita and
- # 'showSpeciesIntro(422,"_1")' shows Shellos in East Sea form.
- #
- #===============================================================================
- def showSpeciesIntro(species,complement="",nickname="")
- name=PBSpecies.getName(species)
- kind=pbGetMessage(MessageTypes::Kinds,species)
- # Uncomment the line below so that it will show the species on pokédex as seen.
- #$Trainer.seen[species]=true
- battlername=sprintf("Graphics/Battlers/%03d%s",species,complement)
- bitmap=pbResolveBitmap(battlername)
- pbPlayCry(species)
- if bitmap # to prevent crashes
- iconwindow=PictureWindow.new(bitmap)
- iconwindow.x=(Graphics.width/2)-(iconwindow.width/2)
- iconwindow.y=((Graphics.height-96)/2)-(iconwindow.height/2)
- if nickname==""
- Kernel.pbMessage(_INTL("{1}. The {2} Pokémon.",name,kind))
- else
- Kernel.pbMessage(_INTL("{1}. The {2} Pokémon.",nickname,kind))
- end
- iconwindow.dispose
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement