Advertisement
bo4p5687

Untitled

Nov 23rd, 2020 (edited)
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.54 KB | None | 0 0
  1. # Credit: bo4p5687
  2. #-------------------------------------------------------------------------------
  3. In module PBEvolution
  4.  
  5. below
  6. TradeSpecies      = 59
  7. add
  8. Scroll = 60 # Change it, if the number exists
  9.  
  10. def self.maxValue; return 60; end # change max value, here, 60
  11.  
  12. #-------------------------------------------------------------------------------
  13. # Put these lines above Main
  14. # Map id, you can add like KubChangeForm = [501,1,10,600]
  15. KubChangeForm = [501]
  16.  
  17. # New method
  18. class PokemonGlobalMetadata
  19.   attr_accessor :kubfuevolve
  20.   alias old_ini_kub initialize
  21.   def initialize
  22.     @kubfuevolve = false
  23.     old_ini_kub
  24.   end
  25. end
  26. #-------------------------------------------------------------------------------
  27. PBEvolution.register(:Scroll, {
  28.   "scrollCheck" => proc { |pkmn, parameter|
  29.     next $PokemonGlobal.kubfuevolve
  30.   }
  31. })
  32. #-------------------------------------------------------------------------------
  33. # Put pbEvolveByScroll after set $PokemonGlobal.kubfuevolve = true
  34. # then set $PokemonGlobal.kubfuevolve = false
  35. def pbEvolveByScroll
  36.   $Trainer.party.each do |pkmn|
  37.     ret = pbCheckEvolutionEx(pkmn) { |pkmn, method, parameter, new_species|
  38.     success = PBEvolution.call("scrollCheck", method, pkmn, parameter)
  39.     next (success) ? new_species : -1 }
  40.     if ret>0
  41.       pbFadeOutInWithMusic {
  42.       pkmn.form = 1 if  KubChangeForm.include?($game_map.map_id) # Change form
  43.       evo = PokemonEvolutionScene.new
  44.       evo.pbStartScreen(pkmn,ret)
  45.       evo.pbEvolution(true)
  46.       evo.pbEndScreen }
  47.     end
  48.   end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement