Danh hiệu : The King Tổng số bài gửi : 1229 MGV Xu : 2677 Danh tiếng : 45 Ngày tham gia : 10/12/2010 Đến từ : Quảng Ninh
Tiêu đề: Script menu EVO 16/12/2010, 11:20
Script:
Code:
#=============================================================================== # * Menu System EVO # * By Crazyninjaguy # * http://www.planetdev.net #------------------------------------------------------------------------------- # * Please give credits if you use this script! #===============================================================================
class Scene_Menu < Scene_Base def start super create_menu_background create_windows end def update super @command_window.update @status_window.update @dummy.update @location.update @gold.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end def terminate super dispose_menu_background @command_window.dispose @status_window.dispose @dummy.dispose @location.dispose @gold.dispose end def pre_terminate super close_command_window end def create_windows @commands = [ Vocab::item, Vocab::skill, Vocab::equip, Vocab::status, Vocab::save, Vocab::game_end] @dummy = Window_MenuDummy.new @dummy.openness = 0 @dummy.open @command_window = Window_Command.new(138, @commands) @command_window.x = 24 @command_window.opacity = 0 @command_window.openness = 0 @command_window.open @status_window = Window_MenuStatus.new(0, (416 - 240)) @status_window.openness = 0 @status_window.open @location = Window_Location.new @location.openness = 0 @location.open @gold = Window_Gold.new((Graphics.width - 160), 56) @gold.openness = 0 @gold.open end def close_command_window @dummy.close @status_window.close @command_window.close @location.close @gold.close begin @dummy.update @status_window.update @command_window.update @location.update @gold.update Graphics.update end until @dummy.openness == 0 && @status_window.openness == 0 && @command_window.openness == 0 end def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1,2,3 # Skill, equipment, status start_actor_selection when 4 # Save $scene = Scene_File.new(true, false, false) when 5 # End Game $scene = Scene_End.new end end end def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 # skill $scene = Scene_Skill.new(@status_window.index) when 2 # equipment $scene = Scene_Equip.new(@status_window.index) when 3 # status $scene = Scene_Status.new(@status_window.index) end end end end
class Window_MenuStatus < Window_Selectable def initialize(x, y) super(x, y, 544, 240) refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members draw_actor_face(actor, (actor.index * 130) + 10, 2, 92) x = 128 y = actor.index * 96 + WLH / 2 draw_actor_graphic(actor, (actor.index * 130) + 24, 94) draw_actor_name(actor, actor.index * 130, 106) draw_actor_hp(actor, (actor.index * 130), 106 + (WLH * 2), 110) draw_actor_mp(actor, (actor.index * 130), 106 + (WLH * 3), 110) draw_actor_level(actor, (actor.index * 130), (106 + WLH)) end end def item_rect(index) rect = Rect.new((@index * 120), 0, 120, (240 - 32)) rect.width = 120 rect.height = (240 - 32) rect.x = (@index * 120) rect.y = 0 return rect end def update_cursor if @index < 0 self.cursor_rect.empty elsif @index == 0 self.cursor_rect.set(-5, 0, 120, (240 - 32)) elsif @index == 1 self.cursor_rect.set(125, 0, 120, (240 - 32)) elsif @index == 2 self.cursor_rect.set(255, 0, 120, (240 - 32)) elsif @index == 3 self.cursor_rect.set(385, 0, 120, (240 - 32)) end end def update super if cursor_movable? last_index = @index if Input.repeat?(Input::RIGHT) if @index == 0 @index = 1 elsif @index == 1 @index = 2 elsif @index == 2 @index = 3 elsif @index == 3 @index = 0 end elsif Input.repeat?(Input::LEFT) if @index == 0 @index = 3 elsif @index == 1 @index = 0 elsif @index == 2 @index = 1 elsif @index == 3 @index = 2 end end if @index != last_index Sound.play_cursor end end update_cursor call_update_help end end
class Window_MenuDummy < Window_Base def initialize super(0, 0, 160, 176) refresh end def refresh draw_icon(144, 0, 0) draw_icon(128, 0, 24) draw_icon(32, 0, 48) draw_icon(106, 0, 72) draw_icon(176, 0, 96) draw_icon(142, 0, 120) end end
class Window_Location < Window_Base def initialize super(160, 0, (544 - 160), 56) refresh end def refresh @map = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name self.contents.draw_text(0, 0, width - 32, WLH, "Location:") self.contents.draw_text(0, 0, width - 32, WLH, @map, 2) end end
Danh hiệu : Họa sĩ của thời đại Tổng số bài gửi : 170 MGV Xu : 2733 Danh tiếng : 53 Ngày tham gia : 11/12/2010 Tuổi : 27 Đến từ : http://mgvn.isgreat.org
Tiêu đề: Re: Script menu EVO 16/12/2010, 20:03
Good!
L.V Level 4
Tổng số bài gửi : 197 MGV Xu : 341 Danh tiếng : 9 Ngày tham gia : 13/12/2010 Tuổi : 29 Đến từ : Cầu Xe Hội
Tiêu đề: Re: Script menu EVO 17/12/2010, 10:10
Bình thường ... ko đẹp lắm ... Dùng đỡ cũng tạm
duongtiep Level 15
Danh hiệu : The King Tổng số bài gửi : 1229 MGV Xu : 2677 Danh tiếng : 45 Ngày tham gia : 10/12/2010 Đến từ : Quảng Ninh
Tiêu đề: Re: Script menu EVO 18/12/2010, 06:18
dùng đõ cũng được còn mấy menu đẹp lắm .. hôm nào copy cho mọi người coi đỡ
L.V Level 4
Tổng số bài gửi : 197 MGV Xu : 341 Danh tiếng : 9 Ngày tham gia : 13/12/2010 Tuổi : 29 Đến từ : Cầu Xe Hội
Tiêu đề: Re: Script menu EVO 21/12/2010, 07:19
Đâu share coi !
duongtiep Level 15
Danh hiệu : The King Tổng số bài gửi : 1229 MGV Xu : 2677 Danh tiếng : 45 Ngày tham gia : 10/12/2010 Đến từ : Quảng Ninh