Advertisement
Diego-Mertens

asddsa

Apr 26th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.42 KB | None | 0 0
  1. class PokemonTemp
  2. attr_accessor :catchcombo
  3. attr_accessor :especie
  4. attr_accessor :especies
  5. end
  6. enctype = EncounterTypes::Land
  7. chances = EncounterTypes::EnctypeChances[enctype]
  8. cadenamaxima=31
  9. Events.onStartBattle+=proc {|sender,e|
  10. species=e[0]
  11. $PokemonTemp.catchcombo=0 if !$game_switches[118]
  12. $PokemonTemp.especies=species if $PokemonTemp.catchcombo==0
  13. if $PokemonTemp.catchcombo==1 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  14. chances = [1,4,5,5,5,10,10,10,10,10,15,15]
  15. elsif $PokemonTemp.catchcombo==6 && $PokemonGlobal && $PokemonGlobal.surfing
  16. chances = [50,30,5,9,6]
  17. elsif $PokemonTemp.catchcombo==12 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  18. chances = [10,10,10,10,10,10,5,5,4,4,11,11]
  19. elsif $PokemonTemp.catchcombo>=12 && $PokemonGlobal && $PokemonGlobal.surfing
  20. chances = [40,30,10,9,11]
  21. elsif $PokemonTemp.catchcombo==24 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  22. chances = [10,10,10,10,5,5,5,5,9,9,11,11]
  23. elsif $PokemonTemp.catchcombo==24 && $PokemonGlobal && $PokemonGlobal.surfing
  24. chances = [40,20,15,14,11]
  25. elsif $PokemonTemp.catchcombo==30 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  26. chances = [15,15,10,10,10,10,5,5,4,4,6,6]
  27. elsif $PokemonTemp.catchcombo==30 && $PokemonGlobal && $PokemonGlobal.surfing
  28. chances = [10,10,10,30,40]
  29. elsif $PokemonTemp.catchcombo==0 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  30. chances = [20,20,10,10,10,10,5,5,4,4,1,1]
  31. elsif $PokemonTemp.catchcombo==0 && $PokemonGlobal && $PokemonGlobal.surfing
  32. chances = [60,30,5,4,1]
  33. end
  34.  
  35. }
  36.  
  37. Events.onWildBattleEnd+=proc {|sender,e|
  38. species=e[0]
  39. result=e[2]
  40. $PokemonTemp.especie=species if !$PokemonTemp.catchcombo==0
  41. if result==4
  42. $PokemonTemp.catchcombo+=1
  43. if $PokemonTemp.catchcombo==1 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  44. chances = [1,4,5,5,5,10,10,10,10,10,15,15]
  45. elsif $PokemonTemp.catchcombo==6 && $PokemonGlobal && $PokemonGlobal.surfing
  46. chances = [50,30,5,9,6]
  47. elsif $PokemonTemp.catchcombo==12 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  48. chances = [10,10,10,10,10,10,5,5,4,4,11,11]
  49. elsif $PokemonTemp.catchcombo>=12 && $PokemonGlobal && $PokemonGlobal.surfing
  50. chances = [40,30,10,9,11]
  51. elsif $PokemonTemp.catchcombo==24 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  52. chances = [10,10,10,10,5,5,5,5,9,9,11,11]
  53. elsif $PokemonTemp.catchcombo==24 && $PokemonGlobal && $PokemonGlobal.surfing
  54. chances = [40,20,15,14,11]
  55. elsif $PokemonTemp.catchcombo==30 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  56. chances = [15,15,10,10,10,10,5,5,4,4,6,6]
  57. elsif $PokemonTemp.catchcombo==30 && $PokemonGlobal && $PokemonGlobal.surfing
  58. chances = [10,10,10,30,40]
  59. elsif $PokemonTemp.catchcombo==0 && PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  60. chances = [20,20,10,10,10,10,5,5,4,4,1,1]
  61. elsif $PokemonTemp.catchcombo==0 && $PokemonGlobal && $PokemonGlobal.surfing
  62. chances = [60,30,5,4,1]
  63. end
  64. $game_switches[118]=true
  65. elsif !result==4
  66. $game_switches[118]=false
  67. $PokemonTemp.catchcombo=0
  68. if PBTerrain.isGrass?($game_map.terrain_tag($game_player.x,$game_player.y))
  69. chances = [20,20,10,10,10,10,5,5,4,4,1,1]
  70. elsif $PokemonGlobal && $PokemonGlobal.surfing
  71. chances = [60,30,5,4,1]
  72. end
  73. end
  74.  
  75. }
  76.  
  77. Events.onWildPokemonCreate+=proc{|sender,e|
  78. pokemon =e[0]
  79. $PokemonTemp.catchcombo=0 if $PokemonTemp.catchcombo==nil
  80. if $PokemonTemp.catchcombo>=1 && $PokemonTemp.catchcombo<=1
  81. pokemon.makeShiny
  82. if rand(11)<10
  83. pokemon = $PokemonTemp.especies
  84. end
  85. elsif $PokemonTemp.catchcombo>=3
  86. for i in 0...6
  87. pokemon.iv[i]=11
  88. end
  89. if rand(100)<10
  90. pokemon = $PokemonTemp.especies
  91. end
  92. if rand(4092)<2
  93. pokemon.makeShiny
  94. end
  95. elsif $PokemonTemp.catchcombo>=20
  96. for i in 0...6
  97. pokemon.iv[i]=21
  98. end
  99. if rand(4092)<4
  100. pokemon.makeShiny
  101. end
  102. elsif $PokemonTemp.catchcombo>=30
  103. for i in 0...6
  104. pokemon.iv[i]=31
  105. end
  106. if rand(4092)<8
  107. pokemon.makeShiny
  108. end
  109. end
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement