Advertisement
Caeles

Script reclutamiento

Jul 14th, 2019 (edited)
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. ################################################################################
  2. #SCRIPT DE RECLUTAMIENTO
  3. #Créditos a Polectron
  4. #
  5. #
  6. #Este script permite que un Pokémon se te una a ti tras derrotarlo en
  7. #una batalla, al estilo de MM y el fangame Pokémon Elegy. El Pokémon solo
  8. #se reclutará si el interruptor escogido NO está activado. El script no tiene en
  9. #cuenta la rareza del Pokémon para los cálculos. El ratio de reclutamiento por
  10. #defecto es 25 (recomendado). Para alterar el ratio, simplemente escribe las
  11. #condicionales necesarias tras el ratio base.
  12. #
  13. #Más información en: https://newpokeliberty.blogspot.com
  14. #o en el discord https://discord.gg/8BQfSkD
  15. ################################################################################
  16.  
  17. def pbRandPercentage(percentage)
  18. rnd = rand(100)
  19. return rnd >= 0 && rnd <= percentage
  20. end
  21.  
  22. def pbJoinTeam(opponent, turncount)
  23. joinrate = 25 #ratio base
  24.  
  25. if (pbRandPercentage(joinrate)) #probabilidad de captura
  26. newpk = opponent.clone
  27. Kernel.pbMessage(_INTL("\\l[2]¡{1} quiere unirse al equipo!", newpk.name))
  28. commands = []
  29. counter = 0
  30. commands.push(_INTL("Aceptar"))
  31. commands.push(_INTL("Rechazar"))
  32. command=Kernel.pbShowCommands(nil,commands,-1)
  33. if command == 0
  34. newpk.heal #cura al pokémon reclutado
  35. pbAddPokemonSilent(newpk)
  36. end
  37. end
  38.  
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement