Advertisement
FiaPlay

Gift_Basic

Apr 29th, 2024 (edited)
1,955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.72 KB | None | 0 0
  1. ####################################################
  2. # BASE DE REGALO MISTERIOSO PARA EL SCRIPT DE REGALOS MISTERIOSOS AVANZADOS DE CLARA
  3. # Tómalo de base para crear o añadir nuevos eventos. Puedes entregar más de un evento a la vez.
  4. # Subelo a Pastebin o a Github como un txt y coge el enlace del archivo en RAW.
  5. ####################################################
  6.   ret = false
  7.   #Comprueba que el jugador ya tenga ese regalo especifico, para objetos es mejor usar otro tipo de check.
  8.   #Para pokemon con evolucion, debes comprobar que esten ambas especies.
  9.     if !hasEventMon?(PBSpecies::GIRATINA,nil,"PRI2010")
  10.     Kernel.pbMessage(_INTL("Regalo Misterioso en línea encontrado.\\wtnp[20]"))
  11.     @pokemon=PokeBattle_Pokemon.new(:GIRATINA,50,$Trainer)
  12.     #ESTOS PARAMETROS SON PARA EL CHECK de hasEventMon?#
  13.     @pokemon.giveRibbon(PBRibbons::CLASSIC)
  14.     @pokemon.ot="FiaPlay"
  15.     ####################################################
  16.     @pokemon.trainerID=03050
  17.     @pokemon.setItem(:GRISEOUSORB)
  18.     @pokemon.makeShiny
  19.     #Esto permite aleatorizar los iv's del pokémon, pero garantiza que 3 de ellos sean perfectos.
  20.     maxIV = 1
  21.     @pokemon.iv[rand(6)]=31
  22.     randivs = [0,1,2,3,4,5]
  23.     for i in randivs.shuffle
  24.       next if @pokemon.iv[i]==31
  25.       maxIV +=1
  26.       @pokemon.iv[i]=31
  27.       break if maxIV>=3
  28.     end
  29.     @pokemon.happiness=100
  30.     @pokemon.obtainMode=4
  31.     @pokemon.calcStats
  32.     showHidePokemon rescue nil
  33.     Kernel.pbAddPokemon(@pokemon,nil,true,false)
  34.     showHidePokemon(false) rescue nil
  35.     ret = true
  36.   end
  37.   if !hasEventMon?(PBSpecies::CELEBI,:CLASSIC,"INV2011")
  38.     Kernel.pbMessage(_INTL("Regalo Misterioso en línea encontrado.\\wtnp[20]"))
  39.     @pokemon=PokeBattle_Pokemon.new(:CELEBI,50,$Trainer)
  40.     #ESTOS PARAMETROS SON PARA EL CHECK de hasEventMon?#
  41.     @pokemon.giveRibbon(PBRibbons::CLASSIC)
  42.     @pokemon.ot="INV2011"
  43.     ####################################################
  44.     @pokemon.trainerID=01211
  45.     @pokemon.setItem(:JABOCABERRY)
  46.     @pokemon.pbLearnMove(:HEALINGWISH)
  47.     @pokemon.setNature(:MODEST)
  48.     #Esto permite aleatorizar los iv's del pokémon, pero garantiza que 3 de ellos sean perfectos.
  49.     maxIV = 1
  50.     @pokemon.iv[rand(6)]=31
  51.     randivs = [0,1,2,3,4,5]
  52.     for i in randivs.shuffle
  53.       next if @pokemon.iv[i]==31
  54.       maxIV +=1
  55.       @pokemon.iv[i]=31
  56.       break if maxIV>=3
  57.     end
  58.     @pokemon.makeShiny
  59.     @pokemon.happiness=100
  60.     @pokemon.obtainMode=4
  61.     @pokemon.calcStats
  62.     showHidePokemon rescue nil
  63.     Kernel.pbAddPokemon(@pokemon,nil,true,false)
  64.     showHidePokemon(false) rescue nil
  65.     ret = true
  66.   end
  67.   if !ret
  68.     Kernel.pbMessage(_INTL("No se encontró ningún Regalo Misterioso en línea.\\wtnp[20]"))
  69.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement