Hellooooo folks!
The script is huge...
I've been searching around the net for this script, though, now when I find it, it seems like it's not working as it should... I've been getting at lot of errors when opening the menu in-game and the problems is about the arguements around 2000-2500... One error is this (wrong numbers of arguments (0 for 4)) :
and it's the same about this (wrong number of arguments 2 for 4)):
... Now, I don't know what more problems will come (I do know it's several), so I sincerly ask someone here to help me get this working since the creator of this script has given up on the RPGMaker series...
Good to mention is that I'm not really that much into scripting this type of code (PHP and MySQL is the only stuff I know...) so I'm pretty much a newbe at this... Still, I really wanna get this working so I'll try my best to team up with someone ready to give this problem a shot to resovle...
Please, help!!
/Mzale
The script is huge...
Code:
#=========================================================
# This is the ffx-2 Custom Menu System by Catchm.
# It is a long script and includes many alterations and images attached to it.
# These images can be edited, and the script can be edited, you are free to do so
# credit to Catchm is the only thing needed.
# this is to be copied into a new script in the script editor
#
# Have fun with the script!
#=========================================================
class Bitmap
def draw_text_shadow_rect(rect, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(Rect.new(rect.x+1, rect.y+1, rect.width,
rect.height), text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(Rect.new(rect.x+1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x-1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y-1, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y+1, rect.width,
rect.height), text, align)
# Normal text
self.font.color = old_col
draw_text(rect, text, align)
self.font.size += 2
end
def draw_text_shadow(x, y, wid, hei, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(x+1,y+1,wid,hei,text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(x+1,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x,y-1,wid,hei,text, align)
draw_text(x,y+1,wid,hei,text, align)
draw_text(x,y+2,wid,hei,text, align)
# Normal
self.font.color = old_col
draw_text(x,y,wid,hei,text, align)
self.font.size += 2
end
def draw_text_outline(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline2(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 200)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline3(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(192, 224, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline4(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 190)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
end
class Window_Base < Window
#=====================================
# Gradient Bars , thanks to Acedent Prone
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
#=====================================
# New definitions
def draw_battlegraphic(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_statuswindow(actor, x, y)
bitmap = RPG::Cache.picture(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
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_name2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y + 1, 120, 32, actor.name)
self.contents.draw_text(x - 1, y + 1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#=====================================
def draw_actor_level2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 32, 32, "Lv")
self.contents.draw_text(x - 1, y + 1, 32, 32, "Lv")
self.contents.draw_text(x + 1, y - 1, 32, 32, "Lv")
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = outline_color
self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 31, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#=====================================
def draw_actor_class2(actor, x, y)
self.contents.font.name = "Black Chancery"
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 236, 32, actor.class_name)
self.contents.draw_text(x + 1, y - 1, 236, 32, actor.class_name)
self.contents.draw_text(x - 1, y + 1, 236, 32, actor.class_name)
self.contents.draw_text(x - 1, y - 1, 236, 32, actor.class_name)
self.contents.font.color = Color.new(238, 139, 254, 255)
self.contents.draw_text(x, y, 236, 32, actor.class_name)
end
#======================================
def draw_actor_hp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 譁・-怜・ "HP" 繧呈緒逕サ
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.font.color = Color.new(254, 238, 189, 255)
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP 繧呈緒逕サ縺吶k繧ケ繝壹・繧ケ縺後≠繧九°險育ョ・
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP 繧呈緒逕サ
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(hp_x - 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x - 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y - 1, 48, 32, actor.hp.to_s, 2)
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)
# MaxHP 繧呈緒逕サ
if flag
self.contents.font.color = outline_color
self.contents.draw_text(hp_x + 60 - 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 - 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 - 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y - 1, 12, 32, "/", 1)
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_sp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 譁・-怜・ "SP" 繧呈緒逕サ
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.font.color = Color.new(74, 230, 51, 225)
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxSP 繧呈緒逕サ縺吶k繧ケ繝壹・繧ケ縺後≠繧九°險育ョ・
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# SP 繧呈緒逕サ
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(sp_x - 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x - 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y + 1, 48, 32, actor.sp.to_s, 2)
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)
# MaxSP 繧呈緒逕サ
if flag
self.contents.font.color = outline_color
self.contents.draw_text(sp_x + 60 - 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 - 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
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_state2(actor, x, y, width = 120)
self.contents.font.name = $fontface
text = make_battler_state_text(actor, width, true)
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, width, 32, text)
self.contents.draw_text(x - 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y - 1, width, 32, text)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#=====================================
def draw_actor_parameter2(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 = "Magic Def"
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_outline(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text_outline(x + 130, y, 36, 32, parameter_value.to_s, 2)
end
#=========================================
def draw_item_name2(item, x, y)
if item == nil
self.contents.draw_text_outline(x + 28, y, 212, 32, "EMPTY")
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name)
end
# New colour for outlining text - Black
def outline_color
return Color.new(0, 0, 0, 255)
end
end
#==============================================================================
# 笆 Window_Selectable
#------------------------------------------------------------------------------
# 縲繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔d繧ケ繧ッ繝-繝シ繝ォ縺ョ讖溯・繧呈戟縺、繧ヲ繧」繝ウ繝峨え繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Window_Itemselectable < Window_Base
#--------------------------------------------------------------------------
# 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
#--------------------------------------------------------------------------
attr_reader :index # 繧ォ繝シ繧ス繝ォ菴咲スョ
attr_reader :help_window # 繝倥Ν繝励え繧」繝ウ繝峨え
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# x : 繧ヲ繧」繝ウ繝峨え縺ョ X 蠎ァ讓・
# y : 繧ヲ繧」繝ウ繝峨え縺ョ Y 蠎ァ讓・
# width : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
# height : 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ菴咲スョ縺ョ險-螳・
# index : 譁ー縺励>繧ォ繝シ繧ス繝ォ菴咲スョ
#--------------------------------------------------------------------------
def index=(index)
@index = index
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
update_cursor_rect
end
#--------------------------------------------------------------------------
# 笳・陦梧焚縺ョ蜿門セ・
#--------------------------------------------------------------------------
def row_max
# ・・岼謨ー縺ィ蛻玲焚縺九i陦梧焚繧堤ョ怜・
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# 笳・蜈磯 -縺ョ陦後・蜿門セ・
#--------------------------------------------------------------------------
def top_row
# 繧ヲ繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶r縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
return self.oy / 32
end
#--------------------------------------------------------------------------
# 笳・蜈磯 -縺ョ陦後・險-螳・
# row : 蜈磯 -縺ォ陦ィ遉コ縺吶k陦・
#--------------------------------------------------------------------------
def top_row=(row)
# row 縺・0 譛ェ貅縺ョ・エ蜷医・ 0 縺ォ菫ョ・」
if row < 0
row = 0
end
# row 縺・row_max - 1 雜・・・エ蜷医・ row_max - 1 縺ォ菫ョ・」
if row > row_max - 1
row = row_max - 1
end
# row 縺ォ 1 陦後・鬮倥& 32 繧呈寺縺代√え繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶→縺吶k
self.oy = row * 32
end
#--------------------------------------------------------------------------
# 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k陦梧焚縺ョ蜿門セ・
#--------------------------------------------------------------------------
def page_row_max
# 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&縺九i縲√ヵ繝ャ繝シ繝 縺ョ鬮倥& 32 繧貞シ輔″縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k・・岼謨ー縺ョ蜿門セ・
#--------------------------------------------------------------------------
def page_item_max
# 陦梧焚 page_row_max 縺ォ 蛻玲焚 @column_max 繧呈寺縺代k
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# 笳・繝倥Ν繝励え繧」繝ウ繝峨え縺ョ險-螳・
# help_window : 譁ー縺励>繝倥Ν繝励え繧」繝ウ繝峨え
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
#--------------------------------------------------------------------------
def update_cursor_rect
# 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅縺ョ・エ蜷・
if @index < 0
self.cursor_rect.empty
return
end
# 迴セ蝨ィ縺ョ陦後r蜿門セ・
row = @index / @column_max
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
if row < self.top_row
# 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row
end
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
if row > self.top_row + (self.page_row_max - 1)
# 迴セ蝨ィ縺ョ陦後′譛蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row - (self.page_row_max - 1)
end
# 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
cursor_width = self.width / @column_max - 32
# 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
x = @index % @column_max * (cursor_width + 6) + 10
y = @index / @column_max * 32 - self.oy
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
self.cursor_rect.set(x, y, cursor_width, 32)
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
super
# 繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔′蜿ッ閭ス縺ェ迥カ諷九・・エ蜷・
if self.active and @item_max > 0 and @index >= 0
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::DOWN)
# 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 蛻玲焚)繧医j蜑阪・・エ蜷・
if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
@index < @item_max - @column_max
# 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::UP)
# 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺悟・謨ー繧医j蠕後m縺ョ・エ蜷・
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ蜿ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::RIGHT)
# 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 1)繧医j蜑阪・・エ蜷・
if @column_max >= 2 and @index < @item_max - 1
# 繧ォ繝シ繧ス繝ォ繧貞承縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ蟾ヲ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::LEFT)
# 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
if @column_max >= 2 and @index > 0
# 繧ォ繝シ繧ス繝ォ繧貞キヲ縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::R)
# 陦ィ遉コ縺輔l縺ヲ縺・k譛蠕悟ーセ縺ョ陦後′縲√ョ繝シ繧ソ荳翫・譛蠕後・陦後h繧翫b蜑阪・・エ蜷・
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蠕後m縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::L)
# 陦ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後′ 0 繧医j蠕後m縺ョ・エ蜷・
if self.top_row > 0
# 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蜑阪↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
update_cursor_rect
end
end
#==============================================================================
# 笆 Window_Menuselectable
#------------------------------------------------------------------------------
# 縲繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔d繧ケ繧ッ繝-繝シ繝ォ縺ョ讖溯・繧呈戟縺、繧ヲ繧」繝ウ繝峨え繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Window_Menuselectable < Window_Base
#--------------------------------------------------------------------------
# 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
#--------------------------------------------------------------------------
attr_reader :index # 繧ォ繝シ繧ス繝ォ菴咲スョ
attr_reader :help_window # 繝倥Ν繝励え繧」繝ウ繝峨え
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# x : 繧ヲ繧」繝ウ繝峨え縺ョ X 蠎ァ讓・
# y : 繧ヲ繧」繝ウ繝峨え縺ョ Y 蠎ァ讓・
# width : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
# height : 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ菴咲スョ縺ョ險-螳・
# index : 譁ー縺励>繧ォ繝シ繧ス繝ォ菴咲スョ
#--------------------------------------------------------------------------
def index=(index)
@index = index
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
update_cursor_rect
end
#--------------------------------------------------------------------------
# 笳・陦梧焚縺ョ蜿門セ・
#--------------------------------------------------------------------------
def row_max
# ・・岼謨ー縺ィ蛻玲焚縺九i陦梧焚繧堤ョ怜・
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# 笳・蜈磯 -縺ョ陦後・蜿門セ・
#--------------------------------------------------------------------------
def top_row
# 繧ヲ繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶r縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
return self.oy / 32
end
#--------------------------------------------------------------------------
# 笳・蜈磯 -縺ョ陦後・險-螳・
# row : 蜈磯 -縺ォ陦ィ遉コ縺吶k陦・
#--------------------------------------------------------------------------
def top_row=(row)
# row 縺・0 譛ェ貅縺ョ・エ蜷医・ 0 縺ォ菫ョ・」
if row < 0
row = 0
end
# row 縺・row_max - 1 雜・・・エ蜷医・ row_max - 1 縺ォ菫ョ・」
if row > row_max - 1
row = row_max - 1
end
# row 縺ォ 1 陦後・鬮倥& 32 繧呈寺縺代√え繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶→縺吶k
self.oy = row * 32
end
#--------------------------------------------------------------------------
# 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k陦梧焚縺ョ蜿門セ・
#--------------------------------------------------------------------------
def page_row_max
# 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&縺九i縲√ヵ繝ャ繝シ繝 縺ョ鬮倥& 32 繧貞シ輔″縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k・・岼謨ー縺ョ蜿門セ・
#--------------------------------------------------------------------------
def page_item_max
# 陦梧焚 page_row_max 縺ォ 蛻玲焚 @column_max 繧呈寺縺代k
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# 笳・繝倥Ν繝励え繧」繝ウ繝峨え縺ョ險-螳・
# help_window : 譁ー縺励>繝倥Ν繝励え繧」繝ウ繝峨え
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
#--------------------------------------------------------------------------
def update_cursor_rect
# 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅縺ョ・エ蜷・
if @index < 0
self.cursor_rect.empty
return
end
# 迴セ蝨ィ縺ョ陦後r蜿門セ・
row = @index / @column_max
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
if row < self.top_row
# 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row
end
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
if row > self.top_row + (self.page_row_max - 1)
# 迴セ蝨ィ縺ョ陦後′譛蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row - (self.page_row_max - 1)
end
# 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
cursor_width = self.width / @column_max - 32
# 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 40 - self.oy
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
super
# 繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔′蜿ッ閭ス縺ェ迥カ諷九・・エ蜷・
if self.active and @item_max > 0 and @index >= 0
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::DOWN)
# 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 蛻玲焚)繧医j蜑阪・・エ蜷・
if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
@index < @item_max - @column_max
# 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::UP)
# 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺悟・謨ー繧医j蠕後m縺ョ・エ蜷・
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ蜿ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::RIGHT)
# 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 1)繧医j蜑阪・・エ蜷・
if @column_max >= 2 and @index < @item_max - 1
# 繧ォ繝シ繧ス繝ォ繧貞承縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ蟾ヲ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::LEFT)
# 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
if @column_max >= 2 and @index > 0
# 繧ォ繝シ繧ス繝ォ繧貞キヲ縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::R)
# 陦ィ遉コ縺輔l縺ヲ縺・k譛蠕悟ーセ縺ョ陦後′縲√ョ繝シ繧ソ荳翫・譛蠕後・陦後h繧翫b蜑阪・・エ蜷・
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蠕後m縺ォ遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.repeat?(Input::L)
# 陦ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後′ 0 繧医j蠕後m縺ョ・エ蜷・
if self.top_row > 0
# 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蜑阪↓遘サ蜍・
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
if self.active and @help_window != nil
update_help
end
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
update_cursor_rect
end
end
#==============================================================================
# 笆 Window_Menucommand
#------------------------------------------------------------------------------
# 縲荳闊ャ逧・↑繧ウ繝槭Φ繝蛾∈謚槭r陦後≧繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Menucommand < Window_Menuselectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# width : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
# commands : 繧ウ繝槭Φ繝画枚・怜・縺ョ驟榊・
#--------------------------------------------------------------------------
def refresh(width, commands)
# 繧ウ繝槭Φ繝峨・蛟区焚縺九i繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&繧堤ョ怜・
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 = $fontface
self.contents.font.size = $fontsize
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# 笳・・・岼縺ョ謠冗判
# index : ・・岼逡ェ蜿キ
# color : 譁・-苓牡
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# 笳・・・岼縺ョ辟。蜉ケ蛹・
# index : ・・岼逡ェ蜿キ
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
# 笆 Window_Help
#------------------------------------------------------------------------------
# 縲繧ケ繧-繝ォ繧・い繧、繝・・縺ョ隱ャ譏弱√い繧ッ繧ソ繝シ縺ョ繧ケ繝・・繧ソ繧ケ縺ェ縺ゥ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Menuhelp < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, - 77, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 18
self.opacity = 0
end
#--------------------------------------------------------------------------
# 笳・繝・・繧ケ繝郁ィ-螳・
# text : 繧ヲ繧」繝ウ繝峨え縺ォ陦ィ遉コ縺吶k譁・-怜・
# align : 繧「繝ゥ繧、繝ウ繝。繝ウ繝・(0..蟾ヲ謠・∴縲・..荳-螟ョ謠・∴縲・..蜿ウ謠・∴)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# 繝・・繧ケ繝医→繧「繝ゥ繧、繝ウ繝。繝ウ繝医・蟆代↑縺上→繧ゆク譁ケ縺悟燕蝗槭→驕輔▲縺ヲ縺・k・エ蜷・
if text != @text or align != @align
# 繝・・繧ケ繝医r蜀肴緒逕サ
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
#--------------------------------------------------------------------------
# 笳・繧「繧ッ繧ソ繝シ險-螳・
# actor : 繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# 笳・繧ィ繝阪Α繝シ險-螳・
# enemy : 蜷榊燕縺ィ繧ケ繝・・繝医r陦ィ遉コ縺吶k繧ィ繝阪Α繝シ
#--------------------------------------------------------------------------
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
#==============================================================================
# 笆 Window_Gold
#------------------------------------------------------------------------------
# 縲繧エ繝シ繝ォ繝峨r陦ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size("Gold").width
self.contents.font.color = outline_color
self.contents.draw_text(81, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(81, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(80, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = outline_color
self.contents.draw_text(- 1, - 1, cx, 32, "Gold", 2)
self.contents.draw_text(1, 1, cx, 32, "Gold", 2)
self.contents.draw_text(- 1, 1, cx, 32, "Gold", 2)
self.contents.draw_text(1, - 1, cx, 32, "Gold", 2)
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, cx, 32, "Gold", 2)
end
end
#==============================================================================
# 笆 Window_PlayTime
#------------------------------------------------------------------------------
# 縲繝。繝九Η繝シ逕サ髱「縺ァ繝励Ξ繧、譎る俣繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = outline_color
self.contents.draw_text(1, - 1, 120, 32, "Play Time")
self.contents.draw_text(1, 1, 120, 32, "Play Time")
self.contents.draw_text(-1, - 1, 120, 32, "Play Time")
self.contents.draw_text(-1, 1, 120, 32, "Play Time")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 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 = outline_color
self.contents.draw_text(39, - 1, 120, 32, text, 2)
self.contents.draw_text(39, 1, 120, 32, text, 2)
self.contents.draw_text(41, 1, 120, 32, text, 2)
self.contents.draw_text(41, -1, 120, 32, text, 2)
self.contents.font.color = normal_color
self.contents.draw_text(40, 0, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# 笆 Window_MenuStatus
#------------------------------------------------------------------------------
# 縲繝。繝九Η繝シ逕サ髱「縺ァ繝代・繝・ぅ繝。繝ウ繝舌・縺ョ繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 430)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 100 - i * 18
y = i * 100
actor = $game_party.actors[i]
draw_actor_face(actor, x - 40, y + 80)
draw_actor_name2(actor, x + 50, y)
draw_actor_class2(actor, x + 50, y + 50)
draw_actor_level2(actor, x + 50, y + 25)
draw_actor_state2(actor, x + 155, y + 50)
draw_actor_hp2(actor, x + 140, y )
draw_actor_sp2(actor, x + 140, y + 25)
draw_actor_barz(actor, x + 140, y + 25, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 140, y + 50, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.empty
end
end
#==============================================================================
# 笆 Window_Item
#------------------------------------------------------------------------------
# 縲繧「繧、繝・・逕サ髱「縲√ヰ繝医Ν逕サ髱「縺ァ縲∵園謖√い繧、繝・・縺ョ荳隕ァ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Menuitem < Window_Itemselectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, 500, 640, 380)
@column_max = 2
refresh
self.index = 0
self.opacity = 0
# 謌ヲ髣倅ク-縺ョ・エ蜷医・繧ヲ繧」繝ウ繝峨え繧堤判髱「荳-螟ョ縺ク遘サ蜍輔@縲∝濠騾乗・縺ォ縺吶k
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
# ・・岼謨ー縺・0 縺ァ縺ェ縺代l縺ー繝薙ャ繝医・繝・・繧剃ス懈・縺励∝・・・岼繧呈緒逕サ
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# 笳・・・岼縺ョ謠冗判
# index : ・・岼逡ェ蜿キ
#--------------------------------------------------------------------------
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 = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 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(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline(x + 256, y, 24, 32, number.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline2(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline2(x + 256, y, 24, 32, number.to_s, 2)
end
end
#--------------------------------------------------------------------------
# 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# 笆 Window_Menuskill
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_Menuskill < Window_Itemselectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(- 3, 531, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 謌ヲ髣倅ク-縺ョ・エ蜷医・繧ヲ繧」繝ウ繝峨え繧堤判髱「荳-螟ョ縺ク遘サ蜍輔@縲∝濠騾乗・縺ォ縺吶k
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 [email=0...@actor.skills.size]0...@actor.skills.size[/email]
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
# ・・岼謨ー縺・0 縺ァ縺ェ縺代l縺ー繝薙ャ繝医・繝・・繧剃ス懈・縺励∝・・・岼繧呈緒逕サ
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# 笳・・・岼縺ョ謠冗判
# index : ・・岼逡ェ蜿キ
#--------------------------------------------------------------------------
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 = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 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(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if @actor.skill_can_use?(skill.id)
self.contents.draw_text_outline(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline2(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end
end
#--------------------------------------------------------------------------
# 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# 笆 Window_SkillStatus
#------------------------------------------------------------------------------
# 縲繧ケ繧-繝ォ逕サ髱「縺ァ縲√せ繧-繝ォ菴ソ逕ィ閠・・繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_SkillStatus < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(630, 35, 410, 109)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
x = 100
y = 0
draw_actor_face(@actor, x - 40, y + 80)
draw_actor_name2(@actor, x + 50, y)
draw_actor_class2(@actor, x + 50, y + 50)
draw_actor_level2(@actor, x + 50, y + 25)
draw_actor_state2(@actor, x + 155, y + 50)
draw_actor_hp2(@actor, x + 140, y )
draw_actor_sp2(@actor, x + 140, y + 25)
draw_actor_barz(@actor, x + 140, y + 25, "horizontal", 130, 1, @actor.hp, @actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(@actor, x + 140, y + 50, "horizontal", 130, 1, @actor.sp, @actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#==============================================================================
# 笆 Window_Target
#------------------------------------------------------------------------------
# 縲繧「繧、繝・・逕サ髱「縺ィ繧ケ繧-繝ォ逕サ髱「縺ァ縲∽スソ逕ィ蟇セ雎。縺ョ繧「繧ッ繧ソ繝シ繧帝∈謚槭☆繧九え繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Target < Window_Selectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def initialize
super(0, 0, 336, 480)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.z += 10
@item_max = $game_party.actors.size
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...$game_party.actors.size
x = 4
y = i * 116
actor = $game_party.actors[i]
draw_actor_name2(actor, x, y)
draw_actor_class2(actor, x + 144, y)
draw_actor_level2(actor, x + 8, y + 32)
draw_actor_state2(actor, x + 8, y + 64)
draw_actor_hp2(actor, x + 152, y + 32)
draw_actor_sp2(actor, x + 152, y + 64)
draw_actor_barz(actor, x + 152, y + 57, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 152, y + 89, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
#--------------------------------------------------------------------------
def update_cursor_rect
# 繧ォ繝シ繧ス繝ォ菴咲スョ -1 縺ッ蜈ィ驕ク謚槭・2 莉・荳九・蜊倡峡驕ク謚・(菴ソ逕ィ閠・・霄ォ)
if @index <= -2
self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
elsif @index == -1
self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#==============================================================================
# 笆 Window_EquipRight
#------------------------------------------------------------------------------
# 縲陬・y逕サ髱「縺ァ縲√い繧ッ繧ソ繝シ縺檎樟蝨ィ陬・y縺励※縺・k繧「繧、繝・・繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_EquipRight < Window_Menuselectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(- 100, 125, 200, 350)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@actor = actor
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# 笳・繧「繧、繝・・縺ョ蜿門セ・
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@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
draw_item_name2(@data[0], 0, 68 * 0)
draw_item_name2(@data[1], 0, 68 * 1)
draw_item_name2(@data[2], 0, 68 * 2)
draw_item_name2(@data[3], 0, 68 * 3)
draw_item_name2(@data[4], 0, 68 * 4 - 2)
end
#--------------------------------------------------------------------------
# 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# 笆 Window_EquipItem
#------------------------------------------------------------------------------
# 縲陬・y逕サ髱「縺ァ縲∬」・y螟画峩縺ョ蛟呵」懊→縺ェ繧九い繧、繝・・縺ョ荳隕ァ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_EquipItem < Window_Selectable
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
# equip_type : 陬・y驛ィ菴・(0・・)
#--------------------------------------------------------------------------
def initialize(actor, equip_type)
super(233, 573, 413, 224)
@actor = actor
@equip_type = equip_type
@column_max = 2
refresh
self.active = false
self.index = -1
self.opacity = 0
end
#--------------------------------------------------------------------------
# 笳・繧「繧、繝・・縺ョ蜿門セ・
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# 陬・y蜿ッ閭ス縺ェ・ヲ蝎ィ繧定ソス蜉
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
# 陬・y蜿ッ閭ス縺ェ髦イ蜈キ繧定ソス蜉
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 = $fontface
self.contents.font.size = 22
for i in 0...@item_max-1
draw_item(i)
end
end
#--------------------------------------------------------------------------
# 笳・・・岼縺ョ謠冗判
# index : ・・岼逡ェ蜿キ
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
x = 4 + index % 2 * (176 + 16)
y = index / 2 * 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.draw_text_shadow(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_shadow(x + 140, y, 16, 32, ":", 1)
self.contents.draw_text_shadow(x + 156, y, 24, 32, number.to_s, 2)
end
#--------------------------------------------------------------------------
def update_cursor_rect
# 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅縺ョ・エ蜷・
if @index < 0
self.cursor_rect.empty
return
end
# 迴セ蝨ィ縺ョ陦後r蜿門セ・
row = @index / @column_max
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
if row < self.top_row
# 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row
end
# 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
if row > self.top_row + (self.page_row_max - 1)
# 迴セ蝨ィ縺ョ陦後′譛蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
self.top_row = row - (self.page_row_max - 1)
end
# 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
cursor_width = self.width / @column_max - 32
# 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
x = @index % @column_max * (cursor_width + 16)
y = @index / @column_max * 32 - self.oy
# 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
self.cursor_rect.set(x + 2, y, cursor_width + 15, 32)
end
# 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# 笆 Window_Status
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Status < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 133)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_face(@actor, 0, 90)
draw_actor_name2(@actor, 90, 0)
draw_actor_class2(@actor, 250, 0)
draw_actor_level2(@actor, 90, 32)
draw_actor_state2(@actor, 90, 64)
draw_actor_hp2(@actor, 210, 32, 172)
draw_actor_sp2(@actor, 210, 64, 172)
draw_actor_barz(@actor, 210, 57, "horizontal", 158, 1, @actor.hp, @actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(@actor, 210, 89, "horizontal", 158, 1, @actor.sp, @actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#==============================================================================
# 笆 Window_Status2
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Status2 < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 178)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24
draw_actor_parameter2(@actor, 0, 10, 0)
draw_actor_parameter2(@actor, 0, 40, 1)
draw_actor_parameter2(@actor, 0, 70, 2)
draw_actor_parameter2(@actor, 0, 100, 3)
draw_actor_parameter2(@actor, 190, 20, 4)
draw_actor_parameter2(@actor, 190, 50, 5)
draw_actor_parameter2(@actor, 190, 80, 6)
draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @actor.atk, 500, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @actor.pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @actor.mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @actor.str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @actor.dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @actor.agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @actor.int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
if @new_atk != nil
draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @new_atk, 500, Color.new(255, 0, 0, 255), Color.new(255, 0, 0, 255))
end
if @new_pdef != nil
draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @new_pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
end
if @new_mdef != nil
draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @new_mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
end
if @new_str != nil
draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @new_str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
end
if @new_dex != nil
draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @new_dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
end
if @new_agi != nil
draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @new_agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
end
if @new_int != nil
draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @new_int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
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
end
#==============================================================================
# 笆 Window_Status3
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Status3 < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 418, 229)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24
self.contents.font.color = system_color
self.contents.draw_text_outline3(150, 0, 96, 32, "Equipment")
draw_item_name2($data_weapons[@actor.weapon_id], 15 + 16, 48)
draw_item_name2($data_armors[@actor.armor1_id], 15 + 16, 86)
draw_item_name2($data_armors[@actor.armor2_id], 15 + 16, 124)
draw_item_name2($data_armors[@actor.armor3_id], 15 + 186, 68)
draw_item_name2($data_armors[@actor.armor4_id], 15 + 186, 106)
end
end
#==============================================================================
# 笆 Window_Status4
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Status4 < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 252, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 26
self.contents.font.color = system_color
self.contents.draw_text_outline3(10, 0, 80, 32, "EXP")
self.contents.draw_text_outline3(10, 32, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text_outline(10 + 80, 0, 84, 32, @actor.exp_s, 2)
self.contents.draw_text_outline(10 + 80, 32, 84, 32, @actor.next_rest_exp_s, 2)
end
end
#==============================================================================
# 笆 Window_Status5
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Status5 < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor : 繧「繧ッ繧ソ繝シ
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 300, 380)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_battlegraphic(@actor, 100, 300)
end
end
#==============================================================================
# 笆 Window_SaveFile
#------------------------------------------------------------------------------
# 縲繧サ繝シ繝也判髱「縺翫h縺ウ繝-繝シ繝臥判髱「縺ァ陦ィ遉コ縺吶k縲√そ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_SaveFile < Window_Base
#--------------------------------------------------------------------------
# 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
#--------------------------------------------------------------------------
attr_reader :filename # 繝輔ぃ繧、繝ォ蜷・
attr_reader :selected # 驕ク謚樒憾諷・
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# file_index : 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧、繝ウ繝・ャ繧ッ繧ケ (0・・)
# filename : 繝輔ぃ繧、繝ォ蜷・
#--------------------------------------------------------------------------
def initialize(file_index, filename)
super(0, 64 + file_index % 4 * 104, 640, 104)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
@file_index = file_index
@filename = "Save#{@file_index + 1}.rxdata"
@time_stamp = Time.at(0)
@file_exist = FileTest.exist?(@filename)
if @file_exist
file = File.open(@filename, "r")
@time_stamp = file.mtime
@characters = Marshal.load(file)
@frame_count = Marshal.load(file)
@game_system = Marshal.load(file)
@game_switches = Marshal.load(file)
@game_variables = Marshal.load(file)
@total_sec = @frame_count / Graphics.frame_rate
file.close
end
refresh
@selected = false
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# 繝輔ぃ繧、繝ォ逡ェ蜿キ繧呈緒逕サ
self.contents.font.color = normal_color
name = "File #{@file_index + 1}"
self.contents.draw_text_outline(4, 0, 600, 32, name)
@name_width = contents.text_size(name).width
# 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺悟-伜惠縺吶k・エ蜷・
if @file_exist
# 繧-繝」繝ゥ繧ッ繧ソ繝シ繧呈緒逕サ
for i in [email=0...@characters.size]0...@characters.size[/email]
bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
cw = bitmap.rect.width / 4
ch = bitmap.rect.height / 4
src_rect = Rect.new(0, 0, cw, ch)
x = 300 - @characters.size * 32 + i * 64 - cw / 2
self.contents.blt(x, 68 - ch, bitmap, src_rect)
end
# 繝励Ξ繧、譎る俣繧呈緒逕サ
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text_outline(4, 8, 600, 32, time_string, 2)
# 繧ソ繧、繝 繧ケ繧ソ繝ウ繝励r謠冗判
self.contents.font.color = normal_color
time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
self.contents.draw_text_outline(4, 40, 600, 32, time_string, 2)
end
end
#--------------------------------------------------------------------------
# 笳・驕ク謚樒憾諷九・險-螳・
# selected : 譁ー縺励>驕ク謚樒憾諷・(true=驕ク謚・false=髱樣∈謚・
#--------------------------------------------------------------------------
def selected=(selected)
@selected = selected
update_cursor_rect
end
#--------------------------------------------------------------------------
# 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
#--------------------------------------------------------------------------
def update_cursor_rect
if @selected
self.cursor_rect.set(0, 0, @name_width + 8, 32)
else
self.cursor_rect.empty
end
end
end
#==============================================================================
# 笆 Window_Location
#------------------------------------------------------------------------------
# 縲繝。繝九Η繝シ逕サ髱「縺ァ・ゥ謨ー繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
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
#==============================================================================
# 笆 Window_Mapname
#------------------------------------------------------------------------------
# 縲繝。繝九Η繝シ逕サ髱「縺ァ繝励Ξ繧、譎る俣繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶・
#==============================================================================
class Window_Mapname < Window_Base
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
#--------------------------------------------------------------------------
def refresh #initialize
super(0, 0, 240, 96)
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.opacity = 0
# refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# Map Name
#map = $game_map.name
self.contents.font.color = system_color
self.contents.font.size = 14
self.contents.draw_text(4, 0, 220, 32, "Location")
self.contents.font.size = $fontsize
self.contents.font.color = normal_color
self.contents.draw_text(110, 15, 80, 32, $game_map.name)
end
end
#==================================================
class Window_End < Window_Base
def initialize
super(0, 0, 240, 150)
self.contents = Bitmap.new(width - 52, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 30
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text_outline(24, 0, 240, 32, "To Title")
self.contents.draw_text_outline(10, 45, 240, 32, "Shutdown")
self.contents.draw_text_outline(25, 85, 240, 32, "Cancel")
end
#==========================================
end
#==============================================================================
# 笆 Scene_Menu
#------------------------------------------------------------------------------
# 縲繝。繝九Η繝シ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# menu_index : 繧ウ繝槭Φ繝峨・繧ォ繝シ繧ス繝ォ蛻晄悄菴咲スョ
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
#========================================
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#========================================
# This is setting up the command pictures for 'item' etc..
@command1 = Sprite.new
@command1.bitmap = RPG::Cache.picture("cmscommand1")
@command1.x = 15
@command1.y = 40
@command1.z = 100
#========================================
@command2 = Sprite.new
@command2.bitmap = RPG::Cache.picture("cmscommand2")
@command2.x = 15
@command2.y = 40
@command2.z = 100
#========================================
@command3 = Sprite.new
@command3.bitmap = RPG::Cache.picture("cmscommand3")
@command3.x = 15
@command3.y = 40
@command3.z = 100
#========================================
@command4 = Sprite.new
@command4.bitmap = RPG::Cache.picture("cmscommand4")
@command4.x = 15
@command4.y = 40
@command4.z = 100
#========================================
@command5 = Sprite.new
@command5.bitmap = RPG::Cache.picture("cmscommand5")
@command5.x = 15
@command5.y = 40
@command5.z = 100
#========================================
@command6 = Sprite.new
@command6.bitmap = RPG::Cache.picture("cmscommand6")
@command6.x = 15
@command6.y = 40
@command6.z = 100
#========================================
# This setting up the shadows for the commands.
@commands1 = Sprite.new
@commands1.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands1.x = 20
@commands1.y = 45
@commands1.z = 1
@commands1.opacity = 155
@commands1.visible = false
#========================================
@commands2 = Sprite.new
@commands2.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands2.x = 20
@commands2.y = 45
@commands2.z = 1
@commands2.opacity = 155
@commands2.visible = false
#========================================
@commands3 = Sprite.new
@commands3.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands3.x = 20
@commands3.y = 45
@commands3.z = 1
@commands3.opacity = 155
@commands3.visible = false
#========================================
@commands4 = Sprite.new
@commands4.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands4.x = 20
@commands4.y = 45
@commands4.z = 1
@commands4.opacity = 155
@commands4.visible = false
#========================================
@commands5 = Sprite.new
@commands5.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands5.x = 20
@commands5.y = 45
@commands5.z = 1
@commands5.opacity = 155
@commands5.visible = false
#========================================
@commands6 = Sprite.new
@commands6.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands6.x = 20
@commands6.y = 45
@commands6.z = 1
@commands6.opacity = 155
@commands6.visible = false
#========================================
# This is setting up the arrow cursor used in the command window..
@arrow = Sprite.new
@arrow.bitmap = RPG::Cache.picture("arrow4")
@arrow.x = 0
@arrow.y = 45
@arrow.z = 1000
#========================================
# This is setting up the arrow for the status window
@arrow_status = Sprite.new
@arrow_status.bitmap = RPG::Cache.picture("arrow4")
@arrow_status.x = 260
@arrow_status.y = 37
@arrow_status.z = 1000
@arrow_status.visible = false
#========================================
# This is setting up the status windows, making them not visible for the moment..
@status_window1 = Sprite.new
@status_window1.bitmap = RPG::Cache.picture("status window 1")
@status_window1.x = 693
@status_window1.y = 7
@status_window1.z = 100
@status_window1.visible = false
#========================================
@status_window2 = Sprite.new
@status_window2.bitmap = RPG::Cache.picture("status window 2")
@status_window2.x = 676
@status_window2.y = 106
@status_window2.z = 100
@status_window2.visible = false
#========================================
@status_window3 = Sprite.new
@status_window3.bitmap = RPG::Cache.picture("status window 3")
@status_window3.x = 659
@status_window3.y = 206
@status_window3.z = 100
@status_window3.visible = false
#========================================
@status_window4 = Sprite.new
@status_window4.bitmap = RPG::Cache.picture("status window 4")
@status_window4.x = 640
@status_window4.y = 306
@status_window4.z = 100
@status_window4.visible = false
#========================================
# The shadows are set up for the status windows..
@status_windowshadow1 = Sprite.new
@status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow1.x = 697
@status_windowshadow1.y = 13
@status_windowshadow1.z = 1
@status_windowshadow1.opacity = 155
@status_windowshadow1.visible = false
#========================================
@status_windowshadow2 = Sprite.new
@status_windowshadow2.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow2.x = 681
@status_windowshadow2.y = 112
@status_windowshadow2.z = 1
@status_windowshadow2.opacity = 155
@status_windowshadow2.visible = false
#========================================
@status_windowshadow3 = Sprite.new
@status_windowshadow3.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow3.x = 664
@status_windowshadow3.y = 212
@status_windowshadow3.z = 1
@status_windowshadow3.opacity = 155
@status_windowshadow3.visible = false
#========================================
@status_windowshadow4 = Sprite.new
@status_windowshadow4.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow4.x = 645
@status_windowshadow4.y = 312
@status_windowshadow4.z = 1
@status_windowshadow4.opacity = 155
@status_windowshadow4.visible = false
#========================================
# Here, certain status window pictures are made visible depending on
# how many actors or players there are..
if $game_party.actors.size == 1
@status_window1.visible = true
@status_windowshadow1.visible = true
end
if $game_party.actors.size == 2
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
end
if $game_party.actors.size == 3
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
@status_window3.visible = true
@status_windowshadow3.visible = true
end
if $game_party.actors.size == 4
@status_window1.visible = true
@status_windowshadow1.visible = true
@status_window2.visible = true
@status_windowshadow2.visible = true
@status_window3.visible = true
@status_windowshadow3.visible = true
@status_window4.visible = true
@status_windowshadow4.visible = true
end
#===========================================
# The window displaying the gold, and playtime is set up...
@playtimegoldpicture = Sprite.new
@playtimegoldpicture.bitmap = RPG::Cache.picture("goldplaytimewindow")
@playtimegoldpicture.x = 646
@playtimegoldpicture.y = 404
@playtimegoldpicture.z = 100
#============================================
# And its shadow
@playtimegoldshadow = Sprite.new
@playtimegoldshadow.bitmap = RPG::Cache.picture("goldplaytimeshadow")
@playtimegoldshadow.x = 651
@playtimegoldshadow.y = 409
@playtimegoldshadow.z = 1
@playtimegoldshadow.opacity = 155
#============================================
# Setting up the location window's bar....
@location_bar = Sprite.new
@location_bar.bitmap = RPG::Cache.picture("locationbar")
@location_bar.x = 15
@location_bar.y = 635
#============================================
# Setting up the actual window for the map, opacity - 0
@location_window = Window_Mapname.new
@location_window.x = 0
@location_window.y = 609
#============================================
# Setting up a white bar below the location
@location_white = Sprite.new
@location_white.bitmap = RPG::Cache.picture("locationwhite")
@location_white.x = - 8
@location_white.y = 622
@location_white.z = 120
#============================================
@playtime_window = Window_PlayTime.new
@playtime_window.x = 645
@playtime_window.y = 390
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧剃ス懈・
# Command window, opacity - 0 so it is invisible, and commands are set to ""
# - nothing so no text shows, as there is pictures used instead..
s1 = ""
s2 = ""
s3 = ""
s4 = ""
s5 = ""
s6 = ""
@command_window = Window_Menucommand.new(200, [s1, s2, s3, s4, s5, s6])
@command_window.opacity = 0
@command_window.index = @menu_index
# 繝代・繝・ぅ莠コ謨ー縺・0 莠コ縺ョ・エ蜷・
if $game_party.actors.size == 0
# 繧「繧、繝・・縲√せ繧-繝ォ縲∬」・y縲√せ繝・・繧ソ繧ケ繧堤┌蜉ケ蛹・
@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
# 繧サ繝シ繝悶r辟。蜉ケ縺ォ縺吶k
@command_window.disable_item(4)
end
# 繧エ繝シ繝ォ繝峨え繧」繝ウ繝峨え繧剃ス懈・
@gold_window = Window_Gold.new
@gold_window.x = 645
@gold_window.y = 415
@gold_window.opacity = 0
# 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
@status_window = Window_MenuStatus.new
@status_window.x = 630
@status_window.y = - 6
@status_window.opacity = 0
@status_window.visible = true
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@background.dispose
@command1.dispose
@command2.dispose
@command3.dispose
@command4.dispose
@command5.dispose
@command6.dispose
@commands1.dispose
@commands2.dispose
@commands3.dispose
@commands4.dispose
@commands5.dispose
@commands6.dispose
@arrow.dispose
@status_window1.dispose
@status_window2.dispose
@status_window3.dispose
@status_window4.dispose
@status_windowshadow1.dispose
@status_windowshadow2.dispose
@status_windowshadow3.dispose
@status_windowshadow4.dispose
@playtimegoldpicture.dispose
@playtimegoldshadow.dispose
@location_bar.dispose
@location_window.dispose
@location_white.dispose
@playtime_window.dispose
@arrow_status.dispose
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
if @command2.y < 100
@command2.y += 20
end
if @command3.y < 160
@command3.y += 20
end
if @command4.y < 220
@command4.y += 20
end
if @command5.y < 280
@command5.y += 20
end
if @command6.y < 340
@command6.y += 20
end
if @command6.y >= 340
@commands1.visible = true
@commands2.visible = true
@commands3.visible = true
@commands4.visible = true
@commands5.visible = true
@commands6.visible = true
end
if @status_window1.x > 293
@status_window1.x -= 50
end
if @status_window2.x > 276
@status_window2.x -= 50
end
if @status_window3.x > 259
@status_window3.x -= 50
end
if @status_window4.x > 240
@status_window4.x -= 50
end
if @status_windowshadow1.x > 297
@status_windowshadow1.x -= 50
end
if @status_windowshadow2.x > 281
@status_windowshadow2.x -= 50
end
if @status_windowshadow3.x > 264
@status_windowshadow3.x -= 50
end
if @status_windowshadow4.x > 245
@status_windowshadow4.x -= 50
end
if @status_window.x > 230
@status_window.x -= 50
end
if @playtimegoldpicture.x > 446
@playtimegoldpicture.x -= 25
end
if @playtimegoldshadow.x > 451
@playtimegoldshadow.x -= 25
end
if @playtime_window.x > 445
@playtime_window.x -= 25
end
if @gold_window.x > 445
@gold_window.x -= 25
end
if @location_bar.y > 435
@location_bar.y -= 25
end
if @location_window.y > 409
@location_window.y -= 25
end
if @location_white.y > 422
@location_white.y -= 25
end
# 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
@command_window.update
@playtime_window.update
@gold_window.update
@status_window.update
@arrow.update
@playtime_window.update
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_command 繧貞他縺カ
if @command_window.active
update_command
return
end
# 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_status 繧貞他縺カ
if @status_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_command
case @command_window.index
when 0
@arrow.y = 45
@commands1.y = 45
@commands2.y = 105
@commands3.y = 165
@commands4.y = 225
@commands5.y = 285
@commands6.y = 345
@status_windowshadow1.y = 13
@status_windowshadow2.y = 112
@status_windowshadow3.y = 212
@status_windowshadow4.y = 312
@playtimegoldshadow.y = 409
when 1
@arrow.y = 105
@commands1.y = 42
@commands2.y = 100
@commands3.y = 162
@commands4.y = 222
@commands5.y = 282
@commands6.y = 342
@status_windowshadow1.y = 11
@status_windowshadow2.y = 110
@status_windowshadow3.y = 210
@status_windowshadow4.y = 310
@playtimegoldshadow.y = 406
when 2
@arrow.y = 165
@commands1.y = 39
@commands2.y = 97
@commands3.y = 159
@commands4.y = 219
@commands5.y = 279
@commands6.y = 339
@status_windowshadow1.y = 8
@status_windowshadow2.y = 107
@status_windowshadow3.y = 207
@status_windowshadow4.y = 307
@playtimegoldshadow.y = 403
when 3
@arrow.y = 225
@commands1.y = 36
@commands2.y = 94
@commands3.y = 156
@commands4.y = 216
@commands5.y = 276
@commands6.y = 336
@status_windowshadow1.y = 5
@status_windowshadow2.y = 104
@status_windowshadow3.y = 204
@status_windowshadow4.y = 304
@playtimegoldshadow.y = 400
when 4
@arrow.y = 285
@commands1.y = 33
@commands2.y = 91
@commands3.y = 153
@commands4.y = 213
@commands5.y = 273
@commands6.y = 333
@status_windowshadow1.y = 2
@status_windowshadow2.y = 101
@status_windowshadow3.y = 201
@status_windowshadow4.y = 301
@playtimegoldshadow.y = 397
when 5
@arrow.y = 345
@commands1.y = 30
@commands2.y = 88
@commands3.y = 150
@commands4.y = 210
@commands5.y = 270
@commands6.y = 330
@status_windowshadow1.y = - 1
@status_windowshadow2.y = 99
@status_windowshadow3.y = 199
@status_windowshadow4.y = 299
@playtimegoldshadow.y = 394
end
#======================
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
@arrow.visible = false
loop do
if @command1.x > - 200
@command1.x -= 40
end
if @command2.x > - 200
@command2.x -= 40
end
if @command3.x > - 200
@command3.x -= 40
end
if @command4.x > - 200
@command4.x -= 40
end
if @command5.x > - 200
@command5.x -= 40
end
if @command6.x > - 200
@command6.x -= 40
end
@commands1.visible = false
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @status_window.x < 640
@status_window.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 25
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 25
end
if @playtime_window.x < 640
@playtime_window.x += 25
end
if @gold_window.x < 640
@gold_window.x += 25
end
if @location_bar.y < 480
@location_bar.y += 25
end
if @location_window.y < 480
@location_window.y += 25
end
if @location_white.y < 480
@location_white.y += 25
end
delay(0.1)
if @status_window.x >= 640
break
end
end
$game_system.se_play($data_system.cancel_se)
# 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Map.new
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繝代・繝・ぅ莠コ謨ー縺・0 莠コ縺ァ縲√そ繝シ繝悶√ご繝シ繝 邨ゆコ・サ・螟悶・繧ウ繝槭Φ繝峨・・エ蜷・
if $game_party.actors.size == 0 and @command_window.index < 4
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
case @command_window.index
when 0 # 繧「繧、繝・・
@command1.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・ SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧「繧、繝・・逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Item.new
when 1 # 繧ケ繧-繝ォ
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 2 # 陬・y
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 3 # 繧ケ繝・・繧ソ繧ケ
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = true
when 4 # 繧サ繝シ繝・
# 繧サ繝シ繝也ヲ∵-「縺ョ・エ蜷・
if $game_system.save_disabled
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
#=====================
@command5.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧サ繝シ繝也判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Save.new
when 5 # 繧イ繝シ繝 邨ゆコ・
@command6.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧イ繝シ繝 邨ゆコ・判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_End.new
end
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_status
case @command_window.index
when 1
@arrow.y = 105
@commands1.y = 42
@commands2.y = 100
@commands3.y = 162
@commands4.y = 222
@commands5.y = 282
@commands6.y = 342
@status_windowshadow1.y = 11
@status_windowshadow2.y = 110
@status_windowshadow3.y = 210
@status_windowshadow4.y = 310
@playtimegoldshadow.y = 406
when 2
@arrow.y = 165
@commands1.y = 39
@commands2.y = 97
@commands3.y = 159
@commands4.y = 219
@commands5.y = 279
@commands6.y = 339
@status_windowshadow1.y = 8
@status_windowshadow2.y = 107
@status_windowshadow3.y = 207
@status_windowshadow4.y = 307
@playtimegoldshadow.y = 403
when 3
@arrow.y = 225
@commands1.y = 36
@commands2.y = 94
@commands3.y = 156
@commands4.y = 216
@commands5.y = 276
@commands6.y = 336
@status_windowshadow1.y = 5
@status_windowshadow2.y = 104
@status_windowshadow3.y = 204
@status_windowshadow4.y = 304
@playtimegoldshadow.y = 400
end
#========================
case @status_window.index
when 0
@arrow_status.y = 37
@arrow_status.x = 260
when 1
@arrow_status.y = 137
@arrow_status.x = 265 - @status_window.index * 25
when 2
@arrow_status.y = 237
@arrow_status.x = 265 - @status_window.index * 25
when 3
@arrow_status.y = 337
@arrow_status.x = 265 - @status_window.index * 23
end
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
@command_window.active = true
@status_window.active = false
@status_window.index = -1
@arrow_status.visible = false
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
case @command_window.index
when 1 # 繧ケ繧-繝ォ
# 縺薙・繧「繧ッ繧ソ繝シ縺ョ陦悟虚蛻カ髯舌′ 2 莉・荳翫・・エ蜷・
if $game_party.actors[@status_window.index].restriction >= 2
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
@command2.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Skill.new(@status_window.index)
when 2 # 陬・y
@command3.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Equip.new(@status_window.index)
when 3 # 繧ケ繝・・繧ソ繧ケ
@command4.z = 999
loop do
if @status_window.x < 640
@status_window.x += 50
end
if @status_window1.x < 640
@status_window1.x += 50
end
if @status_window2.x < 640
@status_window2.x += 50
end
if @status_window3.x < 640
@status_window3.x += 50
end
if @status_window4.x < 640
@status_window4.x += 50
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 50
end
if @status_windowshadow2.x < 640
@status_windowshadow2.x += 50
end
if @status_windowshadow3.x < 640
@status_windowshadow3.x += 50
end
if @status_windowshadow4.x < 640
@status_windowshadow4.x += 50
end
if @playtimegoldpicture.x < 640
@playtimegoldpicture.x += 50
end
if @playtimegoldshadow.x < 640
@playtimegoldshadow.x += 50
end
if @gold_window.x < 640
@gold_window.x += 50
end
if @playtime_window.x < 640
@playtime_window.x += 50
end
if @command2.y > 40
@command2.y -= 30
end
if @command3.y > 40
@command3.y -= 30
end
if @command4.y > 40
@command4.y -= 30
end
if @command5.y > 40
@command5.y -= 30
end
if @command6.y > 40
@command6.y -= 30
end
@commands2.visible = false
@commands3.visible = false
@commands4.visible = false
@commands5.visible = false
@commands6.visible = false
@arrow.visible = false
@arrow_status.visible = false
if @location_bar.y < 480
@location_bar.y += 30
end
if @location_white.y < 480
@location_white.y += 30
end
if @location_window.y < 480
@location_window.y += 30
end
delay(0.1)
if @command6.y <= 40
break
end
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Status.new(@status_window.index)
end
return
end
end
end
#==============================================================================
# 笆 Scene_Item
#------------------------------------------------------------------------------
# 縲繧「繧、繝・・逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_Item
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
#==============================================
# Setting up all the images
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#================help window pic====================
@help_picture = Sprite.new
@help_picture.bitmap = RPG::Cache.picture("helpwindow12")
@help_picture.x = 0
@help_picture.y = - 52
#=================Command=======================
@command1 = Sprite.new
@command1.bitmap = RPG::Cache.picture("cmscommand1")
@command1.x = 15
@command1.y = 40
@command1.z = 100
#=====================shadow=======================
@commands1 = Sprite.new
@commands1.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands1.x = 20
@commands1.y = 45
@commands1.z = 1
@commands1.opacity = 155
#===================item window======================
@item_picture = Sprite.new
@item_picture.bitmap = RPG::Cache.picture("itemwindow")
@item_picture.x = 7
@item_picture.y = 509
@item_picture.z = 11
#===============================================
@item_shadow = Sprite.new
@item_shadow.bitmap = RPG::Cache.picture("itemshadow")
@item_shadow.x = 12
@item_shadow.y = 514
@item_shadow.z = 1
@item_shadow.opacity = 155
#===============================================
@help_window = Window_Menuhelp.new
@item_window = Window_Menuitem.new
@item_window.z = 100
@item_window.help_window = @help_window
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧剃ス懈・ (荳榊庄隕悶・髱槭い繧ッ繝・ぅ繝悶↓險-螳・
@target_picture = Sprite.new
@target_picture.bitmap = RPG::Cache.picture("targetwindow")
@target_picture.z = 998
@target_picture.visible = false
@target_window = Window_Target.new
@target_window.z = 999
@target_window.opacity = 0
@target_window.visible = false
@target_window.active = false
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@help_window.dispose
@item_window.dispose
@target_window.dispose
@background.dispose
@command1.dispose
@commands1.dispose
@help_picture.dispose
@item_shadow.dispose
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
# 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
@help_window.update
@item_window.update
@target_window.update
@command1.update
# enter animation
if @item_shadow.y > 114
@item_shadow.y -= 50
end
if @item_picture.y > 109
@item_picture.y -= 50
end
if @item_window.y > 100
@item_window.y -= 50
end
if @help_picture.y < - 4
@help_picture.y += 24
end
if @help_window.y < - 7
@help_window.y += 35
end
if @command1.x < 215
@command1.x += 100
end
if @command1.y < 50
@command1.y += 5
end
if @commands1.x < 220
@commands1.x += 100
end
if @commands1.y < 55
@commands1.y += 5
end
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_item 繧貞他縺カ
if @item_window.active
update_item
return
end
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_target 繧貞他縺カ
if @target_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_item
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# exit animation
$game_system.se_play($data_system.cancel_se)
loop do
if @item_shadow.y < 480
@item_shadow.y += 50
end
if @item_picture.y < 480
@item_picture.y += 50
end
if @item_window.y < 480
@item_window.y += 50
end
if @help_picture.y > - 50
@help_picture.y -= 30
end
if @help_window.y > - 64
@help_window.y -= 30
end
if @command1.x > 15
@command1.x -= 100
end
if @command1.y > 40
@command1.y -= 5
end
if @commands1.x > 20
@commands1.x -= 100
end
if @commands1.y > 45
@commands1.y -= 5
end
delay(0.2)
if @item_picture.y >= 480
break
end
end
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(0)
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
@item = @item_window.item
# 菴ソ逕ィ繧「繧、繝・・縺ァ縺ッ縺ェ縺・ エ蜷・
unless @item.is_a?(RPG::Item)
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 菴ソ逕ィ縺ァ縺阪↑縺・ エ蜷・
unless $game_party.item_can_use?(@item.id)
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 蜉ケ譫懃ッ・峇縺悟袖譁ケ縺ョ・エ蜷・
if @item.scope >= 3
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
@item_window.active = false
@target_window.x = (@item_window.index + 1) % 2 * 304
@target_picture.x = (@item_window.index + 1) % 2 * 304
@target_picture.visible = true
@target_window.visible = true
@target_window.active = true
# 蜉ケ譫懃ッ・峇 (蜊倅ス・蜈ィ菴・ 縺ォ蠢懊§縺ヲ繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
if @item.scope == 4 || @item.scope == 6
@target_window.index = -1
else
@target_window.index = 0
end
# 蜉ケ譫懃ッ・峇縺悟袖譁ケ莉・螟悶・・エ蜷・
else
# 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
if @item.common_event_id > 0
# 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
$game_temp.common_event_id = @item.common_event_id
# 繧「繧、繝・・縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
$game_system.se_play(@item.menu_se)
# 豸郁怜刀縺ョ・エ蜷・
if @item.consumable
# 菴ソ逕ィ縺励◆繧「繧、繝・・繧・1 貂帙i縺・
$game_party.lose_item(@item.id, 1)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ・・岼繧貞・謠冗判
@item_window.draw_item(@item_window.index)
end
# 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Map.new
return
end
end
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_target
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繧「繧、繝・・蛻・l縺ェ縺ゥ縺ァ菴ソ逕ィ縺ァ縺阪↑縺上↑縺」縺溷 エ蜷・
unless $game_party.item_can_use?(@item.id)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
@item_window.refresh
end
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧呈カ亥悉
@item_window.active = true
@target_window.visible = false
@target_picture.visible = false
@target_window.active = false
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繧「繧、繝・・繧剃スソ縺・・縺」縺溷 エ蜷・
if $game_party.item_number(@item.id) == 0
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 繧ソ繝シ繧イ繝・ヨ縺悟・菴薙・・エ蜷・
if @target_window.index == -1
# 繝代・繝・ぅ蜈ィ菴薙↓繧「繧、繝・・縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
# 繧ソ繝シ繧イ繝・ヨ縺悟腰菴薙・・エ蜷・
if @target_window.index >= 0
# 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧「繧、繝・・縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
target = $game_party.actors[@target_window.index]
used = target.item_effect(@item)
end
# 繧「繧、繝・・繧剃スソ縺」縺溷 エ蜷・
if used
# 繧「繧、繝・・縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
$game_system.se_play(@item.menu_se)
# 豸郁怜刀縺ョ・エ蜷・
if @item.consumable
# 菴ソ逕ィ縺励◆繧「繧、繝・・繧・1 貂帙i縺・
$game_party.lose_item(@item.id, 1)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ・・岼繧貞・謠冗判
@item_window.draw_item(@item_window.index)
end
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
@target_window.refresh
# 蜈ィ貊・・・エ蜷・
if $game_party.all_dead?
# 繧イ繝シ繝 繧ェ繝シ繝舌・逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Gameover.new
return
end
# 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
if @item.common_event_id > 0
# 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
$game_temp.common_event_id = @item.common_event_id
# 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Map.new
return
end
end
# 繧「繧、繝・・繧剃スソ繧上↑縺九▲縺溷 エ蜷・
unless used
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end
#==============================================================================
# 笆 Scene_Skill
#------------------------------------------------------------------------------
# 縲繧ケ繧-繝ォ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_Skill
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
#==============================================
# Setting up all the images
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#================help window image=====================
@help_picture = Sprite.new
@help_picture.bitmap = RPG::Cache.picture("helpwindow12")
@help_picture.x = 0
@help_picture.y = - 52
#==============Command image=====================
@command2 = Sprite.new
@command2.bitmap = RPG::Cache.picture("cmscommand2")
@command2.x = 15
@command2.y = 40
@command2.z = 100
#==============shadow================================
@commands2 = Sprite.new
@commands2.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands2.x = 20
@commands2.y = 45
@commands2.z = 1
@commands2.opacity = 155
#==============status window==========================
@status_window1 = Sprite.new
@status_window1.bitmap = RPG::Cache.picture("status window 1")
@status_window1.x = 693
@status_window1.y = 45
@status_window1.z = 100
#============shadow================================
@status_windowshadow1 = Sprite.new
@status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow1.x = 697
@status_windowshadow1.y = 50
@status_windowshadow1.z = 1
@status_windowshadow1.opacity = 155
#==================skill window pic====================
@skill_picture = Sprite.new
@skill_picture.bitmap = RPG::Cache.picture("skillwindow")
@skill_picture.x = 7
@skill_picture.y = 540
@skill_picture.z = 2
#================skill shadow pic=====================
@skill_shadow = Sprite.new
@skill_shadow.bitmap = RPG::Cache.picture("skillshadow")
@skill_shadow.x = 14
@skill_shadow.y = 545
@skill_shadow.z = 1
@skill_shadow.opacity = 155
#===============target window========================
@target_picture = Sprite.new
@target_picture.bitmap = RPG::Cache.picture("targetwindow")
@target_picture.z = 998
@target_picture.visible = false
# 繧「繧ッ繧ソ繝シ繧貞叙蠕・
@actor = $game_party.actors[@actor_index]
# 繝倥Ν繝励え繧」繝ウ繝峨え縲√せ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縲√せ繧-繝ォ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
@help_window = Window_Menuhelp.new
@help_window.opacity = 0
@status_window = Window_SkillStatus.new(@actor)
@skill_window = Window_Menuskill.new(@actor)
@skill_window.opacity = 0
# 繝倥Ν繝励え繧」繝ウ繝峨え繧帝未騾」莉倥¢
@skill_window.help_window = @help_window
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧剃ス懈・ (荳榊庄隕悶・髱槭い繧ッ繝・ぅ繝悶↓險-螳・
@target_window = Window_Target.new
@target_window.z = 999
@target_window.opacity = 0
@target_window.visible = false
@target_window.active = false
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@help_window.dispose
@status_window.dispose
@skill_window.dispose
@target_window.dispose
@background.dispose
@help_picture.dispose
@commands2.dispose
@command2.dispose
@status_window1.dispose
@status_windowshadow1.dispose
@skill_picture.dispose
@skill_shadow.dispose
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
# enter animation
if @help_picture.y < - 4
@help_picture.y += 24
end
if @help_window.y < - 7
@help_window.y += 35
end
if @command2.y < 60
@command2.y += 20
end
if @commands2.y < 65
@commands2.y += 20
end
if @skill_shadow.y > 145
@skill_shadow.y -= 50
end
if @skill_picture.y > 140
@skill_picture.y -= 50
end
if @skill_window.y > 131
@skill_window.y -= 50
end
if @status_window1.x > 293
@status_window1.x -= 100
end
if @status_window.x > 230
@status_window.x -= 100
end
if @status_windowshadow1.x > 297
@status_windowshadow1.x -= 100
end
# 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
# 繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_skill 繧貞他縺カ
if @skill_window.active
update_skill
return
end
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_target 繧貞他縺カ
if @target_window.active
update_target
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_skill
if Input.trigger?(Input::B)
# exit animation
loop do
if @skill_shadow.y < 480
@skill_shadow.y += 50
end
if @skill_picture.y < 480
@skill_picture.y += 50
end
if @skill_window.y < 480
@skill_window.y += 50
end
if @help_picture.y > - 50
@help_picture.y -= 30
end
if @help_window.y > - 64
@help_window.y -= 30
end
if @command2.x > 15
@command2.x -= 100
end
if @command2.y > 40
@command2.y -= 10
end
if @commands2.x > 20
@commands2.x -= 100
end
if @commands2.y > 45
@commands2.y -= 10
end
if @status_window1.x < 640
@status_window1.x += 100
end
if @status_window.x < 640
@status_window.x += 100
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 100
end
delay(0.2)
if @skill_picture.y >= 480
break
end
end
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(1)
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
@skill = @skill_window.skill
# 菴ソ逕ィ縺ァ縺阪↑縺・ エ蜷・
if @skill == nil or not @actor.skill_can_use?(@skill.id)
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 蜉ケ譫懃ッ・峇縺悟袖譁ケ縺ョ・エ蜷・
if @skill.scope >= 3
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
@skill_window.active = false
@target_window.x = (@skill_window.index + 1) % 2 * 304
@target_picture.x = (@skill_window.index + 1) % 2 * 304
@target_window.visible = true
@target_window.active = true
@target_picture.visible = true
# 蜉ケ譫懃ッ・峇 (蜊倅ス・蜈ィ菴・ 縺ォ蠢懊§縺ヲ繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
if @skill.scope == 4 || @skill.scope == 6
@target_window.index = -1
elsif @skill.scope == 7
@target_window.index = @actor_index - 10
else
@target_window.index = 0
end
# 蜉ケ譫懃ッ・峇縺悟袖譁ケ莉・螟悶・・エ蜷・
else
# 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
if @skill.common_event_id > 0
# 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
$game_temp.common_event_id = @skill.common_event_id
# 繧ケ繧-繝ォ縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
$game_system.se_play(@skill.menu_se)
# SP 豸郁イサ
@actor.sp -= @skill.sp_cost
# 蜷・え繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
@status_window.refresh
@skill_window.refresh
@target_window.refresh
# 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Map.new
return
end
end
return
end
# R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::R)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
@actor_index += 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Skill.new(@actor_index)
return
end
# L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::L)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 蜑阪・繧「繧ッ繧ソ繝シ縺ク
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Skill.new(@actor_index)
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_target
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧呈カ亥悉
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
@target_picture.visible = false
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# SP 蛻・l縺ェ縺ゥ縺ァ菴ソ逕ィ縺ァ縺阪↑縺上↑縺」縺溷 エ蜷・
unless @actor.skill_can_use?(@skill.id)
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 繧ソ繝シ繧イ繝・ヨ縺悟・菴薙・・エ蜷・
if @target_window.index == -1
# 繝代・繝・ぅ蜈ィ菴薙↓繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
# 繧ソ繝シ繧イ繝・ヨ縺御スソ逕ィ閠・・・エ蜷・
if @target_window.index <= -2
# 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
target = $game_party.actors[@target_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
# 繧ソ繝シ繧イ繝・ヨ縺悟腰菴薙・・エ蜷・
if @target_window.index >= 0
# 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
target = $game_party.actors[@target_window.index]
used = target.skill_effect(@actor, @skill)
end
# 繧ケ繧-繝ォ繧剃スソ縺」縺溷 エ蜷・
if used
# 繧ケ繧-繝ォ縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
$game_system.se_play(@skill.menu_se)
# SP 豸郁イサ
@actor.sp -= @skill.sp_cost
# 蜷・え繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
@status_window.refresh
@skill_window.refresh
@target_window.refresh
# 蜈ィ貊・・・エ蜷・
if $game_party.all_dead?
# 繧イ繝シ繝 繧ェ繝シ繝舌・逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Gameover.new
return
end
# 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
if @skill.common_event_id > 0
# 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
$game_temp.common_event_id = @skill.common_event_id
# 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Map.new
return
end
end
# 繧ケ繧-繝ォ繧剃スソ繧上↑縺九▲縺溷 エ蜷・
unless used
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
end
#==============================================================================
# 笆 Scene_Equip
#------------------------------------------------------------------------------
# 縲陬・y逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_Equip
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
# equip_index : 陬・y繧、繝ウ繝・ャ繧ッ繧ケ
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#=============the equip command pic========================
@command3 = Sprite.new
@command3.bitmap = RPG::Cache.picture("cmscommand3")
@command3.x = 15
@command3.y = 40
@command3.z = 100
#=================the shadow of it=======================
@commands3 = Sprite.new
@commands3.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands3.x = 20
@commands3.y = 45
@commands3.z = 1
@commands3.opacity = 155
#================the status window pic====================
@status_window1 = Sprite.new
@status_window1.bitmap = RPG::Cache.picture("status window 1")
@status_window1.x = 693
@status_window1.y = 45
@status_window1.z = 100
#=============the shadow of it===========================
@status_windowshadow1 = Sprite.new
@status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
@status_windowshadow1.x = 697
@status_windowshadow1.y = 50
@status_windowshadow1.z = 1
@status_windowshadow1.opacity = 155
#================help window image=====================
@help_picture = Sprite.new
@help_picture.bitmap = RPG::Cache.picture("helpwindow12")
@help_picture.x = 0
@help_picture.y = - 52
#==============This sets up the 3rd status picture=============
@picture_status2 = Sprite.new
@picture_status2.bitmap = RPG::Cache.picture("windowstatus2")
@picture_status2.x = 850
@picture_status2.y = 135
@picture_status2.z = 3
#============the shadow of the 2nd status pic================
@picture_shadow2 = Sprite.new
@picture_shadow2.bitmap = RPG::Cache.picture("windowstatus2shadow")
@picture_shadow2.x = 855
@picture_shadow2.y = 140
@picture_shadow2.z = 1
@picture_shadow2.opacity = 155
#======the pic for equip left (status window 2 in this script)==========
@equip_window1 = Sprite.new
@equip_window1.bitmap = RPG::Cache.picture("equipwindow1")
@equip_window1.x = - 113
@equip_window1.y = 117
@equip_window1.z = 2
#============the equipment selection window pic===============
@equip_window2 = Sprite.new
@equip_window2.bitmap = RPG::Cache.picture("equipwindow2")
@equip_window2.x = 245
@equip_window2.y = 585
@equip_window2.z = 2
#================the shadow of it==========================
@equip_shadow2 = Sprite.new
@equip_shadow2.bitmap = RPG::Cache.picture("equipwindow2shadow")
@equip_shadow2.x = 250
@equip_shadow2.y = 590
@equip_shadow2.opacity = 155
@equip_shadow2.z = 1
#================the selection arrow=========================
@arrow = Sprite.new
@arrow.bitmap = RPG::Cache.picture("arrow4")
@arrow.x = - 60
@arrow.y = 141
@arrow.z = 1000
# 繧「繧ッ繧ソ繝シ繧貞叙蠕・
@actor = $game_party.actors[@actor_index]
# 繧ヲ繧」繝ウ繝峨え繧剃ス懈・
@status_window = Window_SkillStatus.new(@actor)
@status_window2 = Window_Status2.new(@actor)
@status_window2.x = 850
@status_window2.y = 120
@status_window2.opacity = 0
@help_window = Window_Menuhelp.new
@help_window.opacity = 0
@right_window = Window_EquipRight.new(@actor)
@right_window.visible = true
@item_window1 = Window_EquipItem.new(@actor, 0)
@item_window2 = Window_EquipItem.new(@actor, 1)
@item_window3 = Window_EquipItem.new(@actor, 2)
@item_window4 = Window_EquipItem.new(@actor, 3)
@item_window5 = Window_EquipItem.new(@actor, 4)
# 繝倥Ν繝励え繧」繝ウ繝峨え繧帝未騾」莉倥¢
@right_window.help_window = @help_window
@item_window1.help_window = @help_window
@item_window2.help_window = @help_window
@item_window3.help_window = @help_window
@item_window4.help_window = @help_window
@item_window5.help_window = @help_window
# 繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
@right_window.index = @equip_index
refresh
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@help_window.dispose
@right_window.dispose
@item_window1.dispose
@item_window2.dispose
@item_window3.dispose
@item_window4.dispose
@item_window5.dispose
@background.dispose
@command3.dispose
@commands3.dispose
@status_window1.dispose
@status_windowshadow1.dispose
@help_picture.dispose
@status_window.dispose
@status_window2.dispose
@equip_window1.dispose
@equip_window2.dispose
@picture_status2.dispose
@arrow.dispose
@equip_shadow2.dispose
@picture_shadow2.dispose
end
#--------------------------------------------------------------------------
# 笳・繝ェ繝輔Ξ繝・す繝・
#--------------------------------------------------------------------------
def refresh
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜿ッ隕也憾諷玖ィ-螳・
@item_window1.visible = (@right_window.index == 0)
@item_window2.visible = (@right_window.index == 1)
@item_window3.visible = (@right_window.index == 2)
@item_window4.visible = (@right_window.index == 3)
@item_window5.visible = (@right_window.index == 4)
# 迴セ蝨ィ陬・y荳-縺ョ繧「繧、繝・・繧貞叙蠕・
item1 = @right_window.item
# 迴セ蝨ィ縺ョ繧「繧、繝・・繧ヲ繧」繝ウ繝峨え繧・@item_window 縺ォ險-螳・
case @right_window.index
when 0
@item_window = @item_window1
when 1
@item_window = @item_window2
when 2
@item_window = @item_window3
when 3
@item_window = @item_window4
when 4
@item_window = @item_window5
end
# 繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
if @right_window.active
# 陬・y螟画峩蠕後・繝代Λ繝。繝シ繧ソ繧呈カ亥悉
@status_window2.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)
end
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
if @item_window.active
# 迴セ蝨ィ驕ク謚樔ク-縺ョ繧「繧、繝・・繧貞叙蠕・
item2 = @item_window.item
# 陬・y繧貞、画峩
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
# 陬・y螟画峩蠕後・繝代Λ繝。繝シ繧ソ繧貞叙蠕・
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
# 陬・y繧呈綾縺・
@actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# 繝ャ繝輔ヨ繧ヲ繧」繝ウ繝峨え縺ォ謠冗判
@status_window2.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
@status_window2.refresh
end
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
@status_window.update
if @command3.y < 60
@command3.y += 20
end
if @commands3.y < 65
@commands3.y += 20
end
if @help_picture.y < - 4
@help_picture.y += 24
end
if @help_window.y < - 7
@help_window.y += 35
end
if @status_window1.x > 293
@status_window1.x -= 80
end
if @status_windowshadow1.x > 297
@status_windowshadow1.x -= 80
end
if @status_window.x > 230
@status_window.x -= 50
end
if @status_window2.x > 250
@status_window2.x -= 100
end
if @picture_status2.x > 250
@picture_status2.x -= 100
end
if @picture_shadow2.x > 255
@picture_shadow2.x -= 100
end
if @equip_window1.x < 7
@equip_window1.x += 20
end
if @right_window.x < 20
@right_window.x += 20
end
if @equip_window2.y > 285
@equip_window2.y -= 50
end
if @equip_shadow2.y > 290
@equip_shadow2.y -= 50
end
if @arrow.x < - 10
@arrow.x += 10
end
if @item_window1.y > 273
@item_window1.y -= 50
end
if @item_window2.y > 273
@item_window2.y -= 50
end
if @item_window3.y > 273
@item_window3.y -= 50
end
if @item_window4.y > 273
@item_window4.y -= 50
end
if @item_window5.y > 273
@item_window5.y -= 50
end
# 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
@right_window.update
@item_window.update
refresh
# 繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_right 繧貞他縺カ
if @right_window.active
update_right
return
end
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_item 繧貞他縺カ
if @item_window.active
update_item
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_right
case @right_window.index
when 0
@arrow.y = 141
when 1
@arrow.y = 208
when 2
@arrow.y = 276
when 3
@arrow.y = 344
when 4
@arrow.y = 408
end
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
loop do
if @command3.x > 15
@command3.x -= 100
end
if @command3.y > 40
@command3.y -= 10
end
if @commands3.x > 20
@commands2.x -= 100
end
if @commands3.y > 45
@commands3.y -= 10
end
if @help_picture.y > - 50
@help_picture.y -= 30
end
if @help_window.y > - 64
@help_window.y -= 30
end
if @status_window1.x < 640
@status_window1.x += 100
end
if @status_window.x < 640
@status_window.x += 100
end
if @status_windowshadow1.x < 640
@status_windowshadow1.x += 100
end
if @status_window2.x < 640
@status_window2.x += 100
end
if @picture_status2.x < 640
@picture_status2.x += 100
end
if @picture_shadow2.x < 640
@picture_shadow2.x += 100
end
if @equip_window1.x > - 250
@equip_window1.x -= 50
end
if @right_window.x > - 250
@right_window.x -= 50
end
if @equip_window2.y < 480
@equip_window2.y += 50
end
if @equip_shadow2.y < 480
@equip_shadow2.y += 50
end
if @item_window1.y < 480
@item_window1.y += 50
end
if @item_window2.y < 480
@item_window2.y += 50
end
if @item_window3.y < 480
@item_window3.y += 50
end
if @item_window4.y < 480
@item_window4.y += 50
end
if @item_window5.y < 480
@item_window5.y += 50
end
@arrow.visible = false
delay(0.1)
if @equip_window1.x <= - 250
break
end
end
$game_system.se_play($data_system.cancel_se)
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(2)
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 陬・y蝗コ螳壹・・エ蜷・
if @actor.equip_fix?(@right_window.index)
# 繝悶じ繝シ SE 繧呈シ泌・・
$game_system.se_play($data_system.buzzer_se)
return
end
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
@right_window.active = false
@item_window.active = true
@item_window.index = 0
return
end
# R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::R)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
@actor_index += 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
# L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::L)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 蜑阪・繧「繧ッ繧ソ繝シ縺ク
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Equip.new(@actor_index, @right_window.index)
return
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
#--------------------------------------------------------------------------
def update_item
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繝ゥ繧、繝医え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
@right_window.active = true
@status_window2.refresh
@item_window.active = false
@item_window.index = -1
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 陬・y SE 繧呈シ泌・・
$game_system.se_play($data_system.equip_se)
# 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
item = @item_window.item
# 陬・y繧貞、画峩
@actor.equip(@right_window.index, item == nil ? 0 : item.id)
# 繝ゥ繧、繝医え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
@right_window.active = true
@item_window.active = false
@item_window.index = -1
# 繝ゥ繧、繝医え繧」繝ウ繝峨え縲√い繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
@right_window.refresh
@item_window.refresh
return
end
end
end
#==============================================================================
# 笆 Scene_Status
#------------------------------------------------------------------------------
# 縲繧ケ繝・・繧ソ繧ケ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_Status
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
#========================================
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
#========================================
# This sets up the command picture & shadow
@command4 = Sprite.new
@command4.bitmap = RPG::Cache.picture("cmscommand4")
@command4.x = 15
@command4.y = 40
@command4.z = 100
#========================================
@commands4 = Sprite.new
@commands4.bitmap = RPG::Cache.picture("cmscommandshadow")
@commands4.x = 20
@commands4.y = 45
@commands4.z = 1
@commands4.opacity = 155
#==============This sets up the 1st status picture=============
@picture_status1 = Sprite.new
@picture_status1.bitmap = RPG::Cache.picture("windowstatus1")
@picture_status1.x = 230
@picture_status1.y = - 120
@picture_status1.z = 2
#=============This sets up the 2nd status picture==============
@picture_status2 = Sprite.new
@picture_status2.bitmap = RPG::Cache.picture("windowstatus2")
@picture_status2.x = 830
@picture_status2.y = 115
@picture_status2.z = 2
#==============This sets up the 3rd status picture=============
@picture_status3 = Sprite.new
@picture_status3.bitmap = RPG::Cache.picture("windowstatus3")
@picture_status3.x = 230
@picture_status3.y = 480
@picture_status3.z = 2
#===============This sets up the 4th status picture==============
@picture_status4 = Sprite.new
@picture_status4.bitmap = RPG::Cache.picture("windowstatus4")
@picture_status4.x = - 280
@picture_status4.y = 388
@picture_status4.z = 2
#============the shadow of the 1st status pic==================
@picture_shadow1 = Sprite.new
@picture_shadow1.bitmap = RPG::Cache.picture("windowstatus1shadow")
@picture_shadow1.x = 235
@picture_shadow1.y = - 115
@picture_shadow1.z = 1
@picture_shadow1.opacity = 155
#============the shadow of the 2nd status pic==================
@picture_shadow2 = Sprite.new
@picture_shadow2.bitmap = RPG::Cache.picture("windowstatus2shadow")
@picture_shadow2.x = 835
@picture_shadow2.y = 120
@picture_shadow2.z = 1
@picture_shadow2.opacity = 155
#============the shadow of the 3rd status pic==================
@picture_shadow3 = Sprite.new
@picture_shadow3.bitmap = RPG::Cache.picture("windowstatus3shadow")
@picture_shadow3.x = 235
@picture_shadow3.y = 485
@picture_shadow3.z = 1
@picture_shadow3.opacity = 155
#============the shadow of the 4th status pic==================
@picture_shadow4 = Sprite.new
@picture_shadow4.bitmap = RPG::Cache.picture("windowstatus4shadow")
@picture_shadow4.x = - 275
@picture_shadow4.y = 393
@picture_shadow4.z = 1
@picture_shadow4.opacity = 155
# 繧「繧ッ繧ソ繝シ繧貞叙蠕・
@actor = $game_party.actors[@actor_index]
# Sets up the 1st status window
@status_window1 = Window_Status.new(@actor)
@status_window1.x = 220
@status_window1.y = - 160
@status_window1.opacity = 0
#=============Sets up the 2nd status window==================
@status_window2 = Window_Status2.new(@actor)
@status_window2.x = 830
@status_window2.y = 100
@status_window2.opacity = 0
#============Sets up the 3rd status window===================
@status_window3 = Window_Status3.new(@actor)
@status_window3.x = 220
@status_window3.y = 700
@status_window3.opacity = 0
#=============Sets up the 4th status window==================
@status_window4 = Window_Status4.new(@actor)
@status_window4.x = - 280
@status_window4.y = 385
@status_window4.opacity = 0
#============Sets up the 5th status window - battler=============
@status_window5 = Window_Status5.new(@actor)
@status_window5.x = - 300
@status_window5.y = 0
@status_window5.opacity = 0
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@background.dispose
@command4.dispose
@commands4.dispose
@picture_status1.dispose
@picture_status2.dispose
@picture_status3.dispose
@picture_status4.dispose
@status_window1.dispose
@status_window2.dispose
@status_window3.dispose
@status_window4.dispose
@status_window5.dispose
@picture_shadow1.dispose
@picture_shadow2.dispose
@picture_shadow3.dispose
@picture_shadow4.dispose
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
#===========================================
# enter animation
if @picture_status1.y < 15
@picture_status1.y += 45
end
if @picture_shadow1.y < 20
@picture_shadow1.y += 45
end
if @picture_status2.x > 230
@picture_status2.x -= 150
end
if @picture_shadow2.x > 235
@picture_shadow2.x -= 150
end
if @picture_status3.y > 262
@picture_status3.y -= 109
end
if @picture_shadow3.y > 267
@picture_shadow3.y -= 109
end
if @picture_status4.x < 5
@picture_status4.x += 95
end
if @picture_shadow4.x < 10
@picture_shadow4.x += 95
end
if @status_window1.y < 0
@status_window1.y += 80
end
if @status_window2.x > 230
@status_window2.x -= 150
end
if @status_window3.y > 250
@status_window3.y -= 150
end
if @status_window4.x < 5
@status_window4.x += 95
end
if @status_window5.x < 0
@status_window5.x += 100
end
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# exit animation
loop do
if @picture_status1.y > - 400
@picture_status1.y -= 100
end
if @picture_shadow1.y > - 400
@picture_shadow1.y -= 100
end
if @picture_status2.x < 640
@picture_status2.x += 100
end
if @picture_shadow2.x < 640
@picture_shadow2.x += 100
end
if @picture_status3.y < 480
@picture_status3.y += 100
end
if @picture_shadow3.y < 480
@picture_shadow3.y += 100
end
if @picture_status4.x > - 300
@picture_status4.x -= 100
end
if @picture_shadow4.x > - 400
@picture_shadow4.x -= 100
end
if @status_window1.y > - 400
@status_window1.y -= 100
end
if @status_window2.x < 640
@status_window2.x += 100
end
if @status_window3.y < 640
@status_window3.y += 100
end
if @status_window4.x > - 200
@status_window4.x -= 100
end
if @status_window5.x > - 300
@status_window5.x -= 100
end
delay(0.1)
if @status_window2.x >= 640
break
end
end
$game_system.se_play($data_system.cancel_se)
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(3)
return
end
# R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::R)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
@actor_index += 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Status.new(@actor_index)
return
end
# L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::L)
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 蜑阪・繧「繧ッ繧ソ繝シ縺ク
@actor_index += $game_party.actors.size - 1
@actor_index %= $game_party.actors.size
# 蛻・縺ョ繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Status.new(@actor_index)
return
end
end
end
#==============================================================================
# 笆 Scene_File
#------------------------------------------------------------------------------
# 縲繧サ繝シ繝也判髱「縺翫h縺ウ繝-繝シ繝臥判髱「縺ョ繧ケ繝シ繝代・繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_File
#--------------------------------------------------------------------------
# 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
# help_text : 繝倥Ν繝励え繧」繝ウ繝峨え縺ォ陦ィ遉コ縺吶k譁・-怜・
#--------------------------------------------------------------------------
def initialize(help_text)
@help_text = help_text
end
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("save window")
@background.x = 0
@background.y = 0
# 繝倥Ν繝励え繧」繝ウ繝峨え繧剃ス懈・
@help_window = Window_Help.new
@help_window.opacity = 0
@help_window.set_text(@help_text)
# 繧サ繝シ繝悶ヵ繧。繧、繝ォ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
@savefile_windows = []
for i in 0..3
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
# 譛蠕後↓謫堺ス懊@縺溘ヵ繧。繧、繝ォ繧帝∈謚・
@file_index = $game_temp.last_file_index
@savefile_windows[@file_index].selected = true
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@background.dispose
@help_window.dispose
for i in @savefile_windows
i.dispose
end
end
#--------------------------------------------------------------------------
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
# 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
@help_window.update
for i in @savefile_windows
i.update
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繝。繧ス繝・ラ on_decision (邯呎価蜈医〒螳夂セゥ) 繧貞他縺カ
on_decision(make_filename(@file_index))
$game_temp.last_file_index = @file_index
return
end
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繝。繧ス繝・ラ on_cancel (邯呎価蜈医〒螳夂セゥ) 繧貞他縺カ
on_cancel
return
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::DOWN)
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・3 繧医j蜑阪・・エ蜷・
if Input.trigger?(Input::DOWN) or @file_index < 3
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 1) % 4
@savefile_windows[@file_index].selected = true
return
end
end
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
if Input.repeat?(Input::UP)
# 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
# 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
if Input.trigger?(Input::UP) or @file_index > 0
# 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cursor_se)
# 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 3) % 4
@savefile_windows[@file_index].selected = true
return
end
end
end
#--------------------------------------------------------------------------
# 笳・繝輔ぃ繧、繝ォ蜷阪・菴懈・
# file_index : 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧、繝ウ繝・ャ繧ッ繧ケ (0・・)
#--------------------------------------------------------------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rxdata"
end
end
#==============================================================================
# 笆 Scene_End
#------------------------------------------------------------------------------
# 縲繧イ繝シ繝 邨ゆコ・判髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶・
#==============================================================================
class Scene_End
#--------------------------------------------------------------------------
# 笳・繝。繧、繝ウ蜃ヲ逅・
#--------------------------------------------------------------------------
def main
# This is setting up the background picture
@background = Sprite.new
@background.bitmap = RPG::Cache.picture("background")
@background.x = 0
@background.y = 0
@background.opacity = 255
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧剃ス懈・
s1 = ""
s2 = ""
s3 = ""
@command_window = Window_Command.new(192, [s1, s2, s3])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
@command_window.opacity = 0
@command_window.visible = false
#===============Arrow selection pic======================
@arrow = Sprite.new
@arrow.bitmap = RPG::Cache.picture("arrow4")
@arrow.x = 320 - @command_window.width / 2 - 30
@arrow.y = 175
@arrow.z = 999
#=======the end window - replaces command window===========
@end_window = Window_End.new
@end_window.x = 320 - @command_window.width / 2 + 8
@end_window.y = 240 - @command_window.height / 2 - 15
#=============end window pic============================
@endwindow = Sprite.new
@endwindow.bitmap = RPG::Cache.picture("endwindow")
@endwindow.opacity = 255
@endwindow.x = 320 - @command_window.width / 2 - 10
@endwindow.y = 240 - @command_window.height / 2 - 10
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
Graphics.transition
# 繝。繧、繝ウ繝ォ繝シ繝・
loop do
# 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
Graphics.update
# 蜈・蜉帶ュ・ア繧呈峩譁ー
Input.update
# 繝輔Ξ繝シ繝 譖エ譁ー
update
# 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
if $scene != self
break
end
end
# 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
Graphics.freeze
# 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
@endwindow.dispose
@command_window.dispose
@end_window.dispose
@arrow.dispose
@background.dispose
# 繧ソ繧、繝医Ν逕サ髱「縺ォ蛻・j譖ソ縺井ク-縺ョ・エ蜷・
if $scene.is_a?(Scene_Title)
# 逕サ髱「繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
Graphics.transition
Graphics.freeze
end
end
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
# 笳・繝輔Ξ繝シ繝 譖エ譁ー
#--------------------------------------------------------------------------
def update
# Little effect added
if @background.opacity > 100
@background.opacity -= 2
end
if @endwindow.opacity > 150
@endwindow.opacity -= 1
end
case @command_window.index
when 0
@arrow.y = 175
when 1
@arrow.y = 220
when 2
@arrow.y = 265
end
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧呈峩譁ー
@command_window.update
# B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::B)
# 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
$game_system.se_play($data_system.cancel_se)
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(5)
return
end
# C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
if Input.trigger?(Input::C)
# 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
case @command_window.index
when 0 # 繧ソ繧、繝医Ν縺ク
command_to_title
when 1 # 繧キ繝」繝・ヨ繝繧ヲ繝ウ
command_shutdown
when 2 # 繧・a繧・
command_cancel
end
return
end
end
#--------------------------------------------------------------------------
# 笳・繧ウ繝槭Φ繝・[繧ソ繧、繝医Ν縺ク] 驕ク謚樊凾縺ョ蜃ヲ逅・
#--------------------------------------------------------------------------
def command_to_title
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# BGM縲。GS縲`E 繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# 繧ソ繧、繝医Ν逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Title.new
end
#--------------------------------------------------------------------------
# 笳・繧ウ繝槭Φ繝・[繧キ繝」繝・ヨ繝繧ヲ繝ウ] 驕ク謚樊凾縺ョ蜃ヲ逅・
#--------------------------------------------------------------------------
def command_shutdown
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# BGM縲。GS縲`E 繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
# 繧キ繝」繝・ヨ繝繧ヲ繝ウ
$scene = nil
end
#--------------------------------------------------------------------------
# 笳・繧ウ繝槭Φ繝・[繧・a繧犠 驕ク謚樊凾縺ョ蜃ヲ逅・
#--------------------------------------------------------------------------
def command_cancel
# 豎コ螳・SE 繧呈シ泌・・
$game_system.se_play($data_system.decision_se)
# 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
$scene = Scene_Menu.new(5)
end
end
I've been searching around the net for this script, though, now when I find it, it seems like it's not working as it should... I've been getting at lot of errors when opening the menu in-game and the problems is about the arguements around 2000-2500... One error is this (wrong numbers of arguments (0 for 4)) :
Code:
# Setting up the actual window for the map, opacity - 0
@location_window = Window_Mapname.new
@location_window.x = 0
@location_window.y = 609
Code:
# Command window, opacity - 0 so it is invisible, and commands are set to ""
# - nothing so no text shows, as there is pictures used instead..
s1 = ""
s2 = ""
s3 = ""
s4 = ""
s5 = ""
s6 = ""
@command_window = Window_Menucommand.new(200, [s1, s2, s3, s4, s5, s6])
@command_window.opacity = 0
@command_window.index = @menu_index
Good to mention is that I'm not really that much into scripting this type of code (PHP and MySQL is the only stuff I know...) so I'm pretty much a newbe at this... Still, I really wanna get this working so I'll try my best to team up with someone ready to give this problem a shot to resovle...
Please, help!!
/Mzale