Advertisement
ForeverZer0

[XP] MCI Plugin: AutoRestore

Jul 8th, 2012
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.68 KB | None | 0 0
  1. #=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
  2. # MCI Audio Plugin : Auto-Restore
  3. # Author: ForeverZer0
  4. # Version: 1.0
  5. # Date: 7.8.2012
  6. #=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
  7. #
  8. #  Introduction:
  9. #     This plugin automatically memorizes and restores BGM/BGS after battle to
  10. #     the position it was at when battle commenced.
  11. #
  12. #  Instructions:
  13. #     - For use with MCI Audio Player 1.2 and higher.
  14. #     - Place script below MCI Audio Player script
  15. #
  16. #=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
  17.  
  18. #===============================================================================
  19. # ** Scene_Map
  20. #===============================================================================
  21.  
  22. class Scene_Map
  23.   #-----------------------------------------------------------------------------
  24.   # * Call Battle (alias)
  25.   #-----------------------------------------------------------------------------
  26.   alias memorize_audio_battle call_battle
  27.   def call_battle
  28.     $game_system.memorize_audio('BGM', 'BGS')
  29.     memorize_audio_battle
  30.   end
  31. end
  32.  
  33. #===============================================================================
  34. # ** Scene_Battle
  35. #===============================================================================
  36.  
  37. class Scene_Battle
  38.   #-----------------------------------------------------------------------------
  39.   # * Start End of Battle Phase (alias)
  40.   #-----------------------------------------------------------------------------
  41.   alias restore_audio_battle start_phase5
  42.   def start_phase5
  43.     restore_audio_battle
  44.     $game_system.restore_audio('BGM', 'BGS')
  45.   end
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement