kerfvalerio
Member
Code:
ohh and an anyone tell me how to show faces in the status menu will appear
Can Anyone Edit This so leonhearts summon status menu and DVV's limit break menu will appear
#==============================================================================
# ** Universal Customizable Menu
#==============================================================================
# The Sleeping Leonhart.
# Version 1.3
# 30.06.07
#==============================================================================
# With this script you can customize your main menu.
# Feature:
# * Possibility to create a Menu with pictures(when the picture is active the opacity of the window is automatically setted to 0, picture must be placed in Pictures/Menu)
# * Windows animtion In and OutBotón
# * Enable disable the windows animation
# * Setup the windows position, opacity and animation direction
# * You can hide a window
# * You can show the map in background
# * 3 different status window
# * You can set the command horizzontally or vertically
# * You can show the face of hero instead the character (The face go in Characters/Face and name the picture like the character)
# * You can add/remove command
# * You can show the icons in command window (the icons must have the same name of the command)
# * Game Progress Window (To change the game progress: $game_system.progress += value)
# * Killed Monster Window
# * You can resize some windows
# * You can change the font size for some windows
# * You can add an icon for some windows
#==============================================================================
# Configuration
#==============================================================================
BG_MAP = false #make the map visible on the background
BG_PICTURE = "BG" #the name of the background picture
STATUS_PICTURE = "" #the name of the status picture
STEP_PICTURE = "" #the name of the steps picture
LOCATION_PICTURE = "" #the name of the location picture
GOLD_PICTURE = "" #the name of the gold picture
TIME_PICTURE = "" #the name of the steps picture
PROGRESS_PICTURE = "" #the name of the progress picture
KILLED_PICTURE = "" #the name of the killed monster picture
COMMAND_PICTURE = "MBG" #the name of the command picture
COMMAND_ITEM = "Item" #the name of the command item
COMMAND_SKILL = "Skill" #the name of the command skill
COMMAND_EQUIP = "Equip." #the name of the command equipment
COMMAND_STATUS = "Status" #the name of the command status
COMMAND_SAVE = "Save" #the name of the command save
COMMAND_EXIT = "Exit" #the name of the command exit
COMMAND_LIMIT = "Ultimate"
COMMAND_CUSTOMIZE = "Summon"
COMMAND_TEST = "Test"
COMMAND_AP = "AeroShaping"
GOLD_ICON = "" #the name of the gold icon
STEP_ICON = "" #the name of the step icon
TIME_ICON = "" #the name of the time icon
PROGRESS_ICON = "" #the name of the progress icon
KILLED_ICON = "" #the name of the killed monster icon
ANIMATION = true #enable the window animation
ICON = false #enable the icon in the command window
#===============================================================================
# Window Setup
#===============================================================================
# COMMAND_WINDOW Syntax: [Type of command Window, x, y, opacity, animation]
# LOCATION_WINDOW, STEP_WINDOW, GOLD_WINDOW, TIME_WINDOW Syntax: [Visible?, x, y, opacity, animation, width]
# STATUS_WINDOW Syntax: [Type of status Window, x, y, opacity, graphic, animation]
#-------------------------------------------------------------------------------
# Type of command Window = Set the Command Window in "Horizzontal" or "Vertical"
# Visible? = set to true if the window is visible
# x = Set the x position of the window
# y = Set the y position of the window
# opacity = Set the opacity of the window
# animation = Set the anmation side. "Down", "Up", "Left" or "Right"
# Type of status Window = Choose the type of the status window
# graphic = choose if show the face or the charcter in the status menu
# width = set the width of the window
#==============================================================================
COMMAND_WINDOW = ["Vertical", 464, 0, 255, "Left"]
STEP_WINDOW = [false, 0, 320-32, 160, "Up", 160, 96, 24]
LOCATION_WINDOW = [false, 0, 64, 160, "Left", 160, 64, 24]
GOLD_WINDOW = [false, 0, 128+96, 160, "Left", 160, 64, 24]
TIME_WINDOW = [false, 0, 128, 160, "Up", 160, 96, 24]
PROGRESS_WINDOW = [false, 0, 128+96, 160, "Up", 160, 64, 24]
KILLED_WINDOW = [false, 0, 480-96, 160, "Up", 160, 96, 24]
STATUS_WINDOW = [true, 2, 0, 0, 0, "Face", "Right"]
COMMAND_SETUP = [COMMAND_ITEM, COMMAND_SKILL, COMMAND_LIMIT, COMMAND_CUSTOMIZE, COMMAND_EQUIP, COMMAND_STATUS, COMMAND_EXIT]
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
class Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.character("Face/"+actor.character_name, actor.character_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler_trunc(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0+cw/8, 0, 80, ch)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_exps(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 28, 32, "Exp")
self.contents.font.color = normal_color
if actor.now_exp != 0
text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00
text = text.round
else
text = 0
end
self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%")
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 + 88, y, 36, 32, parameter_value.to_s, 2)
end
end
class Window_Selectable < Window_Base
def command(index = self.index)
return @commands[index]
end
def commands=(commands)
return if @commands == commands
@commands = commands
item_max = @item_max
@item_max = @commands.size
@column_max = @item_max
unless item_max == @item_max
unless self.contents.nil?
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(@item_max * (width - 32), height - 32)
end
refresh
end
end
class Window_MenuCommandVert < Window_Selectable
def initialize
super(0, 0, 160, COMMAND_SETUP.size * 32 + 32)
@item_max = COMMAND_SETUP.size
@commands = COMMAND_SETUP
self.contents = Bitmap.new(width - 32, @item_max * 32)
if COMMAND_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = COMMAND_WINDOW[3]
end
refresh
self.index = 0
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
alias tslums_menucmdv_update update
def update
if COMMAND_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_menucmdv_update
end
def draw_item(index, color)
self.contents.font.color = color
if ICON
rect = Rect.new(24, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(18, 0, 0, 0))
bitmap = RPG::Cache.icon(COMMAND_SETUP[index])
self.contents.blt(0, 32*index, bitmap, Rect.new(0, 0, 24, 24))
else
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
end
self.contents.draw_text(rect, @commands[index])
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
class Window_MenuCommandHoriz < Window_Selectable
def initialize
if COMMAND_SETUP.size > 6
super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 96)
else
super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 64)
end
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = COMMAND_SETUP.size
if COMMAND_SETUP.size > 6
@column_max = 6
@row_max = 2
else
@column_max = COMMAND_SETUP.size
@row_max = 1
end
@commands = COMMAND_SETUP
@c_spacing = (640 - 32)
if COMMAND_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = COMMAND_WINDOW[3]
end
refresh
self.index = 0
end
alias tslums_menucmd_update update
def update
if COMMAND_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_menucmd_update
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, system_color)
end
end
def draw_item(index, color)
cursor_width = self.width / @column_max - 32
x = 4 + index % @column_max * (cursor_width + 32)
y = index / @column_max * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if ICON
bitmap = RPG::Cache.icon(COMMAND_SETUP[index])
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(16+x, y, cursor_width, 32, @commands[index], 0)
else
self.contents.draw_text(x, y, cursor_width, 32, @commands[index], 0)
end
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
class Window_Steps < Window_Base
def initialize
super(STEP_WINDOW[1], STEP_WINDOW[2], STEP_WINDOW[5], STEP_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = STEP_WINDOW[7]
if STEP_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STEP_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = STEP_WINDOW[3]
end
refresh
if STEP_ICON != ""
bitmap = RPG::Cache.icon(STEP_ICON)
self.contents.blt(0, STEP_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_step_update update
def update
if STEP_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_step_update
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, STEP_WINDOW[5]-40, 32, "Step Count")
self.contents.font.color = normal_color
self.contents.draw_text(4, STEP_WINDOW[7], STEP_WINDOW[5]-40, 32, $game_party.steps.to_s, 2)
end
end
class Game_Map
def name
$map_infos[@map_id]
end
end
class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
class Window_Location < Window_Base
def initialize
super(LOCATION_WINDOW[1], LOCATION_WINDOW[2], LOCATION_WINDOW[5], LOCATION_WINDOW[6])
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.size = LOCATION_WINDOW[7]
if LOCATION_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + LOCATION_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = LOCATION_WINDOW[3]
end
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0 , 0, 640, 32, $game_map.name)
end
alias tslums_loc_update update
def update
if LOCATION_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_loc_update
end
end
class Window_Gold < Window_Base
def initialize
super(GOLD_WINDOW[1], GOLD_WINDOW[2], GOLD_WINDOW[5], GOLD_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = GOLD_WINDOW[7]
if GOLD_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = Bitmap.new("Graphics/Pictures/Menu/" + GOLD_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = GOLD_WINDOW[3]
end
refresh
if GOLD_ICON != ""
bitmap = RPG::Cache.icon(GOLD_ICON)
self.contents.blt(0, 0 + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_gold_update update
def update
if GOLD_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_gold_update
end
end
class Window_PlayTime < Window_Base
def initialize
super(TIME_WINDOW[1], TIME_WINDOW[2], TIME_WINDOW[5], TIME_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = TIME_WINDOW[7]
if TIME_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + TIME_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue)
self.opacity = 0
else
self.opacity = TIME_WINDOW[3]
end
refresh
if TIME_ICON != ""
bitmap = RPG::Cache.icon(TIME_ICON)
self.contents.blt(0, TIME_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_time_update update
def update
if TIME_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_time_update
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, TIME_WINDOW[5]-40, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, TIME_WINDOW[7], TIME_WINDOW[5]-40, 32, text, 2)
end
end
class Window_MenuStatus < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 480-64)
self.contents = Bitmap.new(width - 32, height - 32)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
refresh
self.active = false
self.index = -1
end
alias tslums_stat_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_stat_update
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 98
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-20, y + 80)
end
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 98, self.width - 32, 96)
end
end
end
class Window_MenuStatus2 < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 416)
self.contents = Bitmap.new(width - 32, height - 32)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
refresh
self.active = false
self.index = -1
end
alias tslums_stat2_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_stat2_update
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 98
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-10, y + 80)
end
self.contents.font.size = 18
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x + 92, y)
draw_actor_sp(actor, x + 236, y)
draw_actor_state(actor, x, y + 18)
draw_actor_level(actor, x, y + 36)
draw_actor_exps(actor, x, y + 54)
draw_actor_parameter(actor, x + 92, y + 18, 0)
draw_actor_parameter(actor, x + 92, y + 36, 1)
draw_actor_parameter(actor, x + 92, y + 54, 2)
draw_actor_parameter(actor, x + 236, y + 18, 3)
draw_actor_parameter(actor, x + 236, y + 36, 4)
draw_actor_parameter(actor, x + 236, y + 54, 5)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 98, self.width - 32, 96)
end
end
end
class Window_MenuStatus3 < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 416)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
@column_max = 1
refresh
self.index = -1
end
alias tslums_stat2_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
if self.index == -1
self.oy = 0
else
self.oy = self.index*416
end
tslums_stat2_update
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@item_max = $game_party.actors.size
if @item_max > 0
self.contents = Bitmap.new(448, 416*@item_max)
for i in 0...@item_max
y = i * 416
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-80, y+80)
end
draw_actor_name(actor, 4, y + 0)
draw_actor_class(actor, 4 + 144, y + 0)
draw_actor_level(actor, 0, y + 32)
draw_actor_state(actor, 0, y + 64)
draw_actor_hp(actor, 0 + 144, y + 32, 172)
draw_actor_sp(actor, 0 + 144, y + 64, 172)
draw_actor_parameter(actor, 0, y + 160, 0)
draw_actor_parameter(actor, 0, y + 192, 1)
draw_actor_parameter(actor, 0, y + 224, 2)
draw_actor_parameter(actor, 0, y + 256, 3)
draw_actor_parameter(actor, 0, y + 288, 4)
draw_actor_parameter(actor, 0, y + 320, 5)
draw_actor_parameter(actor, 0, y + 352, 6)
self.contents.font.color = system_color
self.contents.draw_text(0, y + 96, 80, 32, "EXP")
self.contents.draw_text(144, y + 96, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(0 + 60, y + 96, 84, 32, actor.exp_s, 2)
self.contents.draw_text(144 + 60, y + 96, 84, 32, actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(192, y + 160, 96, 32, "Equipment")
draw_item_name($data_weapons[actor.weapon_id], 192 + 16, y + 208)
draw_item_name($data_armors[actor.armor1_id], 192 + 16, y + 256)
draw_item_name($data_armors[actor.armor2_id], 192 + 16, y + 304)
draw_item_name($data_armors[actor.armor3_id], 192 + 16, y + 352)
draw_item_name($data_armors[actor.armor4_id], 192 + 16, y + 400)
end
end
end
def update_cursor_rect
self.cursor_rect.empty
end
end
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
if BG_MAP == true
@spritesetmap = Spriteset_Map.new
end
if BG_PICTURE != ""
@bg = Sprite.new
@bg.bitmap = RPG::Cache.picture("Menu/" + BG_PICTURE)
end
if COMMAND_WINDOW[0] == "Vertical"
@command_window = Window_MenuCommandVert.new
elsif COMMAND_WINDOW[0] == "Horizzontal"
@command_window = Window_MenuCommandHoriz.new
end
@command_window.index = @menu_index
if $game_party.actors.size == 0
for i in 0..COMMAND_SETUP.size
@command_window.disable_item(i)
end
end
@location_window = Window_Location .new
@playtime_window = Window_PlayTime.new
@steps_window = Window_Steps.new
@gold_window = Window_Gold.new
@progress_window = Window_Progress.new
@killed_window = Window_Killed.new
case STATUS_WINDOW[0]
when 2
@status_window = Window_MenuStatus2.new
when 3
@status_window = Window_MenuStatus3.new
else
@status_window = Window_MenuStatus.new
end
@playtime_window.visible = TIME_WINDOW[0]
@location_window.visible = LOCATION_WINDOW[0]
@gold_window.visible = GOLD_WINDOW[0]
@steps_window.visible = STEP_WINDOW[0]
@progress_window.visible = PROGRESS_WINDOW[0]
@killed_window.visible = KILLED_WINDOW[0]
if ANIMATION == true
case COMMAND_WINDOW[4]
when "Up"
@command_window.y = 480 + COMMAND_WINDOW[2]
when "Down"
@command_window.y = -COMMAND_WINDOW[2]
when "Left"
@command_window.x = 640 + COMMAND_WINDOW[1]
when "Right"
@command_window.x = -COMMAND_WINDOW[1].to_f
end
case TIME_WINDOW[4]
when "Up"
@playtime_window.y = 480 + TIME_WINDOW[2]
when "Down"
@playtime_window.y = -480 - TIME_WINDOW[2]
when "Left"
@playtime_window.x = 640 + TIME_WINDOW[1]
when "Right"
@playtime_window.x = -640 - TIME_WINDOW[1]
end
case LOCATION_WINDOW[4]
when "Up"
@location_window.y = 480 + LOCATION_WINDOW[2]
when "Down"
@location_window.y = -LOCATION_WINDOW[2]
when "Left"
@location_window.x = 640 + LOCATION_WINDOW[1]
when "Right"
@location_window.x = -LOCATION_WINDOW[1].to_f
end
case STEP_WINDOW[4]
when "Up"
@steps_window.y = 480 + STEP_WINDOW[2]
when "Down"
@steps_window.y = -480 - STEP_WINDOW[2]
when "Left"
@steps_window.x = 640 + STEP_WINDOW[1]
when "Right"
@steps_window.x = -640 - STEP_WINDOW[1]
end
case GOLD_WINDOW[4]
when "Up"
@gold_window.y = 480 + GOLD_WINDOW[2]
when "Down"
@gold_window.y = -480 - GOLD_WINDOW[2]
when "Left"
@gold_window.x = 640 + GOLD_WINDOW[1]
when "Right"
@gold_window.x = -640 - GOLD_WINDOW[1]
end
case STATUS_WINDOW[5]
when "Up"
@status_window.y = 480 + STATUS_WINDOW[2]
when "Down"
@status_window.y = -480 - STATUS_WINDOW[2]
when "Left"
@status_window.x = 640 + STATUS_WINDOW[1]
when "Right"
@status_window.x = -640 - STATUS_WINDOW[1]
end
case PROGRESS_WINDOW[4]
when "Up"
@progress_window.y = 480 + PROGRESS_WINDOW[2]
when "Down"
@progress_window.y = -480 - PROGRESS_WINDOW[2]
when "Left"
@progress_window.x = 640 + PROGRESS_WINDOW[1]
when "Right"
@progress_window.x = -640 - PROGRESS_WINDOW[1]
end
case KILLED_WINDOW[4]
when "Up"
@killed_window.y = 480 + KILLED_WINDOW[2]
when "Down"
@killed_window.y = -480 - KILLED_WINDOW[2]
when "Left"
@killed_window.x = 640 + KILLED_WINDOW[1]
when "Right"
@killed_window.x = -640 - KILLED_WINDOW[1]
end
end
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
dispose
end
def dispose
if BG_MAP == true
@spritesetmap.dispose
end
@command_window.dispose
if BG_PICTURE != ""
@bg.dispose
end
@location_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
@progress_window.dispose
@killed_window.dispose
end
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
def update
windows_update
if ANIMATION == true
animate_window
end
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
end
def windows_update
@command_window.update
@location_window.update
@playtime_window.update
@steps_window.update
@gold_window.update
@status_window.update
@progress_window.update
@killed_window.update
end
def animate_window
case COMMAND_WINDOW[4]
when "Up"
if @command_window.y > COMMAND_WINDOW[2]
@command_window.y -= ((480 + COMMAND_WINDOW[2]) / 10).to_f
end
if @command_window.y < COMMAND_WINDOW[2]
@command_window.y = COMMAND_WINDOW[2]
end
when "Down"
if @command_window.y < COMMAND_WINDOW[2]
@command_window.y += (COMMAND_WINDOW[2] / 10).to_f
end
if @command_window.y > COMMAND_WINDOW[2]
@command_window.y = COMMAND_WINDOW[2]
end
when "Left"
if @command_window.x > COMMAND_WINDOW[1]
@command_window.x -= ((640 + COMMAND_WINDOW[1]) / 10).to_f
end
if @command_window.x < COMMAND_WINDOW[1]
@command_window.x = COMMAND_WINDOW[1]
end
when "Right"
if @command_window.x < COMMAND_WINDOW[1]
@command_window.x += (COMMAND_WINDOW[1] / 10).to_f
end
if @command_window.x > COMMAND_WINDOW[1]
@command_window.x= COMMAND_WINDOW[1]
end
end
case TIME_WINDOW[4]
when "Up"
if @playtime_window.y > TIME_WINDOW[2]
@playtime_window.y -= ((480 + TIME_WINDOW[2]) / 10).to_f
end
if @playtime_window.y < TIME_WINDOW[2]
@playtime_window.y = TIME_WINDOW[2]
end
when "Down"
if @playtime_window.y < TIME_WINDOW[2]
@playtime_window.y += ((480 + TIME_WINDOW[2]) / 10).to_f
end
if @playtime_window.y > TIME_WINDOW[2]
@playtime_window.y = TIME_WINDOW[2]
end
when "Left"
if @playtime_window.x > TIME_WINDOW[1]
@playtime_window.x -= ((640 + TIME_WINDOW[1]) / 10).to_f
end
if @playtime_window.x < TIME_WINDOW[1]
@playtime_window.x = TIME_WINDOW[1]
end
when "Right"
if @playtime_window.x < TIME_WINDOW[1]
@playtime_window.x += ((640 + TIME_WINDOW[1]) / 10).to_f
end
if @playtime_window.x > TIME_WINDOW[1]
@playtime_window.x = TIME_WINDOW[1]
end
end
case LOCATION_WINDOW[4]
when "Up"
if @location_window.y > LOCATION_WINDOW[2]
@location_window.y -= ((480 + LOCATION_WINDOW[2]) / 10).to_f
end
if @location_window.y < LOCATION_WINDOW[2]
@location_window.y = LOCATION_WINDOW[2]
end
when "Down"
if @location_window.y < LOCATION_WINDOW[2]
@location_window.y += (LOCATION_WINDOW[2] / 10).to_f
end
if @location_window.y > LOCATION_WINDOW[2]
@location_window.y = LOCATION_WINDOW[2]
end
when "Left"
if @location_window.x > LOCATION_WINDOW[1]
@location_window.x -= ((640 + LOCATION_WINDOW[1]) / 10).to_f
end
if @location_window.x < LOCATION_WINDOW[1]
@location_window.x = LOCATION_WINDOW[1]
end
when "Right"
if @location_window.x < LOCATION_WINDOW[1]
@location_window.x += (LOCATION_WINDOW[1] / 10).to_f
end
if @location_window.x > LOCATION_WINDOW[1]
@location_window.x= LOCATION_WINDOW[1]
end
end
case STEP_WINDOW[4]
when "Up"
if @steps_window.y > STEP_WINDOW[2]
@steps_window.y -= ((480 + STEP_WINDOW[2]) / 10).to_f
end
if @steps_window.y < STEP_WINDOW[2]
@steps_window.y = STEP_WINDOW[2]
end
when "Down"
if @steps_window.y < STEP_WINDOW[2]
@steps_window.y += ((480 + STEP_WINDOW[2]) / 10).to_f
end
if @steps_window.y > STEP_WINDOW[2]
@steps_window.y = STEP_WINDOW[2]
end
when "Left"
if @steps_window.x > STEP_WINDOW[1]
@steps_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f
end
if @steps_window.x < STEP_WINDOW[1]
@steps_window.x = STEP_WINDOW[1]
end
when "Right"
if @steps_window.x < STEP_WINDOW[1]
@steps_window.x += ((640 + STEP_WINDOW[1]) / 10).to_f
end
if @steps_window.x > STEP_WINDOW[1]
@steps_window.x = STEP_WINDOW[1]
end
end
case GOLD_WINDOW[4]
when "Up"
if @gold_window.y > GOLD_WINDOW[2]
@gold_window.y -= ((480 + GOLD_WINDOW[2]) / 10).to_f
end
if @gold_window.y < GOLD_WINDOW[2]
@gold_window.y = GOLD_WINDOW[2]
end
when "Down"
if @gold_window.y < GOLD_WINDOW[2]
@gold_window.y += ((480 + GOLD_WINDOW[2]) / 10).to_f
end
if @gold_window.y > GOLD_WINDOW[2]
@gold_window.y = GOLD_WINDOW[2]
end
when "Left"
if @gold_window.x > GOLD_WINDOW[1]
@gold_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f
end
if @gold_window.x < GOLD_WINDOW[1]
@gold_window.x = GOLD_WINDOW[1]
end
when "Right"
if @gold_window.x < GOLD_WINDOW[1]
@gold_window.x += ((640 + GOLD_WINDOW[1]) / 10).to_f
end
if @gold_window.x > GOLD_WINDOW[1]
@gold_window.x = GOLD_WINDOW[1]
end
end
case STATUS_WINDOW[5]
when "Up"
if @status_window.y > STATUS_WINDOW[2]
@status_window.y -= ((480 + STATUS_WINDOW[2]) / 10).to_f
end
if @status_window.y < STATUS_WINDOW[2]
@status_window.y = STATUS_WINDOW[2]
end
when "Down"
if @status_window.y < STATUS_WINDOW[2]
@status_window.y += ((480 + STATUS_WINDOW[2]) / 10).to_f
end
if @status_window.y > STATUS_WINDOW[2]
@status_window.y = STATUS_WINDOW[2]
end
when "Left"
if @status_window.x > STATUS_WINDOW[1]
@status_window.x -= ((640 + STATUS_WINDOW[1]) / 10).to_f
end
if @status_window.x < STATUS_WINDOW[1]
@status_window.x = STATUS_WINDOW[1]
end
when "Right"
if @status_window.x < STATUS_WINDOW[1]
@status_window.x += ((640 + STATUS_WINDOW[1]) / 10).to_f
end
if @status_window.x > STATUS_WINDOW[1]
@status_window.x = STATUS_WINDOW[1]
end
end
case PROGRESS_WINDOW[4]
when "Up"
if @progress_window.y > PROGRESS_WINDOW[2]
@progress_window.y -= ((480 + PROGRESS_WINDOW[2]) / 10).to_f
end
if @progress_window.y < PROGRESS_WINDOW[2]
@progress_window.y = PROGRESS_WINDOW[2]
end
when "Down"
if @progress_window.y < PROGRESS_WINDOW[2]
@progress_window.y += ((480 + PROGRESS_WINDOW[2]) / 10).to_f
end
if @progress_window.y > PROGRESS_WINDOW[2]
@progress_window.y = PROGRESS_WINDOW[2]
end
when "Left"
if @progress_window.x > PROGRESS_WINDOW[1]
@progress_window.x -= ((640 + PROGRESS_WINDOW[1]) / 10).to_f
end
if @progress_window.x < PROGRESS_WINDOW[1]
@progress_window.x = PROGRESS_WINDOW[1]
end
when "Right"
if @progress_window.x < PROGRESS_WINDOW[1]
@progress_window.x += ((640 + PROGRESS_WINDOW[1]) / 10).to_f
end
if @progress_window.x > PROGRESS_WINDOW[1]
@progress_window.x = PROGRESS_WINDOW[1]
end
end
case KILLED_WINDOW[4]
when "Up"
if @killed_window.y > KILLED_WINDOW[2]
@killed_window.y -= ((480 + KILLED_WINDOW[2]) / 10).to_f
end
if @killed_window.y < KILLED_WINDOW[2]
@killed_window.y = KILLED_WINDOW[2]
end
when "Down"
if @killed_window.y < KILLED_WINDOW[2]
@killed_window.y += ((480 + KILLED_WINDOW[2]) / 10).to_f
end
if @killed_window.y > KILLED_WINDOW[2]
@killed_window.y = KILLED_WINDOW[2]
end
when "Left"
if @killed_window.x > KILLED_WINDOW[1]
@killed_window.x -= ((640 + KILLED_WINDOW[1]) / 10).to_f
end
if @killed_window.x < KILLED_WINDOW[1]
@killed_window.x = KILLED_WINDOW[1]
end
when "Right"
if @killed_window.x < KILLED_WINDOW[1]
@killed_window.x += ((640 + KILLED_WINDOW[1]) / 10).to_f
end
if @killed_window.x > KILLED_WINDOW[1]
@killed_window.x = KILLED_WINDOW[1]
end
end
end
def delete_window
i=0
loop do
windows_update
case COMMAND_WINDOW[4]
when "Up"
if @command_window.y < 480 + COMMAND_WINDOW[2]
@command_window.y += ((480 + COMMAND_WINDOW[2]) / 10).to_f
end
when "Down"
if @command_window.y > -480 - COMMAND_WINDOW[2]
@command_window.y -= ((480 + COMMAND_WINDOW[2]) / 10).to_f
end
when "Left"
if @command_window.x < 640 + COMMAND_WINDOW[1]
@command_window.x += ((640 + COMMAND_WINDOW[1]) / 10).to_f
end
when "Right"
if @command_window.x > -640 - COMMAND_WINDOW[1]
@command_window.x -= ((640 + COMMAND_WINDOW[1]) / 10).to_f
end
end
case LOCATION_WINDOW[4]
when "Up"
if @location_window.y < 480 + LOCATION_WINDOW[2]
@location_window.y += ((480 + LOCATION_WINDOW[2]) / 10).to_f
end
when "Down"
if @location_window.y > -480 - LOCATION_WINDOW[2]
@location_window.y -= ((480 + LOCATION_WINDOW[2]) / 10).to_f
end
when "Left"
if @location_window.x < 640 + LOCATION_WINDOW[1]
@location_window.x += ((640 + LOCATION_WINDOW[1]) / 10).to_f
end
when "Right"
if @location_window.x > -640 - LOCATION_WINDOW[1]
@location_window.x -= ((640 + LOCATION_WINDOW[1]) / 10).to_f
end
end
case TIME_WINDOW[4]
when "Up"
if @playtime_window.y < 480 + TIME_WINDOW[2]
@playtime_window.y += ((480 + TIME_WINDOW[2]) / 10).to_f
end
when "Down"
if @playtime_window.y > -480 - TIME_WINDOW[2]
@playtime_window.y -= ((480 + TIME_WINDOW[2]) / 10).to_f
end
when "Left"
if @playtime_window.x < 640 + TIME_WINDOW[1]
@playtime_window.x += ((640 + TIME_WINDOW[1]) / 10).to_f
end
when "Right"
if @playtime_window.x > -640 - TIME_WINDOW[1]
@playtime_window.x -= ((640 + TIME_WINDOW[1]) / 10).to_f
end
end
case STEP_WINDOW[4]
when "Up"
if @steps_window.y < 480 + STEP_WINDOW[2]
@steps_window.y += ((480 + STEP_WINDOW[2]) / 10).to_f
end
when "Down"
if @steps_window.y > -480 - STEP_WINDOW[2]
@steps_window.y -= ((480 + STEP_WINDOW[2]) / 10).to_f
end
when "Left"
if @steps_window.x < 640 + STEP_WINDOW[1]
@steps_window.x += ((640 + STEP_WINDOW[1]) / 10).to_f
end
when "Right"
if @steps_window.x > -640 - STEP_WINDOW[1]
@steps_window.x -= ((640 + STEP_WINDOW[1]) / 10).to_f
end
end
case GOLD_WINDOW[4]
when "Up"
if @gold_window.y < 480 + GOLD_WINDOW[2]
@gold_window.y += ((480 + GOLD_WINDOW[2]) / 10).to_f
end
when "Down"
if @gold_window.y > -480 - GOLD_WINDOW[2]
@gold_window.y -= ((480 + GOLD_WINDOW[2]) / 10).to_f
end
when "Left"
if @gold_window.x < 640 + GOLD_WINDOW[1]
@gold_window.x += ((640 + GOLD_WINDOW[1]) / 10).to_f
end
when "Right"
if @gold_window.x > -640 - GOLD_WINDOW[1]
@gold_window.x -= ((640 + GOLD_WINDOW[1]) / 10).to_f
end
end
case STATUS_WINDOW[5]
when "Up"
if @status_window.y < 480 + STATUS_WINDOW[2]
@status_window.y += ((480 + STATUS_WINDOW[2]) / 10).to_f
end
when "Down"
if @status_window.y > -480 - STATUS_WINDOW[2]
@status_window.y -= ((480 + STATUS_WINDOW[2]) / 10).to_f
end
when "Left"
if @status_window.x < 640 + STATUS_WINDOW[1]
@status_window.x += ((640 + STATUS_WINDOW[1]) / 10).to_f
end
when "Right"
if @status_window.x > -640 - STATUS_WINDOW[1]
@status_window.x -= ((640 + STATUS_WINDOW[1]) / 10).to_f
end
end
case PROGRESS_WINDOW[4]
when "Up"
if @progress_window.y < 480 + PROGRESS_WINDOW[2]
@progress_window.y += ((480 + PROGRESS_WINDOW[2]) / 10).to_f
end
when "Down"
if @progress_window.y > -480 - PROGRESS_WINDOW[2]
@progress_window.y -= ((480 + PROGRESS_WINDOW[2]) / 10).to_f
end
when "Left"
if @progress_window.x < 640 + PROGRESS_WINDOW[1]
@progress_window.x += ((640 + PROGRESS_WINDOW[1]) / 10).to_f
end
when "Right"
if @progress_window.x > -640 - PROGRESS_WINDOW[1]
@progress_window.x -= ((640 + PROGRESS_WINDOW[1]) / 10).to_f
end
end
case KILLED_WINDOW[4]
when "Up"
if @killed_window.y < 480 + KILLED_WINDOW[2]
@killed_window.y += ((480 + KILLED_WINDOW[2]) / 10).to_f
end
when "Down"
if @killed_window.y > -480 - KILLED_WINDOW[2]
@killed_window.y -= ((480 + KILLED_WINDOW[2]) / 10).to_f
end
when "Left"
if @killed_window.x < 640 + KILLED_WINDOW[1]
@killed_window.x += ((640 + KILLED_WINDOW[1]) / 10).to_f
end
when "Right"
if @killed_window.x > -640 - KILLED_WINDOW[1]
@killed_window.x -= ((640 + KILLED_WINDOW[1]) / 10).to_f
end
end
delay(1)
i += 1
if i == 10
break
end
end
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
delete_window
$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.command
#CONFIGURATION!
when COMMAND_ITEM
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when COMMAND_SKILL
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when COMMAND_LIMIT
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_LimitMenu.new(@status_window.index)
when COMMAND_EQUIP
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when COMMAND_STATUS
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when COMMAND_SAVE
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)<br /