Advertisement
Guest User

FL's Species Intro

a guest
Sep 24th, 2014
629
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.90 KB | None | 0 0
  1. #===============================================================================
  2. # * Show Species Introdution - by FL (Credits will be apreciated)
  3. #===============================================================================
  4. #
  5. # This script is for Pokémon Essentials. It shows a picture with the pokémon
  6. # species in a border, show a message with the name and kind, play it cry and
  7. # mark it as seen in pokédex. Good to make the starter selection event.
  8. #
  9. #===============================================================================
  10. #
  11. # To this script works, put it above main.
  12. #
  13. # To call it, use showSpeciesIntro(species,complement) where the specie is
  14. # the species number and complement is an optional string complement (like
  15. # "f" or "_3") to show other sprites like the female one or the other
  16. # forms ones.
  17. # Ex: 'showSpeciesIntro(4)' shows Charmander,
  18. # 'showSpeciesIntro(PBSpecies::CHIKORITA)' shows Chikorita and
  19. # 'showSpeciesIntro(422,"_1")' shows Shellos in East Sea form.
  20. #
  21. #===============================================================================
  22.  
  23.   def showSpeciesIntro(species,complement="",nickname="")
  24.     name=PBSpecies.getName(species)
  25.     kind=pbGetMessage(MessageTypes::Kinds,species)
  26.     # Uncomment the line below so that it will show the species on pokédex as seen.
  27.     #$Trainer.seen[species]=true
  28.     battlername=sprintf("Graphics/Battlers/%03d%s",species,complement)
  29.     bitmap=pbResolveBitmap(battlername)
  30.     pbPlayCry(species)
  31.     if bitmap # to prevent crashes
  32.       iconwindow=PictureWindow.new(bitmap)
  33.       iconwindow.x=(Graphics.width/2)-(iconwindow.width/2)
  34.       iconwindow.y=((Graphics.height-96)/2)-(iconwindow.height/2)
  35.       if nickname==""
  36.         Kernel.pbMessage(_INTL("{1}. The {2} Pokémon.",name,kind))
  37.       else
  38.         Kernel.pbMessage(_INTL("{1}. The {2} Pokémon.",nickname,kind))
  39.       end  
  40.       iconwindow.dispose
  41.     end
  42.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement