ÿþ#==============================================================================# # æ% Dynamic Balloon Effects æ% # #------------------------------------------------------------------------------# # æ% By Mesiah A.K.A. MakoInfused # # æ% Exclusively for RPG Maker.net # # æ% Released on: 01/01/2010 # # æ% Website: http://www.cetrastudios.com/ # # æ% Version: 1.0 # # æ% Summary: Basically this script allows you to assign unique sounds to each # # æ% of the different balloons available in the default Balloon.png file. # # # # æ% Credit: Credit me (MakoInfused) IF you want, you don't need to. # # æ% Terms: This script is free to use, BUT please don't claim you created it. # # # # æ% Call in script command: # # æ% $mesi_custom_balloon = "(Set this to the graphic you wish to use)" # # # # æ% Example: $mesi_custom_balloon = 1 # # æ% This would set the balloon graphic to the default graphic "Balloon". # #==============================================================================# module MESI module DYNAMIC_BALLOON #----------------------------------------------------------------------------- START_GRAPHIC = 1 # This is the graphic to start the game with; default 1 = "Balloon". # This value pulls from, and therefore is directly related to, the list below. #----------------------------------------------------------------------------- CUSTOM_BALLOON = { # Don't delete. # Format: balloon_id => ["Filename"], # Use this area to add custom graphics that you can use to switch balloon # sets in game. #----------------------------------------------------------------------------- 1 => "Balloon", # Don't forget the "" (quotes) for the filename. 2 => "Balloon1", 3 => "Balloon2", 4 => "" # No comma for the last line. } #----------------------------------------------------------------------------- Balloon_SE = { # Don't delete. # Format: balloon_id => ["Filename"], #----------------------------------------------------------------------------- 1 => "Attack1", # Don't forget the "" (quotes) for the filename. 2 => "Stare", 3 => "Sound1", 4 => "Heal7", 5 => "Crash", 6 => "Buzzer2", 7 => "Down", 8 => "", # If you don't want use a sound; use nil or "" (blank quotes). 9 => "Chime2", 10 => "Sleep" # No comma for the last line. } #----------------------------------------------------------------------------- Balloon_SE_Volume = { # Don't delete. # Format: balloon_id => [volume amount], #----------------------------------------------------------------------------- 1 => 80, # Volume (0 - 100) Default: 80 2 => 100, 3 => 100, 4 => 100, 5 => 100, 6 => 100, 7 => 100, 8 => 100, 9 => 80, 10 => 100 # No comma for the last line. } # Don't delete. #----------------------------------------------------------------------------- Balloon_SE_Tempo = { # Don't delete. # Format: balloon_id => [volume amount], #----------------------------------------------------------------------------- 1 => 120, # Tempo (50 - 150) Default: 100 2 => 100, 3 => 60, 4 => 120, 5 => 100, 6 => 50, 7 => 100, 8 => 100, 9 => 70, 10 => 60 # No comma for the last line. } # Don't delete. #----------------------------------------------------------------------------- end end #==============================================================================# # The Script # #------------------------------------------------------------------------------# #=============================================================================== # ** Sprite_Character #------------------------------------------------------------------------------- class Sprite_Character < Sprite_Base alias balloon_sound_start start_balloon unless $@ def start_balloon dispose_balloon @balloon_duration = 8 * 8 + BALLOON_WAIT @balloon_sprite = ::Sprite.new(viewport) graphic = MESI::DYNAMIC_BALLOON::CUSTOM_BALLOON $mesi_custom_balloon = 1 if $mesi_custom_balloon == nil custom = $mesi_custom_balloon balloon_graphic = graphic[custom] @balloon_sprite.bitmap = Cache.system(balloon_graphic) @balloon_sprite.ox = 16 @balloon_sprite.oy = 32 update_balloon if @balloon_id >= 1 se = MESI::DYNAMIC_BALLOON::Balloon_SE[@balloon_id] vo = MESI::DYNAMIC_BALLOON::Balloon_SE_Volume[@balloon_id] pi = MESI::DYNAMIC_BALLOON::Balloon_SE_Tempo[@balloon_id] sound = RPG::SE.new(se,vo,pi) sound.play unless sound == nil return end end end #------------------------------------------------------------------------------- # ** End Script #===============================================================================