The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: creepy on January 11, 2006, 04:02:40 PM

Title: FF X-2 Menu
Post by: creepy on January 11, 2006, 04:02:40 PM
OK i have this script http://forums.rrrevolution.com/screenshots/%5B45%5Dffx2screen.JPG
Im going to use it to my game but when i save
And play again, It appears like i didnt save anything
And the savefile appears in the folder..
Can someone edit this or tell me where is the problem....
Heres the script

#=========================================================
# 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 ã,'描ç"»ã™ã,‹ã,¹ãƒšãƒ¼ã,¹ãŒã,ã,‹ã‹è¨ˆç®—
  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 ã,'描ç"»ã™ã,‹ã,¹ãƒšãƒ¼ã,¹ãŒã,ã,‹ã‹è¨ˆç®—
  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
& nbsp;#==========================================================================
====
# â–  Window_Selectable
#------------------------------------------------------------------------------
#  ã,«ãƒ¼ã,½ãƒ«ã®ç§»å‹•ã,,,ã,¹ã,¯ãƒ­ãƒ¼ãƒ«ã®æ©Ÿèƒ½ã,'持つã,¦ã,£ãƒ³ãƒ‰ã,¦ã,¯ãƒ©ã,¹ã§ã™ã€,
#==============================================================================

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
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  if self.active and @help_window != nil
    update_help
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®çŸ©å½¢ã,'æ›´æ–°
  update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
  # é ...目数と列数かã,‰è¡Œæ•°ã,'算出
  return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● å...ˆé ­ã®è¡Œã®å–å¾—
#--------------------------------------------------------------------------
def top_row
  # ã,¦ã,£ãƒ³ãƒ‰ã,¦å†...容の転送å...ƒ Y 座標ã,'、1 行の高さ 32 で割ã,‹
  return self.oy / 32
end
#--------------------------------------------------------------------------
# ● å...ˆé ­ã®è¡Œã®è¨­å®š
#     row : å...ˆé ­ã«è¡¨ç¤ºã™ã,‹è¡Œ
#--------------------------------------------------------------------------
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 座標とすã,‹
  self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ペーã,¸ã«è¡¨ç¤ºã§ãã,‹è¡Œæ•°ã®å–å¾—
#--------------------------------------------------------------------------
def page_row_max
  # ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®é«˜ã•かã,‰ã€ãƒ•レームの高さ 32 ã,'引き、1 行の高さ 32 で割ã,‹
  return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ペーã,¸ã«è¡¨ç¤ºã§ãã,‹é ...目数の取得
#--------------------------------------------------------------------------
def page_item_max
  # 行数 page_row_max に 列数 @column_max ã,'掛ã'ã,‹
  return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã®è¨­å®š
#     help_window : 新しã,,ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦
#--------------------------------------------------------------------------
def help_window=(help_window)
  @help_window = help_window
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  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
  # 現在の行ã,'取得
  row = @index / @column_max
  # 現在の行が、表示さã,Œã¦ã,,ã,‹å...ˆé ­ã®è¡Œã,ˆã,Šå‰ã®å ´åˆ
  if row < self.top_row
    # 現在の行がå...ˆé ­ã«ãªã,‹ã,ˆã†ã«ã,¹ã,¯ãƒ­ãƒ¼ãƒ«
    self.top_row = row
  end
  # 現在の行が、表示さã,Œã¦ã,,ã,‹æœ€å¾Œå°¾ã®è¡Œã,ˆã,Šå¾Œã,ã®å ´åˆ
  if row > self.top_row + (self.page_row_max - 1)
    # 現在の行が最後尾になã,‹ã,ˆã†ã«ã,¹ã,¯ãƒ­ãƒ¼ãƒ«
    self.top_row = row - (self.page_row_max - 1)
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®å¹...ã,'計算
  cursor_width = self.width / @column_max - 32
  # ã,«ãƒ¼ã,½ãƒ«ã®åº§æ¨™ã,'計算
  x = @index % @column_max * (cursor_width + 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
    # æ–¹å'ボã,¿ãƒ³ã®ä¸‹ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::DOWN)
      # 列数が 1 かつ æ–¹å'ボã,¿ãƒ³ã®ä¸‹ã®æŠ¼ä¸‹çжæ...‹ãŒãƒªãƒ"ートでなã,,場合か、
      # またはã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ(é ...目数 - 列数)ã,ˆã,Šå‰ã®å ´åˆ
      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
    # æ–¹å'ボã,¿ãƒ³ã®ä¸ŠãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::UP)
      # 列数が 1 かつ æ–¹å'ボã,¿ãƒ³ã®ä¸Šã®æŠ¼ä¸‹çжæ...‹ãŒãƒªãƒ"ートでなã,,場合か、
      # またはã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒåˆ—æ•°ã,ˆã,Šå¾Œã,ã®å ´åˆ
      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
    # æ–¹å'ボã,¿ãƒ³ã®å³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::RIGHT)
      # 列数が 2 以上で、ã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ(é ...目数 - 1)ã,ˆã,Šå‰ã®å ´åˆ
      if @column_max >= 2 and @index < @item_max - 1
        # ã,«ãƒ¼ã,½ãƒ«ã,'右に移動
        $game_system.se_play($data_system.cursor_se)
        @index += 1
      end
    end
    # æ–¹å'ボã,¿ãƒ³ã®å·¦ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::LEFT)
      # 列数が 2 以上で、ã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ 0 ã,ˆã,Šå¾Œã,ã®å ´åˆ
      if @column_max >= 2 and @index > 0
        # ã,«ãƒ¼ã,½ãƒ«ã,'左に移動
        $game_system.se_play($data_system.cursor_se)
        @index -= 1
      end
    end
    # R ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::R)
      # 表示さã,Œã¦ã,,ã,‹æœ€å¾Œå°¾ã®è¡ŒãŒã€ãƒ‡ãƒ¼ã,¿ä¸Šã®æœ€å¾Œã®è¡Œã,ˆã,Šã,,前の場合
      if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
        # ã,«ãƒ¼ã,½ãƒ«ã,' 1 ペーã,¸å¾Œã,ã«ç§»å‹•
        $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 ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::L)
      # 表示さã,Œã¦ã,,ã,‹å...ˆé ­ã®è¡ŒãŒ 0 ã,ˆã,Šå¾Œã,ã®å ´åˆ
      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
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  if self.active and @help_window != nil
    update_help
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®çŸ©å½¢ã,'æ›´æ–°
  update_cursor_rect
end
end
#==============================================================================
# â–  Window_Menuselectable
#------------------------------------------------------------------------------
#  ã,«ãƒ¼ã,½ãƒ«ã®ç§»å‹•ã,,,ã,¹ã,¯ãƒ­ãƒ¼ãƒ«ã®æ©Ÿèƒ½ã,'持つã,¦ã,£ãƒ³ãƒ‰ã,¦ã,¯ãƒ©ã,¹ã§ã™ã€,
#==============================================================================

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
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  if self.active and @help_window != nil
    update_help
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®çŸ©å½¢ã,'æ›´æ–°
  update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
  # é ...目数と列数かã,‰è¡Œæ•°ã,'算出
  return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● å...ˆé ­ã®è¡Œã®å–å¾—
#--------------------------------------------------------------------------
def top_row
  # ã,¦ã,£ãƒ³ãƒ‰ã,¦å†...容の転送å...ƒ Y 座標ã,'、1 行の高さ 32 で割ã,‹
  return self.oy / 32
end
#--------------------------------------------------------------------------
# ● å...ˆé ­ã®è¡Œã®è¨­å®š
#     row : å...ˆé ­ã«è¡¨ç¤ºã™ã,‹è¡Œ
#--------------------------------------------------------------------------
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 座標とすã,‹
  self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ペーã,¸ã«è¡¨ç¤ºã§ãã,‹è¡Œæ•°ã®å–å¾—
#--------------------------------------------------------------------------
def page_row_max
  # ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®é«˜ã•かã,‰ã€ãƒ•レームの高さ 32 ã,'引き、1 行の高さ 32 で割ã,‹
  return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ペーã,¸ã«è¡¨ç¤ºã§ãã,‹é ...目数の取得
#--------------------------------------------------------------------------
def page_item_max
  # 行数 page_row_max に 列数 @column_max ã,'掛ã'ã,‹
  return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦ã®è¨­å®š
#     help_window : 新しã,,ヘルプã,¦ã,£ãƒ³ãƒ‰ã,¦
#--------------------------------------------------------------------------
def help_window=(help_window)
  @help_window = help_window
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  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
  # 現在の行ã,'取得
  row = @index / @column_max
  # 現在の行が、表示さã,Œã¦ã,,ã,‹å...ˆé ­ã®è¡Œã,ˆã,Šå‰ã®å ´åˆ
  if row < self.top_row
    # 現在の行がå...ˆé ­ã«ãªã,‹ã,ˆã†ã«ã,¹ã,¯ãƒ­ãƒ¼ãƒ«
    self.top_row = row
  end
  # 現在の行が、表示さã,Œã¦ã,,ã,‹æœ€å¾Œå°¾ã®è¡Œã,ˆã,Šå¾Œã,ã®å ´åˆ
  if row > self.top_row + (self.page_row_max - 1)
    # 現在の行が最後尾になã,‹ã,ˆã†ã«ã,¹ã,¯ãƒ­ãƒ¼ãƒ«
    self.top_row = row - (self.page_row_max - 1)
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®å¹...ã,'計算
  cursor_width = self.width / @column_max - 32
  # ã,«ãƒ¼ã,½ãƒ«ã®åº§æ¨™ã,'計算
  x = @index % @column_max * (cursor_width + 32)
  y = @index / @column_max * 40 - self.oy
  # ã,«ãƒ¼ã,½ãƒ«ã®çŸ©å½¢ã,'æ›´
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
  super
  # ã,«ãƒ¼ã,½ãƒ«ã®ç§»å‹•が可能な状æ...‹ã®å ´åˆ
  if self.active and @item_max > 0 and @index >= 0
    # æ–¹å'ボã,¿ãƒ³ã®ä¸‹ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::DOWN)
      # 列数が 1 かつ æ–¹å'ボã,¿ãƒ³ã®ä¸‹ã®æŠ¼ä¸‹çжæ...‹ãŒãƒªãƒ"ートでなã,,場合か、
      # またはã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ(é ...目数 - 列数)ã,ˆã,Šå‰ã®å ´åˆ
      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
    # æ–¹å'ボã,¿ãƒ³ã®ä¸ŠãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::UP)
      # 列数が 1 かつ æ–¹å'ボã,¿ãƒ³ã®ä¸Šã®æŠ¼ä¸‹çжæ...‹ãŒãƒªãƒ"ートでなã,,場合か、
      # またはã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒåˆ—æ•°ã,ˆã,Šå¾Œã,ã®å ´åˆ
      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
    # æ–¹å'ボã,¿ãƒ³ã®å³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::RIGHT)
      # 列数が 2 以上で、ã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ(é ...目数 - 1)ã,ˆã,Šå‰ã®å ´åˆ
      if @column_max >= 2 and @index < @item_max - 1
        # ã,«ãƒ¼ã,½ãƒ«ã,'右に移動
        $game_system.se_play($data_system.cursor_se)
        @index += 1
      end
    end
    # æ–¹å'ボã,¿ãƒ³ã®å·¦ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::LEFT)
      # 列数が 2 以上で、ã,«ãƒ¼ã,½ãƒ«ä½ç½®ãŒ 0 ã,ˆã,Šå¾Œã,ã®å ´åˆ
      if @column_max >= 2 and @index > 0
        # ã,«ãƒ¼ã,½ãƒ«ã,'左に移動
        $game_system.se_play($data_system.cursor_se)
        @index -= 1
      end
    end
    # R ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::R)
      # 表示さã,Œã¦ã,,ã,‹æœ€å¾Œå°¾ã®è¡ŒãŒã€ãƒ‡ãƒ¼ã,¿ä¸Šã®æœ€å¾Œã®è¡Œã,ˆã,Šã,,前の場合
      if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
        # ã,«ãƒ¼ã,½ãƒ«ã,' 1 ペーã,¸å¾Œã,ã«ç§»å‹•
        $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 ボã,¿ãƒ³ãŒæŠ¼ã•ã,ŒãŸå ´åˆ
    if Input.repeat?(Input::L)
      # 表示さã,Œã¦ã,,ã,‹å...ˆé ­ã®è¡ŒãŒ 0 ã,ˆã,Šå¾Œã,ã®å ´åˆ
      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
  # ヘルプテã,­ã,¹ãƒˆã,'æ›´æ–° (update_help は継承å...ˆã§å®šç¾©ã•ã,Œã,‹)
  if self.active and @help_window != nil
    update_help
  end
  # ã,«ãƒ¼ã,½ãƒ«ã®çŸ©å½¢ã,'æ›´æ–°
  update_cursor_rect
end
end
#==============================================================================
# â–  Window_Menucommand
#------------------------------------------------------------------------------
#  一般çš,,なã,³ãƒžãƒ³ãƒ‰é¸æŠžã,'行うã,¦ã,£ãƒ³ãƒ‰ã,¦ã§ã™ã€,
#==============================================================================

class Window_Menucommand < Window_Menuselectable
#--------------------------------------------------------------------------
# ● ã,ªãƒ–ã,¸ã,§ã,¯ãƒˆåˆæœŸåŒ–
#     width    : ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®å¹...
#     commands : ã,³ãƒžãƒ³ãƒ‰æ–‡å­—列のé...åˆ—
#--------------------------------------------------------------------------
def initialize(width, commands)
  # ã,³ãƒžãƒ³ãƒ‰ã®å€‹æ•°ã‹ã,‰ã,¦ã,£ãƒ³ãƒ‰ã,¦ã®é«˜ã•ã,'算出
  super(0, 0, width, commands.size * 32 + 32)
  @item_max = commands.size
  @commands = commands
  self.contents = Bitmap.new(width - 32, @item_max * 32)
  self.contents.font.name = $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
#------------------------------------------------------------------------------
#  ã,¹ã,­ãƒ«ã,,,ã,¢ã,¤ãƒ†ãƒ ã®èª¬æ˜Žã€ã,¢ã,¯ã,¿ãƒ¼ã®ã,¹ãƒ†ãƒ¼ã,¿ã,¹ãªã©ã,'表示すã,‹ã,¦ã,£ãƒ³ãƒ‰ã,¦ã§ã™ã€,
#==============================================================================

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  : ã,¦ã,£ãƒ³ãƒ‰ã,¦ã«è¡¨ç¤ºã™ã,‹æ–‡å­—列
#     align : ã,¢ãƒ©ã,¤ãƒ³ãƒ¡ãƒ³ãƒˆ (0..左揃え、1..中央揃え、2..右揃え)
#--------------------------------------------------------------------------
def set_text(text, align = 0)
  # テã,­ã,¹ãƒˆã¨ã,¢ãƒ©ã,¤ãƒ³ãƒ¡ãƒ³ãƒˆã®å°'なくとã,,一方が前回と違ってã,,ã,‹å ´åˆ
  if text != @text or align != @align
    # テã,­ã,¹ãƒˆã,'再描ç"»
    self.contents.clear
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
    @text = text
    @align = align
    @actor = nil
  end
  self.visible = true
end
#--------------------------------------------------------------------------
# ● ã,¢ã,¯ã,¿ãƒ¼è¨­å®š
#     actor : ã,¹ãƒ†ãƒ¼ã,¿ã,¹ã,'表示すã,‹ã,¢ã,¯ã,¿ãƒ¼
#--------------------------------------------------------------------------
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 : 名前とã,¹ãƒ†ãƒ¼ãƒˆã,'表示すã,‹ã,¨ãƒãƒŸãƒ¼
#--------------------------------------------------------------------------
def set_enemy(enemy)
  text = enemy.name
  state_text = make_battler_state_text(enemy, 112, false)
  if state_text &#


You cant use this script cause you need like 12 files
Title: FF X-2 Menu
Post by: ahref on January 11, 2006, 04:51:45 PM
find the save script within this script and replace it to call the original save screen

oops ignore what i said or dont....oh ill try and fix it later
Title: FF X-2 Menu
Post by: creepy on January 11, 2006, 10:55:43 PM
No more help needed i fix it myself
please close this topic