Hey I was wondering how I would go about adding an accessory slot to this script. It's Gaveups menu. I LOVE this script however for the equipment there is that ONE slot that is blank that an item could go but Im a noob at scripting lol. Anyways here is the script.
FIRST HALF
FIRST HALF
Code:
#========================================================================================
# Thanks: AcedentProne: for showing location window and using facesets
# Thanks: Firewords and Axe Man Deke
# Made by GaveUpTomorrow - January 7th, 2007
# Version 1.13
#========================================================================================
#----------------------------------------------------------------
# Window_Base (New Functions)
#----------------------------------------------------------------
class Window_Base < Window
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, 90, 32, item.name)
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 - cw / 2, y - ch, bitmap, src_rect)
end
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width; fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end
def draw_actor_level2(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "Level")
self.contents.font.color = normal_color
self.contents.draw_text(x + 26, y, 24, 32, actor.level.to_s, 2)
end
def draw_actor_exp2(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "Exp")
self.contents.font.color = normal_color
self.contents.draw_text(x + -5, y, 84, 32, actor.exp_s, 2)
self.contents.draw_text(x + 79, y, 12, 32, "/", 1)
self.contents.draw_text(x + 91, y, 84, 32, actor.next_exp_s)
end
def draw_actor_hp2(actor, x, y, width = 144)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
if width - 32 >= 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 - 15, y, 48, 32, actor.hp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 33, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 45, y, 48, 32, actor.maxhp.to_s)
end
end
def draw_actor_sp2(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 - 15, y, 48, 32, actor.sp.to_s, 2)
if flag
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 33, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 45, y, 48, 32, actor.maxsp.to_s)
end
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_Selectable < Window_Selectable
def update_cursor_rect
if @index < 0; self.cursor_rect.empty; return; end
row = @index / @column_max
if row < self.top_row; self.top_row = row; end
if row > self.top_row + (self.page_row_max - 1); self.top_row = row - (self.page_row_max - 1); end
cursor_width = self.width / @column_max - 32
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 32 - self.oy
self.cursor_rect.set(x, y, cursor_width + 5, 32)
end
end
#==============================================================================
class Window_Location < Window_Base
def initialize
super(475, 234, 160, 172)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 18
self.opacity = 175
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 120, 32, " Location:")
self.contents.draw_text(0, 50 , 120, 32, " Distance Traveled:")
self.contents.draw_text(0, 100, 120, 32, " Version:")
self.contents.draw_text(96, 100, 120, 32, "1.0b")
self.contents.font.color = normal_color
if $game_map.name.include?("*")
self.contents.draw_text(0, 25, 120, 32, $game_map.name.delete!("*"))
else
self.contents.draw_text(0, 25, 120, 32, $game_map.name)
end
self.contents.draw_text(4, 75, 120, 32, $game_party.steps.to_s, 2)
end
end
#==============================================================================
class Window_MenuStatus2 < Window_Base
def initialize
super(170, 355, 300, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 18
refresh
self.opacity = 175
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
i = $game_system.character_select.to_s
actor = $game_party.actors[i.to_i]
x = -50
if $game_system.face_support == 1
draw_actor_face(actor, 0, 85)
x = 0
end
draw_actor_level(actor, x + 105, 0)
draw_actor_exp(actor, x + 105, 20)
draw_actor_hp(actor, x + 105, 40)
draw_actor_sp(actor, x + 105, 60)
end
end
#==============================================================================
class Window_MapHud < Window_Base
def initialize
if $game_system.map_hud == 1
super(5, 355, 260, 120)
elsif $game_system.map_hud == 2
super(5, 335, 630, 140)
end
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 18
refresh
self.opacity = 100
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
if $game_system.map_hud == 1
i = $game_system.map_hudcharselect
actor = $game_party.actors[i.to_i]
draw_actor_face(actor, 0, 85)
x = 0
#end
self.contents.font.size = 14
draw_actor_level2(actor, x + 85, 0)
draw_actor_exp2(actor, x + 85, 20)
draw_actor_hp2(actor, x + 85, 40)
draw_actor_sp2(actor, x + 85, 60)
end
if $game_system.map_hud == 2
for i in 0..3
actor = $game_party.actors[i.to_i]
draw_actor_face(actor, 5 + 165*i, 80)
self.contents.font.size = 12
if i == 0
draw_actor_level2(actor, 0 + 85, 10)
elsif i == 1
draw_actor_level2(actor, 165 - 50, 50)
elsif i == 2
draw_actor_level2(actor, 2 * 165 + 85, 10)
elsif i == 3
draw_actor_level2(actor, 3 * 165 - 50, 50)
end
draw_actor_hp2(actor, 165 * i, 75)
draw_actor_sp2(actor, 165 * i, 85)
end
end
end
end
#==============================================================================
class Window_PlayTime2 < Window_Base
def initialize
super(5, 202, 160, 203)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
self.opacity = 175
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 17
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 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, 32, 120, 32, text, 2)
self.contents.draw_text(4, 32, 120, 32, text, 2)
self.contents.font.color = system_color
self.contents.draw_text(4,64,140,40,"Sub-Quests: ")
self.contents.font.color = normal_color
self.contents.draw_text(95,64,140,40, $game_variables[4998].to_s)
self.contents.font.color = system_color
self.contents.draw_text(4,64,140,103,"Main Quests: ")
self.contents.font.color = normal_color
self.contents.draw_text(95,64,140,103,$game_variables[4999].to_s)
self.contents.font.color = system_color
self.contents.draw_text(4,64,140,166,"Prize Tickets: ")
self.contents.font.color = normal_color
self.contents.draw_text(95,64,140,166,$game_variables[5000].to_s)
end
#--------------------------------------------------------------------------
def update; super
if Graphics.frame_count / Graphics.frame_rate != @total_sec; refresh; end
if $game_time.get_minute.floor != @minute; refresh; end; end; end
#==============================================================================
class Window_Status2 < Window_Base
def initialize(actor)
super(170, 5, 300, 345)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 175
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.name = $defaultfonttype
self.contents.font.size = 18
i = $game_system.character_select.to_s
@actor = $game_party.actors[i.to_i]
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 178, 0)
draw_actor_state(@actor, 86, 0)
@holder = ["[Empty]","[Empty]","[Empty]","[Empty]","[Empty]"]
for i in 0..6
draw_actor_parameter(@actor, 4, 50 + 17*i, i)
end
self.contents.font.color = normal_color
self.contents.draw_text(76, 25, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 25, 80, 32, "Next Level:")
self.contents.draw_text(4, 182, 96, 32, "Equipment:")
self.contents.font.size = 13
self.contents.font.color = normal_color
s1 = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor2_id], $data_armors[@actor.armor4_id], $data_armors[@actor.armor1_id]]
s2 = [0, 30, 215, 30, 247, 30, 279, 180, 215, 180, 246, 4, 4, 4, 149, 149]
for i in 0..4
if s1[i] == nil
self.contents.draw_text(s2[2*i + 1], s2[2*i+2] , 120, 32, @holder[i])
end
end
draw_item_name($data_weapons[@actor.weapon_id], 4, 215)
draw_item_name($data_armors[@actor.armor2_id], 4, 247)
draw_item_name($data_armors[@actor.armor4_id], 4, 279)
draw_item_name($data_armors[@actor.armor1_id], 149, 215)
draw_item_name($data_armors[@actor.armor3_id], 149, 247)
end
end
#==============================================================================
class Window_Battler < Window_Base
def initialize
super(475, 5, 160, 224)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 175
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
i = $game_system.character_select.to_s
actor = $game_party.actors[i.to_i]
draw_actor_battler(actor, 60, 180)
end
end
#==============================================================================
class Window_Gold < Window_Base
def initialize
super(5, 411, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 175
cx = contents.text_size($data_system.words.gold).width
self.contents.font.size = 17
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
end
end
#==============================================================================
class Window_RightCorner < Window_Base
def initialize
super(475, 411 , 160 , 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 175
self.contents.font.size = 18
refresh
end
def refresh
self.contents.clear
if $game_system.help_mode == 1
if $scene.is_a?(Scene_Equip)
self.contents.draw_text(7, 0, 135, 32, "Press [Shift] For Descriptions")
elsif $scene.is_a?(Scene_Menu)
if $game_system.debug == false
self.contents.draw_text(7, 0, 135, 32, "Press [Shift] for Options ")
end
elsif $scene.is_a?(Scene_Options)
self.contents.draw_text(15, 0, 135, 32, "Options Menu")
end
end
end
end
#==============================================================================
class Window_Empty < Window_Base
def initialize
super(475, 5, 160, 48)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = 20
self.opacity = 175; refresh
end
#-----------------------------------------------------------------------------
def refresh
self.contents.clear
s1 = ["R. Hand Slot", "L. Hand Slot", "Helmet Slot", "Armor Slot", "Relic Slot"]
s2 = [0, 30, 80, 30, 80, 30, 80, 30, 80, 30, 80]
for i in 0..4
if $game_system.equip_name == i
self.contents.draw_text(s2[2*i + 1], -11, s2[2*i+2], 32, s1[i])
end
end
end
end
#==============================================================================
class Window_Command < Window_Selectable
def initialize(width, commands)
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
class Window_Help < Window_Base
def initialize
if $game_system.help_switch == 0
super(170, 5, 300, 65)
elsif $game_system.help_switch == 1
super(0, 0, 640, 64)
elsif $game_system.help_switch == 2
if $game_system.version_104 == 0
super(645, 411, 630, 64)
else
super(5, 411, 630, 64)
end
end
self.contents = Bitmap.new(width - 32, height - 32)
end
def set_text(text, align = 0)
if text != @text or align != @align
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
end
#==============================================================================
class Window_Item < Window_Selectable
def initialize
super(170, 74, 300, 276)
@column_max = 1
refresh
self.index = 0
self.opacity = 175
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype # "Items" window font
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 1 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(19, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(43, y, 212, 32, item.name, 0) #x+28 #212
self.contents.draw_text(225, y, 16, 32, ":", 1)
self.contents.draw_text(235, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
class Window_Skill < Window_Selectable
def initialize(actor)
super(170, 74, 300, 276)
@actor = actor
@column_max = 1
refresh
self.index = 0
self.opacity = 175
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4 + index % 2 * (288 + 32)
y = index / 1 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(4, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(28, y, 204, 32, skill.name, 0)
self.contents.draw_text(200, y, 48, 32, skill.sp_cost.to_s, 2)
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
class Window_EquipLeft < Window_Base
def initialize(actor)
super(125, -9, 300 + 100, 192 + 150)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Equip" left side (Status) window font
self.contents.font.size = 18
@actor = actor
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
s1 = [@new_atk, @new_pdef, @new_mdef, @new_str, @new_dex, @new_agi, @new_int]
s2 = [@actor.atk, @actor.pdef, @actor.mdef, @actor.str, @actor.dex, @actor.agi, @actor.int]
for i in 0..6
if s1[i] != nil
@a = (s1[i] - s2[i]).to_s
@y = 64 + 17 * i
text_check; plus_minus
self.contents.draw_text(210, @y, 36, 32, s1[i].to_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(208, @y, 40, 32, ">")
end
end
end
#--------------------------------------------------------------------------
def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
@new_atk = new_atk
@new_pdef = new_pdef
@new_mdef = new_mdef
@new_str = new_str
@new_dex = new_dex
@new_agi = new_agi
@new_int = new_int
refresh
end
end
#--------------------------------------------------------------------------
def text_check
if @a == 0.to_s
self.contents.font.color = normal_color
elsif @a >= 0.to_s
self.contents.font.color = text_color(3)
elsif @a <= 0.to_s
self.contents.font.color = text_color(2)
end
return
end
#--------------------------------------------------------------------------
def plus_minus
if @a >= 0.to_s
self.contents.draw_text(260, @y.to_i, 92, 32, "(+"+@a+")")
else
self.contents.draw_text(260, @y.to_i, 92, 32, "("+@a+")")
end
end
end
#==============================================================================
class Window_EquipRight < Window_Selectable
def initialize(actor)
super(272, 64, 293, 192)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Equip" right side (Equiped Items) window font
self.contents.font.size = $defaultfontsize
@actor = actor
@column_max = 2
refresh
self.index = 0
end
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 13
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
class Window_EquipItem < Window_Selectable
def initialize(actor, equip_type)
super(475, 53, 160, 176)
@actor = actor
@equip_type = equip_type
@column_max = 1
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
if @equip_type == 0
weapon_set = $data_classes[@actor.class_id].weapon_set
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
@data.push($data_weapons[i])
end
end
end
if @equip_type != 0
armor_set = $data_classes[@actor.class_id].armor_set
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0 and armor_set.include?(i)
if $data_armors[i].kind == @equip_type-1
@data.push($data_armors[i])
end
end
end
end
@data.push(nil)
@item_max = @data.size
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $defaultfonttype
self.contents.font.size = $defaultfontsize
for i in 0...@item_max-1
draw_item(i)
end
i = @data.size-1
self.contents.font.size = 12
self.contents.draw_text(4, i*32, 100, 32, "[Remove Equipment]")
end
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 1 * (288 + 32)
y = index / 1 * 32
case item
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
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.font.size = 12
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.font.size = 10
self.contents.draw_text(x + 99, y, 24, 32, "x" + number.to_s, 2)
end
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
class Window_Status < Window_Base
def initialize(actor)
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Status" window font
self.contents.font.size = $defaultfontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_graphic(@actor, 40, 112)
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 148, 0)
draw_actor_level(@actor, 96, 32)
draw_actor_state(@actor, 96, 64)
draw_actor_hp(@actor, 96, 112, 172)
draw_actor_sp(@actor, 96, 144, 172)
for i in 0..6
draw_actor_parameter(@actor, 96, 192 + 32*i, i)
end
self.contents.font.color = system_color
self.contents.draw_text(320, 48, 80, 32, "Exp")
self.contents.draw_text(320, 80, 80, 32, "Next Level")
self.contents.font.color = normal_color
self.contents.draw_text(320 + 80, 48, 84, 32, @actor.exp_s, 2)
self.contents.draw_text(320 + 80, 80, 84, 32, @actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(320, 160, 96, 32, "Equipment")
end
end
#==============================================================================
class Scene_Menu
def initialize(menu_index = 0)
@menu_index = menu_index
$game_system.help_switch = 1
end
#--------------------------------------------------------------------------
def main
@command_window = Window_Command.new(160,["Item Inventory", "Abilities", "Equipment", "Save Progress", "End Game"])
@command_window.index = @menu_index
@command_window.opacity = 175; @command_window.x = 5; @command_window.y = 5
@battler = Window_Battler.new
@gold_window = Window_Gold.new
@location_window = Window_Location.new
@playtime_window = Window_PlayTime2.new
@status_window = Window_MenuStatus2.new
@status2_window = Window_Status2.new(@actor)
@sprite = Spriteset_Map.new