Advertisement
Rafael_Sol_Maker

RAFAEL_SOL_MAKER's VX POWER COMMANDS v1.2

Nov 17th, 2011
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 25.09 KB | None | 0 0
  1. #===============================================================================
  2. #           RAFAEL_SOL_MAKER's VX POWER COMMANDS v1.2
  3. #-------------------------------------------------------------------------------
  4. # Descrição:    Coletânea especial com mais de 40 comandos variados e funções
  5. #               novas, tudo pronto para utilizar. Extremamente poderoso!!
  6. #-------------------------------------------------------------------------------
  7. # Modo de usar: Utilize as funções com o comando 'Executar Script:' dos eventos,
  8. #               os parâmetros entre colchetes '[]' são opcionais.
  9. =begin
  10.        
  11. COMANDOS PARA A EQUIPE
  12.   party_full?
  13.   party_state?      (state_id)
  14.   party_skill_learn?(skill_id)  
  15.   remove_all_equip  (id)  
  16.   decreate_steps    ([value])
  17.   reset_steps
  18.   get_all_items
  19.  
  20. COMANDOS PARA EVENTOS & PERSONAGENS
  21.   start_event_id    (id)
  22.   get_event_id      (x, y)  
  23.   start_event_xy    (x, y)
  24.   set_custom_speed  ([speed], [target])
  25.   move_route_wait    ([id])
  26.   stop_all_movement
  27.   move_all  
  28.   mirror_character  ([target])
  29.   unmirror_character([target])  
  30.  
  31. COMANDOS UTILITÁRIOS PARA LOTES
  32.   reset_all_switches
  33.   reset_all_variables
  34.   reset_all_self_switches
  35.   batch_self_switch  (map_id, key, state, name)
  36.   delete_pictures    ([start], [finish])
  37.  
  38. COMANDOS PARA MAPAS
  39.   disable_scroll
  40.   enable_scroll
  41.   save_bgm
  42.   play_saved_bgm
  43.   increase_timer    (value)
  44.   decrease_timer    (value)
  45.   scroll_lower_left  (distance, [speed])
  46.   scroll_lower_right(distance, [speed])
  47.   scroll_upper_left  (distance, [speed])
  48.   scroll_upper_right(distance, [speed])
  49.  
  50. COMANDOS PARA FIGURAS
  51.   mirror_picture  ([id])  
  52.   unmirror_picture([id])  
  53.   shake_picture    ([id], [power], [duration])
  54.   jump_picture    ([id], [duration], [height])
  55.  
  56. COMANDOS DE MUDANÇA DE GRÁFICOS
  57.   set_windowskin      ([filename])
  58.   set_message_back    ([filename])
  59.   set_balloon_icon    ([filename])
  60.   set_vehicle_shadow  ([filename])
  61.   set_gameover_graphic([filename])
  62.   set_title_graphic    ([filename])
  63.  
  64. OUTROS COMANDOS  
  65.   open_browser ([url])
  66.  
  67. =end
  68. #-------------------------------------------------------------------------------
  69. # Agradecimentos Especiais:
  70. #               Esse script não seria sequer imaginável se não fosse a ajuda
  71. #               de grandes mestres do scripting: Equipe Pockethouse
  72. #               (Engine Melody), Tomy (Biblioteca KGC) e Mr.Anonymous (RGSS2+)
  73. #               Grande parte desses comandos são graças a eles! Muito obrigado!!
  74. #-------------------------------------------------------------------------------
  75. #===============================================================================
  76.  
  77. #===============================================================================
  78. # UPDATES
  79. #-------------------------------------------------------------------------------
  80. # VX POWER COMMANDS v1.1 -> v1.2
  81. # * COMANDOS DE MUDANÇA DE GRÁFICOS:
  82. # * Melhorada bastante a estrutura para o tratamento de imagens inválidas;
  83. # * Agora a troca da sombra dos veículos será executada sem erros;
  84. # * Corrigidas umas falhas no balloon, que agora é exibido sem flicker;
  85. # * Agora ele muda o gráfico de título corretamente; porém ele não salva esse
  86. #     gráfico nos saveslots, já que é uma variável global;
  87. #-------------------------------------------------------------------------------
  88. #===============================================================================
  89.  
  90. class Game_Interpreter
  91. include PowerPackVX_General_Configs
  92.  
  93.   #--------------------------------------------------------------------------
  94.   #
  95.   #--------------------------------------------------------------------------
  96.   def party_full?
  97.     return $game_party.full?
  98.   end
  99.  
  100.   #--------------------------------------------------------------------------
  101.   #
  102.   #--------------------------------------------------------------------------
  103.   def party_state?
  104.     return $game_party.state?
  105.   end
  106.  
  107.   #--------------------------------------------------------------------------
  108.   #
  109.   #--------------------------------------------------------------------------
  110.   def party_skill_learn?
  111.     return $game_party.skill_learn?
  112.   end
  113.  
  114.   #--------------------------------------------------------------------------
  115.   #
  116.   #--------------------------------------------------------------------------
  117.   def remove_all_equip(id)
  118.     actor = $game_actors[id]
  119.     if actor != nil
  120.       for i in 0..4
  121.         actor.equip(i, 0)
  122.       end
  123.     end
  124.     return true
  125.   end
  126.  
  127.   #--------------------------------------------------------------------------
  128.   #
  129.   #--------------------------------------------------------------------------
  130.   def decrease_steps(value = 1)
  131.     $game_party.decreate_steps(value)
  132.     return true
  133.   end
  134.  
  135.   #--------------------------------------------------------------------------
  136.   #
  137.   #--------------------------------------------------------------------------
  138.   def reset_steps
  139.     $game_party.reset_steps
  140.     return true
  141.   end
  142.  
  143.   #--------------------------------------------------------------------------
  144.   #
  145.   #--------------------------------------------------------------------------  
  146.   def get_all_items
  147.     items = []
  148.     items += $data_items
  149.     items += $data_weapons
  150.     items += $data_armors
  151.     for item in items.compact
  152.       next if item.name == ""
  153.       $game_party.gain_item(item, 99)
  154.     end
  155.   end
  156.  
  157.   #--------------------------------------------------------------------------
  158.   #
  159.   #--------------------------------------------------------------------------
  160.   def start_event_id(id)
  161.     event = $game_map.events[id]
  162.     @child_interpreter = Game_Interpreter.new(@depth + 1)
  163.     @child_interpreter.setup(event.list, @event_id)
  164.   end
  165.  
  166.   #--------------------------------------------------------------------------
  167.   #
  168.   #--------------------------------------------------------------------------
  169.   def get_event_id(x, y)
  170.     event_id = 0
  171.     events   = $game_map.events.values.find_all { |e| e.x == x && e.y == y }
  172.     event_id = (events.max { |a, b| a.id <=> b.id }).id unless events.empty?
  173.     return event_id
  174.   end
  175.  
  176.   #--------------------------------------------------------------------------
  177.   #
  178.   #--------------------------------------------------------------------------
  179.   def start_event_xy(x, y)
  180.     for event in $game_map.events_xy(x, y)
  181.       event.start
  182.     end
  183.   end
  184.  
  185.   #--------------------------------------------------------------------------
  186.   #
  187.   #--------------------------------------------------------------------------
  188.   def set_custom_speed(speed = 4, target = -1)
  189.     character = get_character(target)
  190.     character.set_move_speed(speed)
  191.     return true
  192.   end
  193.  
  194.   #--------------------------------------------------------------------------
  195.   #
  196.   #--------------------------------------------------------------------------
  197.   def move_route_wait(id = 0)
  198.     unless $game_temp.in_battle
  199.       @moving_character = get_character(id)
  200.     end
  201.     return true
  202.   end
  203.  
  204.   #--------------------------------------------------------------------------
  205.   #
  206.   #--------------------------------------------------------------------------
  207.   def disable_scroll
  208.     $game_system.scroll_disabled = true
  209.   end
  210.  
  211.   #--------------------------------------------------------------------------
  212.   #
  213.   #--------------------------------------------------------------------------
  214.   def enable_scroll
  215.     $game_system.scroll_disabled = false
  216.   end
  217.  
  218.   #--------------------------------------------------------------------------
  219.   #
  220.   #--------------------------------------------------------------------------
  221.   def save_bgm
  222.     $game_system.saved_bgm = RPG::BGM.last
  223.   end
  224.  
  225.   #--------------------------------------------------------------------------
  226.   #
  227.   #--------------------------------------------------------------------------
  228.   def play_saved_bgm
  229.     if $game_system.saved_bgm != nil
  230.       $game_system.saved_bgm.play
  231.     end
  232.   end
  233.  
  234.   #--------------------------------------------------------------------------
  235.   #
  236.   #--------------------------------------------------------------------------
  237.   def increase_timer(value)
  238.     $game_system.timer += value * Graphics.frame_rate
  239.   end
  240.  
  241.   #--------------------------------------------------------------------------
  242.   #
  243.   #--------------------------------------------------------------------------
  244.   def decrease_timer(value)
  245.     $game_system.timer -= value * Graphics.frame_rate
  246.   end
  247.  
  248.   #--------------------------------------------------------------------------
  249.   #
  250.   #--------------------------------------------------------------------------
  251.   def scroll_lower_left(distance, speed = 4)
  252.     $game_map.start_scroll(1, distance, speed)
  253.   end
  254.  
  255.   #--------------------------------------------------------------------------
  256.   #
  257.   #--------------------------------------------------------------------------
  258.   def scroll_lower_right(distance, speed = 4)
  259.     $game_map.start_scroll(3, distance, speed)
  260.   end
  261.  
  262.   #--------------------------------------------------------------------------
  263.   #
  264.   #--------------------------------------------------------------------------
  265.   def scroll_upper_left(distance, speed = 4)
  266.     $game_map.start_scroll(7, distance, speed)
  267.   end
  268.  
  269.   #--------------------------------------------------------------------------
  270.   #
  271.   #--------------------------------------------------------------------------
  272.   def scroll_upper_right(distance, speed = 4)
  273.     $game_map.start_scroll(9, distance, speed)
  274.   end  
  275.  
  276.   #--------------------------------------------------------------------------
  277.   #
  278.   #--------------------------------------------------------------------------  
  279.   def stop_all_movement
  280.     $game_map.stop_all_movement = true
  281.   end
  282.  
  283.   #--------------------------------------------------------------------------
  284.   #
  285.   #--------------------------------------------------------------------------  
  286.   def move_all
  287.     $game_map.stop_all_movement = false
  288.   end  
  289.  
  290.   #--------------------------------------------------------------------------
  291.   #
  292.   #--------------------------------------------------------------------------
  293.   def mirror_character(target = -1)
  294.     character = get_character(target)
  295.     character.mirror = true
  296.     return true
  297.   end  
  298.  
  299.   #--------------------------------------------------------------------------
  300.   #
  301.   #--------------------------------------------------------------------------
  302.   def unmirror_character(target = -1)
  303.     character = get_character(target)
  304.     character.mirror = false
  305.     return true
  306.   end
  307.  
  308.   #--------------------------------------------------------------------------
  309.   #
  310.   #--------------------------------------------------------------------------
  311.   def reset_all_switches    
  312.     $game_switches = Game_Switches.new
  313.     $game_map.refresh
  314.   end
  315.  
  316.   #--------------------------------------------------------------------------
  317.   #
  318.   #--------------------------------------------------------------------------
  319.   def reset_all_variables
  320.     $game_variables = Game_Variables.new
  321.     $game_map.refresh
  322.   end
  323.  
  324.   #--------------------------------------------------------------------------
  325.   #
  326.   #--------------------------------------------------------------------------
  327.   def reset_all_self_switches
  328.     $game_self_switches = Game_SelfSwitches.new
  329.     $game_map.refresh
  330.   end
  331.  
  332.   #--------------------------------------------------------------------------
  333.   #
  334.   #--------------------------------------------------------------------------
  335.   def batch_self_switch(map_id, key, state, name)
  336.     map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
  337.     events = []
  338.     for i in map.events.keys
  339.       events[i] = Game_Event.new(map_id, map.events[i])
  340.     end
  341.     for event in events
  342.       next if event == nil
  343.       id = event.id
  344.       if event.name.include?(name)
  345.         $game_self_switches[[map_id, id, key]] = state
  346.       end
  347.     end
  348.     $game_map.refresh if map_id == $game_map.map_id
  349.   end
  350.  
  351.   #--------------------------------------------------------------------------
  352.   #
  353.   #--------------------------------------------------------------------------
  354.   def delete_pictures(start = 1, finish = 20)
  355.     for i in start..finish
  356.       $game_screen.pictures[i].erase
  357.     end
  358.   end  
  359.  
  360.   #--------------------------------------------------------------------------
  361.   #
  362.   #--------------------------------------------------------------------------
  363.   def mirror_picture(id = 1)
  364.     screen.pictures[id].mirror = true
  365.     return true
  366.   end
  367.  
  368.   #--------------------------------------------------------------------------
  369.   #
  370.   #--------------------------------------------------------------------------
  371.   def unmirror_picture(id = 1)
  372.     screen.pictures[id].mirror = false
  373.     return true
  374.   end
  375.  
  376.   #--------------------------------------------------------------------------
  377.   #
  378.   #--------------------------------------------------------------------------
  379.   def shake_picture(id = 1, power = 1, duration = 1)
  380.     screen.pictures[id].shake(power, duration)
  381.     return true
  382.   end  
  383.  
  384.   #--------------------------------------------------------------------------
  385.   #
  386.   #--------------------------------------------------------------------------
  387.   def jump_picture(id = 1, height = 20, duration = 8)
  388.     screen.pictures[id].jump(height, duration)
  389.     return true
  390.   end
  391.  
  392.   #--------------------------------------------------------------------------
  393.   #
  394.   #--------------------------------------------------------------------------
  395.   def set_windowskin(filename = nil)
  396.     $game_system.windowskin = filename
  397.   end
  398.  
  399.   #--------------------------------------------------------------------------
  400.   #
  401.   #--------------------------------------------------------------------------
  402.   def set_message_back(filename = nil)
  403.     $game_system.message_back = filename
  404.   end
  405.  
  406.   #--------------------------------------------------------------------------
  407.   #
  408.   #--------------------------------------------------------------------------
  409.   def set_balloon_icon(filename = nil)
  410.     $game_system.balloon_icon = filename
  411.   end
  412.   #--------------------------------------------------------------------------
  413.   #
  414.   #--------------------------------------------------------------------------
  415.   def set_vehicle_shadow(filename = nil)
  416.     $game_system.vehicle_shadow = filename
  417.   end  
  418.  
  419.   #--------------------------------------------------------------------------
  420.   #
  421.   #--------------------------------------------------------------------------
  422.   def set_gameover_graphic(filename = nil)
  423.     $game_system.gameover_graphic = filename
  424.   end
  425.  
  426.   #--------------------------------------------------------------------------
  427.   #
  428.   #--------------------------------------------------------------------------
  429.   def set_title_graphic(filename = nil)
  430.     $game_system.title_graphic = filename
  431.   end
  432.  
  433.   #--------------------------------------------------------------------------
  434.   #
  435.   #--------------------------------------------------------------------------
  436.   def open_browser(url = "http://www.condadobraveheart.com")
  437.     browser = Win32API.new("shell32", "ShellExecuteA", %w(p p p p p i), "i")
  438.     browser.call(0, "open", url, 0, 0, 1)
  439.   end
  440.  
  441. end
  442.  
  443. #===============================================================================
  444. #                        VX POWER COMMANDS FUNCTIONS
  445. #-------------------------------------------------------------------------------
  446. #===============================================================================
  447.  
  448. #===============================================================================
  449. # Game_Map
  450. #===============================================================================
  451. class Game_Map
  452.   attr_accessor :stop_all_movement
  453.  
  454.   alias sol_maker_initialize initialize unless $@
  455.   def initialize
  456.     sol_maker_initialize
  457.     @stop_all_movement = nil
  458.   end
  459.  
  460.   def update_scroll
  461.     if @scroll_rest > 0
  462.       distance = 2 ** @scroll_speed
  463.       case @scroll_direction
  464.       when 1  
  465.         scroll_down(distance)
  466.         scroll_left(distance)
  467.       when 2  
  468.         scroll_down(distance)
  469.       when 3  
  470.         scroll_down(distance)
  471.         scroll_right(distance)
  472.       when 4  
  473.         scroll_left(distance)
  474.       when 6  
  475.         scroll_right(distance)
  476.       when 7  
  477.         scroll_up(distance)
  478.         scroll_left(distance)
  479.       when 8
  480.         scroll_up(distance)
  481.       when 9  
  482.         scroll_up(distance)
  483.         scroll_right(distance)
  484.       end
  485.       @scroll_rest -= distance
  486.     end
  487.   end
  488.  
  489. end
  490.  
  491. #===============================================================================
  492. # Game_System
  493. #===============================================================================
  494. class Game_System
  495.   attr_accessor :saved_bgm
  496.   attr_accessor :windowskin
  497.   attr_accessor :message_back
  498.   attr_accessor :balloon_icon            
  499.   attr_accessor :vehicle_shadow
  500.   attr_accessor :gameover_graphic
  501.   attr_accessor :scroll_disabled          
  502.  
  503.   alias sol_maker_initialize initialize unless $@
  504.   def initialize
  505.     sol_maker_initialize
  506.     @saved_bgm          = nil
  507.     @windowskin         = nil
  508.     @message_back       = nil
  509.     @balloon_icon      = nil
  510.     @vehicle_shadow    = nil
  511.     @gameover_graphic  = nil
  512.     @scroll_disabled    = false  
  513.   end
  514.  
  515.   def save_bgm
  516.     @saved_bgm = RPG::BGM.last
  517.   end
  518.  
  519.   def play_saved_bgm
  520.     if @saved_bgm != nil
  521.       @saved_bgm.play
  522.     end
  523.   end
  524.  
  525. end
  526.  
  527. #===============================================================================
  528. # Game_Character
  529. #===============================================================================
  530. class Game_Character
  531.   attr_accessor :mirror
  532.  
  533.   alias sol_maker_initialize initialize unless $@
  534.   def initialize
  535.     sol_maker_initialize
  536.     @mirror = false
  537.   end
  538.  
  539.   alias sol_maker_update_self_movement update_self_movement unless $@
  540.   def update_self_movement
  541.     return if $game_map.stop_all_movement
  542.     sol_maker_update_self_movement
  543.   end
  544.  
  545. end
  546.  
  547. #===============================================================================
  548. # Game_Player
  549. #===============================================================================
  550. class Game_Player < Game_Character  
  551.  
  552.   def update
  553.     last_real_x = @real_x
  554.     last_real_y = @real_y
  555.     last_moving = moving?
  556.     move_by_input
  557.     super
  558.     update_scroll(last_real_x, last_real_y) unless $game_system.scroll_disabled
  559.     update_vehicle
  560.     update_nonmoving(last_moving)
  561.   end
  562.  
  563. end
  564.  
  565. #===============================================================================
  566. # Game_Picture
  567. #===============================================================================
  568. class Game_Picture
  569.   attr_accessor :mirror
  570.  
  571.   alias sol_maker_initialize initialize unless $@
  572.   def initialize(number)  
  573.   sol_maker_initialize(number)
  574.     @shake_x        = @x
  575.     @shake_y        = @y
  576.     @shake_duration = 0
  577.     @shake_power    = 1
  578.     @shake_flag     = 1
  579.     @jump_down      = @y
  580.     @jump_up        = @y - 20.0
  581.     @jump_duration  = 0
  582.     @mirror = false
  583.   end
  584.  
  585.   alias sol_maker_update update unless $@
  586.   def update
  587.   sol_maker_update
  588.     if @shake_duration >= 1
  589.       @shake_flag *= -1
  590.       f = @shake_flag
  591.       @x = @shake_x + ((@x - @shake_x) + rand(@shake_power) * (f * -1)) * f
  592.       @y = @shake_y + ((@y - @shake_y) + rand(@shake_power) * (f * -1)) * f
  593.       @shake_duration -= 1
  594.       if @shake_duration <= 0
  595.         @x = @shake_x
  596.         @y = @shake_y
  597.       end
  598.     end
  599.     if @jump_duration >= 1
  600.       d = @jump_duration
  601.       if d >= 5
  602.         d -= 4
  603.         @y = (@y * (d - 1) + @jump_up) / d
  604.       else
  605.         @y = (@y * (d - 1) + @jump_down) / d
  606.       end
  607.       @jump_duration -= 1
  608.     end
  609.   end
  610.  
  611.   def shake(power, duration)
  612.     @shake_power = power
  613.     @shake_duration = duration
  614.     @shake_x = @x
  615.     @shake_y = @y
  616.   end
  617.  
  618.   def jump(height = 20, duration = 8)
  619.     @jump_duration = duration
  620.     @jump_up = @y - height.to_f
  621.     @jump_down = @y
  622.   end
  623.  
  624. end
  625.  
  626. #===============================================================================
  627. # Game_Party
  628. #===============================================================================
  629. class Game_Party < Game_Unit  
  630.  
  631.   def full?
  632.     return (@actors.size >= MAX_MEMBERS)
  633.   end
  634.  
  635.   def reset_steps
  636.     @steps = 0
  637.   end
  638.  
  639.   def decrease_steps(value)
  640.     @steps -= value
  641.     @steps = 0 if @steps < 0
  642.   end
  643.  
  644.   def skill_learn?(skill_id)
  645.     for actor in members
  646.       return true if actor.skill_learn?($data_skills[skill_id])
  647.     end
  648.     return false
  649.   end
  650.  
  651.   def state?(state_id)
  652.     for actor in members
  653.      return true if actor.state?(state_id)
  654.     end
  655.     return false
  656.   end
  657.  
  658. end
  659.  
  660. #===============================================================================
  661. # Sprite_Picture
  662. #===============================================================================
  663. class Sprite_Picture < Sprite
  664.  
  665.   alias update_sprite_picture_rf update unless $@
  666.   def update
  667.     if @picture == nil
  668.       $game_map.screen.clear
  669.       return
  670.     end
  671.     update_sprite_picture_rf
  672.     self.mirror = @picture.mirror
  673.   end
  674.  
  675. end
  676.  
  677. #===============================================================================
  678. # Sprite_Picture
  679. #===============================================================================
  680. class Sprite_Character < Sprite_Base
  681.   attr_accessor :balloon_name
  682.  
  683.   def start_balloon
  684.     dispose_balloon
  685.     @balloon_duration = 8 * 8 + BALLOON_WAIT
  686.     @balloon_sprite = ::Sprite.new(viewport)
  687.     @balloon_sprite.bitmap = Cache.system($game_system.balloon_icon) rescue Cache.system("Balloon")
  688.     @balloon_sprite.ox = 16
  689.     @balloon_sprite.oy = 32
  690.     update_balloon
  691.   end
  692.  
  693.   alias sol_maker_update update unless $@
  694.   def update
  695.     sol_maker_update
  696.     self.mirror = @character.mirror
  697.   end
  698. end
  699.  
  700. #===============================================================================
  701. # Spriteset_Map
  702. #===============================================================================
  703. class Spriteset_Map
  704.   attr_accessor :vehicle_shadow_name  
  705.  
  706.   alias sol_maker_create_shadow create_shadow unless $@
  707.   def create_shadow
  708.     sol_maker_create_shadow
  709.     set_vehicle_shadow
  710.   end
  711.  
  712.   alias sol_maker_update_shadow update_shadow unless $@
  713.   def update_shadow
  714.     set_vehicle_shadow
  715.     sol_maker_update_shadow
  716.   end
  717.  
  718.   def set_vehicle_shadow
  719.     if @vehicle_shadow_name != $game_system.vehicle_shadow
  720.       @vehicle_shadow_name = $game_system.vehicle_shadow
  721.       @shadow_sprite.bitmap = Cache.system(@vehicle_shadow_name) rescue Cache.system("Shadow")
  722.     end
  723.   end
  724.  
  725. end
  726.  
  727. #===============================================================================
  728. # Spriteset_Map
  729. #===============================================================================
  730. class Window_Base < Window
  731.   attr_accessor :windowskin_name
  732.  
  733.   alias sol_maker_initialize initialize unless $@
  734.   def initialize(x, y, width, height)
  735.     sol_maker_initialize(x, y, width, height)
  736.     set_windowskin
  737.   end
  738.  
  739.   alias sol_maker_update update unless $@
  740.   def update
  741.   sol_maker_update
  742.   @windowskin_name  = nil  
  743.     set_windowskin
  744.   end
  745.  
  746.   def set_windowskin
  747.     if @windowskin_name != $game_system.windowskin
  748.       @windowskin_name = $game_system.windowskin      
  749.       self.windowskin = Cache.system($game_system.windowskin) rescue Cache.system("Window")
  750.     end
  751.   end
  752.  
  753. end
  754.  
  755. #===============================================================================
  756. # Window_Message
  757. #===============================================================================
  758. class Window_Message < Window_Selectable
  759.   attr_accessor :messageback_name
  760.  
  761.   alias sol_maker_create_back_sprite create_back_sprite unless $@
  762.   def create_back_sprite
  763.     sol_maker_create_back_sprite  
  764.     set_message_back
  765.   end
  766.  
  767.   alias sol_maker_update_back_sprite update_back_sprite unless $@
  768.   def update_back_sprite
  769.     sol_maker_update_back_sprite
  770.     set_message_back
  771.   end
  772.  
  773.   def set_message_back
  774.     if @messageback_name != $game_system.message_back
  775.       @messageback_name = $game_system.message_back      
  776.       @back_sprite.bitmap = Cache.system($game_system.message_back) rescue Cache.system("MessageBack")
  777.     end
  778.   end
  779.  
  780. end
  781.  
  782. #===============================================================================
  783. # Scene_Title
  784. #===============================================================================
  785. class Scene_Title < Scene_Base
  786.  
  787.   alias sol_maker_create_title_graphic create_title_graphic unless $@
  788.   def create_title_graphic
  789.     @sprite = Sprite.new
  790.     @sprite.bitmap = Cache.system($temp_title_graphic) rescue Cache.system("Title")
  791.   end
  792.  
  793. end
  794.  
  795. #===============================================================================
  796. # Scene_Gameover
  797. #===============================================================================
  798. class Scene_Gameover < Scene_Base
  799.  
  800.   alias sol_maker_create_gameover_graphic create_gameover_graphic unless $@
  801.   def create_gameover_graphic
  802.     sol_maker_create_gameover_graphic
  803.     @sprite.bitmap = Cache.system($game_system.gameover_graphic) rescue Cache.system("GameOver")
  804.   end
  805.  
  806. end
  807.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement