Advertisement
diamondandplatinum3

Patch: (Actor Voices in Battle | Moghunter's Battle Result)

Oct 2nd, 2013
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.77 KB | None | 0 0
  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2. # DP3's 'Actor Voices in Battle' Script Patch for MogHunter's 'Battle Result'.
  3. #
  4. # This patch allows additional voices for when the spoils window is displayed
  5. # with the loot you're receiving
  6. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  7. module DiamondandPlatinum3
  8.   module BattleVoices
  9.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  10.     #                                                        -=
  11.     #                 Editable Region        ////            ==
  12.     #                                                        =-
  13.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14.  
  15.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  16.     # * Item Drop Voices
  17.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18.     ITEM_DROP_VOICES = {  # <= Do Not Touch This Line
  19.      
  20.       # What Actor One Will Say when receiving item drops after battle
  21.       1 => [
  22.              "Encounter Very Strong Enemies1", 80, 100, 0,
  23.            ],
  24.  
  25.  
  26.       # What Actor Two Will Say
  27.       2 => [
  28.              "Received New Items 1", 80, 100, 0,
  29.            ],
  30.            
  31.            
  32.            
  33.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  34.     #                                                        -=
  35.     };    # End Of Editable Region           ////            ==
  36.     #                                                        =-
  37.     #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  38.    
  39.    
  40.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  41.     # * New Method: Play "Receieved Spoils" Voice
  42.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  43.     def self.play_spoilsreceived_voice(actor_id = 0)
  44.       actor_id = actor_id != 0 ? actor_id : get_battle_actor_id()
  45.       return play_voice(ITEM_DROP_VOICES[actor_id], actor_id)
  46.     end
  47.   end
  48. end
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. if Object.const_defined?(:MOG_BATLE_RESULT)
  56.   #==============================================================================
  57.   # ** Game_Party
  58.   #==============================================================================
  59.   class Game_Party < Game_Unit
  60.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  61.     # * Alias Listings
  62.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  63.     alias dp3_mbravib_gameparty_gainitem_cxkiyis                 gain_item
  64.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  65.     # * Public Instance Variables
  66.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  67.     attr_accessor   :dp3_mbravib_gained_item
  68.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  69.     # * Increase/Decrease Items
  70.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71.     def gain_item(*args)
  72.       @dp3_mbravib_gained_item = true
  73.       dp3_mbravib_gameparty_gainitem_cxkiyis(*args)
  74.     end
  75.   end
  76.   #==============================================================================
  77.   # ** Window_Treasure
  78.   #==============================================================================
  79.   class Window_Treasure < Window_Base
  80.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  81.     # * Alias Listings
  82.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  83.     alias dp3_mbravib_wintrea_drawtrea_cxkiyis               draw_treasure
  84.     alias dp3_mbravib_wintrea_update_cxkiyis                 update
  85.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  86.     # * Aliased Method: Draw_Treasure
  87.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  88.     def draw_treasure(*args)
  89.       $game_party.dp3_mbravib_gained_item = false
  90.       dp3_mbravib_wintrea_drawtrea_cxkiyis(*args)
  91.     end  
  92.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  93.     # * Aliased Method: Update
  94.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  95.     def update(*args)
  96.       dp3_mbravib_wintrea_update_cxkiyis(*args)
  97.       if $game_party.dp3_mbravib_gained_item && !@dp3_mbravib_spoken && self.x == 0
  98.         @dp3_mbravib_spoken = true
  99.         DiamondandPlatinum3::BattleVoices::play_spoilsreceived_voice()
  100.       end
  101.     end
  102.   end
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109. else
  110.   msgbox_text = "MogHunter's Battle Result Script either does not exist in this " +
  111.                 "project or was not placed above the 'Actor Voices in Battle Patch'. " +
  112.                 "\n\nThis Patch will not function until this has been resolved."
  113.   message_box = Win32API.new('user32', 'MessageBox', 'IPPI', 'I')
  114.   message_box.call(0, msgbox_text, "Warning", 0+64)
  115. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement