#============================================================ # ToS Menu_Compilations # Compilated By: Vash (aka Vash-X, Edward Elric, Gadguard) # Released on: Dec. 27, 2005 # Bug Fixed/Updates: Jan. 4, 2006 # Version: 1.2 # Credits: Many Japanese Sites and RMXP.net Members (This Menu Frame was made along time ago # and I got bored with it and so decided to share but don't remember all the places and people I got # the scripts from). #============================================================ #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú class Window_Base self.top_row + (self.page_row_max - 1) self.top_row = row - (self.page_row_max - 1) end cursor_width = (self.width - 55) / @column_max x = @index % @column_max * (cursor_width + 3) y = @index / @column_max * 32 - self.oy self.cursor_rect.set(x, y, 32, 32) end end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú class Window_Base = 108 hp_x = x + width - 108 flag = true elsif width - 32 >= 48 hp_x = x + width - 48 flag = false end self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2) if flag self.contents.font.color = normal_color self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1) self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s) end end def draw_actor_sp(actor, x, y, width = 144) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, 32, $data_system.words.sp) if width - 32 >= 108 sp_x = x + width - 108 flag = true elsif width - 32 >= 48 sp_x = x + width - 48 flag = false end self.contents.font.color = actor.sp == 0 ? knockout_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2) if flag self.contents.font.color = normal_color self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1) self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s) end end def draw_actor_parameter(actor, x, y, type) case type when 0 parameter_name = $data_system.words.atk parameter_value = actor.atk when 1 parameter_name = $data_system.words.pdef parameter_value = actor.pdef when 2 parameter_name = $data_system.words.mdef parameter_value = actor.mdef when 3 parameter_name = $data_system.words.str parameter_value = actor.str when 4 parameter_name = $data_system.words.dex parameter_value = actor.dex when 5 parameter_name = $data_system.words.agi parameter_value = actor.agi when 6 parameter_name = $data_system.words.int parameter_value = actor.int end self.contents.font.color = system_color self.contents.draw_text(x, y, 120, 32, parameter_name) self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2) end def draw_item_name(item, x, y) if item == nil return end bitmap = RPG::Cache.icon(item.icon_name) self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) self.contents.font.color = normal_color self.contents.draw_text(x + 28, y, 212, 32, item.name) end end class Scene_Menu MA_MENU_TRANSITION = "015-Diamond01" end #¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú¡Ù¡Ú class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index @changer = 0 @where = 0 @checker = 0 end def main @commands = [] @commands[0] = $data_system.words.item @commands[1] = $data_system.words.skill @commands[2] = $data_system.words.equip @commands[3] = "Status" @commands[4] = "Party" @commands[5] = "Save" @commands[6] = "End" @command_window = Window_MenuCommand.new(@commands) @command_window.back_opacity = 160 @command_window.index = @menu_index if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end if $game_system.save_disabled @command_window.disable_item(4) end @other_window = Window_Other.new @other_window.back_opacity = 160 @other_window.x = 470 @other_window.y = 96 @status_window = Window_MenuStatus.new @status_window.back_opacity = 160 @status_window.x = 0 @status_window.y = 96 @mapset = Spriteset_Map.new win1=Window_Base.new(0, 96, 470, 100) win2=Window_Base.new(0, 196, 470, 93) win3=Window_Base.new(0, 289, 470, 93) win4=Window_Base.new(0, 382, 470, 98) win1.back_opacity= 0 win2.back_opacity= 0 win3.back_opacity= 0 win4.back_opacity= 0 win1.z=9999 win2.z=9999 win3.z=9999 win4.z=9999 Graphics.transition(30, "Graphics/Transitions/" + MA_MENU_TRANSITION) loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze win1.dispose win2.dispose win3.dispose win4.dispose @command_window.dispose @other_window.dispose @status_window.dispose end def update @command_window.update @other_window.update @status_window.update if @command_window.active update_command return end if @status_window.active update_status return end if @difficulty_window != nil &&@difficulty_window.active update_difficulty return end end def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index <4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 # Item $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 # Skill $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 # Equip $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 # Status $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # Party Changer $game_system.se_play($data_system.decision_se) @checker = 0 @command_window.active = false @status_window.active = true @status_window.index = 0 when 5 # Save if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 6 # End $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end # -------------------------------- def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) when 4 $game_system.se_play($data_system.decision_se) if @checker == 0 @changer = $game_party.actors[@status_window.index] @where = @status_window.index @checker = 1 else $game_party.actors[@where] = $game_party.actors[@status_window.index] $game_party.actors[@status_window.index] = @changer @checker = 0 @status_window.refresh end end return end end end