Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # DP3's 'Actor Voices in Battle' Script Patch for MogHunter's 'Battle Result'.
- #
- # This patch allows additional voices for when the spoils window is displayed
- # with the loot you're receiving
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- module DiamondandPlatinum3
- module BattleVoices
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=
- # Editable Region //// ==
- # =-
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Item Drop Voices
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ITEM_DROP_VOICES = { # <= Do Not Touch This Line
- # What Actor One Will Say when receiving item drops after battle
- 1 => [
- "Encounter Very Strong Enemies1", 80, 100, 0,
- ],
- # What Actor Two Will Say
- 2 => [
- "Received New Items 1", 80, 100, 0,
- ],
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # -=
- }; # End Of Editable Region //// ==
- # =-
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * New Method: Play "Receieved Spoils" Voice
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- def self.play_spoilsreceived_voice(actor_id = 0)
- actor_id = actor_id != 0 ? actor_id : get_battle_actor_id()
- return play_voice(ITEM_DROP_VOICES[actor_id], actor_id)
- end
- end
- end
- if Object.const_defined?(:MOG_BATLE_RESULT)
- #==============================================================================
- # ** Game_Party
- #==============================================================================
- class Game_Party < Game_Unit
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Alias Listings
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- alias dp3_mbravib_gameparty_gainitem_cxkiyis gain_item
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Public Instance Variables
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- attr_accessor :dp3_mbravib_gained_item
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Increase/Decrease Items
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- def gain_item(*args)
- @dp3_mbravib_gained_item = true
- dp3_mbravib_gameparty_gainitem_cxkiyis(*args)
- end
- end
- #==============================================================================
- # ** Window_Treasure
- #==============================================================================
- class Window_Treasure < Window_Base
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Alias Listings
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- alias dp3_mbravib_wintrea_drawtrea_cxkiyis draw_treasure
- alias dp3_mbravib_wintrea_update_cxkiyis update
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Aliased Method: Draw_Treasure
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- def draw_treasure(*args)
- $game_party.dp3_mbravib_gained_item = false
- dp3_mbravib_wintrea_drawtrea_cxkiyis(*args)
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # * Aliased Method: Update
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- def update(*args)
- dp3_mbravib_wintrea_update_cxkiyis(*args)
- if $game_party.dp3_mbravib_gained_item && !@dp3_mbravib_spoken && self.x == 0
- @dp3_mbravib_spoken = true
- DiamondandPlatinum3::BattleVoices::play_spoilsreceived_voice()
- end
- end
- end
- else
- msgbox_text = "MogHunter's Battle Result Script either does not exist in this " +
- "project or was not placed above the 'Actor Voices in Battle Patch'. " +
- "\n\nThis Patch will not function until this has been resolved."
- message_box = Win32API.new('user32', 'MessageBox', 'IPPI', 'I')
- message_box.call(0, msgbox_text, "Warning", 0+64)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement