SHARE
TWEET

[XP] MCI Plugin: AutoRestore

ForeverZer0 Jul 8th, 2012 238 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top