Advertisement
Guest User

Raymi Escape Success Message

a guest
Nov 21st, 2017
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.75 KB | None | 0 0
  1. $imported = {} if $imported.nil? #DON'T EDIT
  2. $imported["Raymi-EscapeSuccessMessage"] = true #DON'T EDIT
  3.  
  4. =begin
  5. Raymi's Escape Success Message v.1.0
  6.  
  7. Update Log:
  8. 10/28/2017: v.1.0 - Script finished.
  9.  
  10. Directions:
  11. Plug and play. Just change the message to what you want it to say when your
  12. character's party successfully escapes a battle. Make sure to leave the quotes!
  13.  
  14. Terms of Use:
  15. Free for commercial & non-commercial use, but you must credit Raymi/raymi100
  16. and leave this header in tact. Don't claim this script as your own, and if you
  17. want to edit it, feel free, just please don't post the edits without my
  18. permission. Don't redistribute this script, just link back to this page.
  19. Contact me with any issues you run into.
  20.  
  21. Contact Info:
  22. rpgmakercentral.com Username: raymi100 - Best way to contact me
  23. Email: raymithefangirl@aol.com - Not a good way to contact me
  24. =end
  25.  
  26. #Configuration Start
  27. module Raymi
  28.   module EscapeSuccessConfig
  29.   EscapeSuccessMessage = "They got away successfully!" #Change what's in between
  30.                          #the quotes to what message you want it to say when
  31.                          #you successfully escape a battle
  32.   end
  33. end
  34. #Configuration End
  35.  
  36. #Code Start - Don't edit unless you know what you're doing.
  37. module BattleManager
  38. def self.process_escape
  39.     $game_message.add(sprintf(Vocab::EscapeStart, $game_party.name))
  40.     success = @preemptive ? true : (rand < @escape_ratio)
  41.     Sound.play_escape
  42.     if success
  43.       $game_message.add('\.' + Raymi::EscapeSuccessConfig::EscapeSuccessMessage)
  44.       process_abort
  45.     else
  46.       @escape_ratio += 0.1
  47.       $game_message.add('\.' + Vocab::EscapeFailure)
  48.       $game_party.clear_actions
  49.     end
  50.     wait_for_message
  51.     return success
  52.   end
  53. end
  54. #Code End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement