Advertisement
Diego-Mertens

script chain

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