[Resolved] The FFX-2 Custom Menu System by Catchm

Hellooooo folks!

The script is huge...
  1. #=========================================================
  2. # This is the ffx-2 Custom Menu System by Catchm.
  3. # It is a long script and includes many alterations and images attached to it.
  4. # These images can be edited, and the script can be edited, you are free to do so
  5. # credit to Catchm is the only thing needed.
  6. # this is to be copied into a new script in the script editor
  7. #
  8. # Have fun with the script!
  9. #=========================================================
  10.  
  11. class Bitmap
  12. def draw_text_shadow_rect(rect, text, align = 0)
  13.   self.font.size -= 2
  14.   old_col = self.font.color.clone
  15.   # Dark shadow
  16.   self.font.color = Color.new(0,0,0, 255)
  17.   draw_text(Rect.new(rect.x+1, rect.y+1, rect.width,
  18.     rect.height), text, align)
  19.   # Small outline
  20.   self.font.color = Color.new(96,96,96,96)
  21.   draw_text(Rect.new(rect.x+1, rect.y, rect.width,
  22.     rect.height), text, align)
  23.   draw_text(Rect.new(rect.x-1, rect.y, rect.width,
  24.     rect.height), text, align)
  25.   draw_text(Rect.new(rect.x, rect.y-1, rect.width,
  26.     rect.height), text, align)
  27.   draw_text(Rect.new(rect.x, rect.y+1, rect.width,
  28.     rect.height), text, align)
  29.   # Normal text
  30.   self.font.color = old_col
  31.   draw_text(rect, text, align)
  32.   self.font.size += 2
  33. end
  34. def draw_text_shadow(x, y, wid, hei, text, align = 0)
  35.   self.font.size -= 2
  36.   old_col = self.font.color.clone
  37.   # Dark shadow
  38.   self.font.color = Color.new(0,0,0, 255)
  39.   draw_text(x+1,y+1,wid,hei,text, align)
  40.   # Small outline
  41.   self.font.color = Color.new(96,96,96,96)
  42.   draw_text(x+1,y,wid,hei,text, align)
  43.   draw_text(x+2,y,wid,hei,text, align)
  44.   draw_text(x+2,y,wid,hei,text, align)
  45.   draw_text(x,y-1,wid,hei,text, align)
  46.   draw_text(x,y+1,wid,hei,text, align)
  47.   draw_text(x,y+2,wid,hei,text, align)
  48.   # Normal
  49.   self.font.color = old_col
  50.   draw_text(x,y,wid,hei,text, align)
  51.   self.font.size += 2
  52. end
  53. def draw_text_outline(x, y, wid, hei, text, align = 0)
  54.   self.font.color = Color.new(0, 0, 0, 255)
  55.     draw_text(x + 1,y + 1,wid,hei,text, align)
  56.     draw_text(x + 1,y - 1,wid,hei,text, align)
  57.     draw_text(x - 1,y - 1,wid,hei,text, align)
  58.     draw_text(x - 1,y + 1,wid,hei,text, align)
  59.    self.font.color = Color.new(255, 255, 255, 255)
  60.     draw_text(x,y,wid,hei,text, align)
  61.   end
  62. def draw_text_outline2(x, y, wid, hei, text, align = 0)
  63.   self.font.color = Color.new(0, 0, 0, 255)
  64.     draw_text(x + 1,y + 1,wid,hei,text, align)
  65.     draw_text(x + 1,y - 1,wid,hei,text, align)
  66.     draw_text(x - 1,y - 1,wid,hei,text, align)
  67.     draw_text(x - 1,y + 1,wid,hei,text, align)
  68.    self.font.color = Color.new(255, 255, 255, 200)
  69.     draw_text(x,y,wid,hei,text, align)
  70.   end
  71.   def draw_text_outline3(x, y, wid, hei, text, align = 0)
  72.   self.font.color = Color.new(0, 0, 0, 255)
  73.     draw_text(x + 1,y + 1,wid,hei,text, align)
  74.     draw_text(x + 1,y - 1,wid,hei,text, align)
  75.     draw_text(x - 1,y - 1,wid,hei,text, align)
  76.     draw_text(x - 1,y + 1,wid,hei,text, align)
  77.    self.font.color = Color.new(192, 224, 255, 255)
  78.     draw_text(x,y,wid,hei,text, align)
  79.   end
  80.   def draw_text_outline4(x, y, wid, hei, text, align = 0)
  81.   self.font.color = Color.new(0, 0, 0, 190)
  82.     draw_text(x + 1,y + 1,wid,hei,text, align)
  83.     draw_text(x + 1,y - 1,wid,hei,text, align)
  84.     draw_text(x - 1,y - 1,wid,hei,text, align)
  85.     draw_text(x - 1,y + 1,wid,hei,text, align)
  86.    self.font.color = Color.new(255, 255, 255, 255)
  87.     draw_text(x,y,wid,hei,text, align)
  88.   end
  89. end
  90. class Window_Base < Window
  91.   #=====================================
  92.   # Gradient Bars , thanks to Acedent Prone
  93.   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))
  94.    if type == "horizontal"
  95.      width = length
  96.      height = thick
  97.      self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
  98.      self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
  99.      w = width * e1 / e2
  100.      for i in 0..height
  101.      r = c1.red + (c2.red - c1.red)   * (height -i)/height  + 0   * i/height
  102.      g = c1.green + (c2.green - c1.green) * (height -i)/height  + 0 * i/height
  103.      b = c1.blue + (c2.blue - c1.blue)  * (height -i)/height  + 0 * i/height
  104.      a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height  + 255 * i/height
  105.      self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
  106.    end
  107.  elsif type == "vertical"
  108.    width = thick
  109.    height = length
  110.      self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
  111.      self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
  112.    h = height * e1 / e2
  113.    for i in 0..width
  114.      r = c1.red + (c2.red - c1.red)   * (width -i)/width  + 0   * i/width
  115.      g = c1.green + (c2.green - c1.green) * (width -i)/width  + 0 * i/width
  116.      b = c1.blue + (c2.blue - c1.blue)  * (width -i)/width  + 0 * i/width
  117.      a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width  + 255 * i/width
  118.      self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
  119.    end
  120.  end
  121. end
  122. 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))
  123.    if type == "horizontal"
  124.      width = length
  125.      height = thick
  126.      self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(0, 0, 0, 255))
  127.      self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
  128.      w = width * e1 / e2
  129.      for i in 0..height
  130.      r = c1.red + (c2.red - c1.red)   * (height -i)/height  + 0   * i/height
  131.      g = c1.green + (c2.green - c1.green) * (height -i)/height  + 0 * i/height
  132.      b = c1.blue + (c2.blue - c1.blue)  * (height -i)/height  + 0 * i/height
  133.      a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height  + 255 * i/height
  134.      self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
  135.    end
  136.  elsif type == "vertical"
  137.    width = thick
  138.    height = length
  139.      self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
  140.      self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
  141.    h = height * e1 / e2
  142.    for i in 0..width
  143.      r = c1.red + (c2.red - c1.red)   * (width -i)/width  + 0   * i/width
  144.      g = c1.green + (c2.green - c1.green) * (width -i)/width  + 0 * i/width
  145.      b = c1.blue + (c2.blue - c1.blue)  * (width -i)/width  + 0 * i/width
  146.      a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width  + 255 * i/width
  147.      self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
  148.    end
  149.  end
  150. end
  151.   #=====================================
  152.   # New definitions
  153.   def draw_battlegraphic(actor, x, y)
  154.   bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
  155.   cw = bitmap.width
  156.   ch = bitmap.height
  157.   src_rect = Rect.new(0, 0, cw, ch)
  158.   self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  159. end
  160. #======================================
  161.     def draw_actor_statuswindow(actor, x, y)
  162.      bitmap = RPG::Cache.picture(actor.character_name, actor.character_hue)
  163.     cw = bitmap.width / 4
  164.     ch = bitmap.height / 4
  165.     src_rect = Rect.new(0, 0, cw, ch)
  166.     self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  167.   end
  168.   #=====================================
  169.   def draw_actor_face(actor, x, y)
  170.   face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
  171.   fw = face.width
  172.   fh = face.height
  173.   src_rect = Rect.new(0, 0, fw, fh)
  174.   self.contents.blt(x - fw / 23, y - fh, face, src_rect)
  175. end
  176.   #=====================================
  177.   def draw_actor_name2(actor, x, y)
  178.     self.contents.font.name = $fontface
  179.     self.contents.font.color = outline_color
  180.     self.contents.draw_text(x - 1, y - 1, 120, 32, actor.name)
  181.     self.contents.draw_text(x + 1, y - 1, 120, 32, actor.name)
  182.     self.contents.draw_text(x + 1, y + 1, 120, 32, actor.name)
  183.     self.contents.draw_text(x - 1, y + 1, 120, 32, actor.name)
  184.     self.contents.font.color = normal_color
  185.     self.contents.draw_text(x, y, 120, 32, actor.name)
  186.   end
  187.   #=====================================
  188.   def draw_actor_level2(actor, x, y)
  189.     self.contents.font.name = $fontface
  190.     self.contents.font.color = outline_color
  191.     self.contents.draw_text(x - 1, y - 1, 32, 32, "Lv")
  192.     self.contents.draw_text(x - 1, y + 1, 32, 32, "Lv")
  193.     self.contents.draw_text(x + 1, y - 1, 32, 32, "Lv")
  194.     self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")
  195.     self.contents.font.color = Color.new(254, 230, 159, 255)
  196.     self.contents.draw_text(x, y, 32, 32, "Lv")
  197.     self.contents.font.color = outline_color
  198.     self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 2)
  199.     self.contents.draw_text(x + 31, y - 1, 24, 32, actor.level.to_s, 2)
  200.     self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
  201.     self.contents.draw_text(x + 33, y - 1, 24, 32, actor.level.to_s, 2)
  202.     self.contents.font.color = normal_color
  203.     self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
  204.   end
  205.   #=====================================
  206.   def draw_actor_class2(actor, x, y)
  207.     self.contents.font.name = "Black Chancery"
  208.     self.contents.font.color = outline_color
  209.     self.contents.draw_text(x + 1, y + 1, 236, 32, actor.class_name)
  210.     self.contents.draw_text(x + 1, y - 1, 236, 32, actor.class_name)
  211.     self.contents.draw_text(x - 1, y + 1, 236, 32, actor.class_name)
  212.     self.contents.draw_text(x - 1, y - 1, 236, 32, actor.class_name)
  213.     self.contents.font.color = Color.new(238, 139, 254, 255)
  214.     self.contents.draw_text(x, y, 236, 32, actor.class_name)
  215.   end
  216.   #======================================
  217.   def draw_actor_hp2(actor, x, y, width = 144)
  218.     self.contents.font.name = "Tahoma"
  219.     # 譁・-怜・ "HP" 繧呈緒逕サ
  220.     self.contents.font.size = 24
  221.     self.contents.font.color = outline_color
  222.     self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.hp)
  223.     self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.hp)
  224.     self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.hp)
  225.     self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.hp)
  226.     self.contents.font.color = Color.new(254, 238, 189, 255)
  227.     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  228.     # MaxHP 繧呈緒逕サ縺吶k繧ケ繝壹・繧ケ縺後≠繧九°險育ョ・
  229.     if width - 32 >= 108
  230.       hp_x = x + width - 108
  231.       flag = true
  232.     elsif width - 32 >= 48
  233.       hp_x = x + width - 48
  234.       flag = false
  235.     end
  236.     # HP 繧呈緒逕サ
  237.        self.contents.font.name = $fontface
  238.        self.contents.font.size = $fontsize
  239.        self.contents.font.color = outline_color
  240.        self.contents.draw_text(hp_x - 1, y - 1, 48, 32, actor.hp.to_s, 2)
  241.        self.contents.draw_text(hp_x - 1, y + 1, 48, 32, actor.hp.to_s, 2)
  242.        self.contents.draw_text(hp_x + 1, y + 1, 48, 32, actor.hp.to_s, 2)
  243.        self.contents.draw_text(hp_x + 1, y - 1, 48, 32, actor.hp.to_s, 2)
  244.     self.contents.font.color = actor.hp == 0 ? knockout_color :
  245.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  246.     self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  247.     # MaxHP 繧呈緒逕サ
  248.     if flag
  249.       self.contents.font.color = outline_color
  250.       self.contents.draw_text(hp_x + 60 - 1, y - 1, 48, 32, actor.maxhp.to_s)
  251.       self.contents.draw_text(hp_x + 60 - 1, y + 1, 48, 32, actor.maxhp.to_s)
  252.       self.contents.draw_text(hp_x + 60 + 1, y - 1, 48, 32, actor.maxhp.to_s)
  253.       self.contents.draw_text(hp_x + 60 + 1, y + 1, 48, 32, actor.maxhp.to_s)
  254.       self.contents.draw_text(hp_x + 48 - 1, y - 1, 12, 32, "/", 1)
  255.       self.contents.draw_text(hp_x + 48 + 1, y + 1, 12, 32, "/", 1)
  256.       self.contents.draw_text(hp_x + 48 - 1, y + 1, 12, 32, "/", 1)
  257.       self.contents.draw_text(hp_x + 48 + 1, y - 1, 12, 32, "/", 1)
  258.       self.contents.font.color = normal_color
  259.       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  260.       self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  261.     end
  262.   end
  263.   #============================================
  264.   def draw_actor_sp2(actor, x, y, width = 144)
  265.     self.contents.font.name = "Tahoma"
  266.     # 譁・-怜・ "SP" 繧呈緒逕サ
  267.     self.contents.font.size = 24
  268.     self.contents.font.color = outline_color
  269.     self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.sp)
  270.     self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.sp)
  271.     self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.sp)
  272.     self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.sp)
  273.     self.contents.font.color = Color.new(74, 230, 51, 225)
  274.     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  275.     # MaxSP 繧呈緒逕サ縺吶k繧ケ繝壹・繧ケ縺後≠繧九°險育ョ・
  276.     if width - 32 >= 108
  277.       sp_x = x + width - 108
  278.       flag = true
  279.     elsif width - 32 >= 48
  280.       sp_x = x + width - 48
  281.       flag = false
  282.     end
  283.     # SP 繧呈緒逕サ
  284.     self.contents.font.name = $fontface
  285.     self.contents.font.size = $fontsize
  286.     self.contents.font.color = outline_color
  287.     self.contents.draw_text(sp_x - 1, y - 1, 48, 32, actor.sp.to_s, 2)
  288.     self.contents.draw_text(sp_x - 1, y + 1, 48, 32, actor.sp.to_s, 2)
  289.     self.contents.draw_text(sp_x + 1, y - 1, 48, 32, actor.sp.to_s, 2)
  290.     self.contents.draw_text(sp_x + 1, y + 1, 48, 32, actor.sp.to_s, 2)
  291.     self.contents.font.color = actor.sp == 0 ? knockout_color :
  292.       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  293.     self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  294.     # MaxSP 繧呈緒逕サ
  295.     if flag
  296.       self.contents.font.color = outline_color
  297.       self.contents.draw_text(sp_x + 60 - 1, y - 1, 48, 32, actor.maxsp.to_s)
  298.       self.contents.draw_text(sp_x + 60 - 1, y + 1, 48, 32, actor.maxsp.to_s)
  299.       self.contents.draw_text(sp_x + 60 + 1, y + 1, 48, 32, actor.maxsp.to_s)
  300.       self.contents.draw_text(sp_x + 60 + 1, y - 1, 48, 32, actor.maxsp.to_s)
  301.       self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
  302.       self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
  303.       self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
  304.       self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
  305.       self.contents.font.color = normal_color
  306.       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  307.       self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  308.     end
  309.   end
  310.   #=========================================
  311.   def draw_actor_state2(actor, x, y, width = 120)
  312.     self.contents.font.name = $fontface
  313.     text = make_battler_state_text(actor, width, true)
  314.     self.contents.font.color = outline_color
  315.     self.contents.draw_text(x - 1, y - 1, width, 32, text)
  316.     self.contents.draw_text(x - 1, y + 1, width, 32, text)
  317.     self.contents.draw_text(x + 1, y + 1, width, 32, text)
  318.     self.contents.draw_text(x + 1, y - 1, width, 32, text)
  319.     self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  320.     self.contents.draw_text(x, y, width, 32, text)
  321.   end
  322.     #=====================================
  323.   def draw_actor_parameter2(actor, x, y, type)
  324.     case type
  325.     when 0
  326.       parameter_name = $data_system.words.atk
  327.       parameter_value = actor.atk
  328.     when 1
  329.       parameter_name = $data_system.words.pdef
  330.       parameter_value = actor.pdef
  331.     when 2
  332.       parameter_name = "Magic Def"
  333.       parameter_value = actor.mdef
  334.     when 3
  335.       parameter_name = $data_system.words.str
  336.       parameter_value = actor.str
  337.     when 4
  338.       parameter_name = $data_system.words.dex
  339.       parameter_value = actor.dex
  340.     when 5
  341.       parameter_name = $data_system.words.agi
  342.       parameter_value = actor.agi
  343.     when 6
  344.       parameter_name = $data_system.words.int
  345.       parameter_value = actor.int
  346.     end
  347.     self.contents.font.color = system_color
  348.     self.contents.draw_text_outline(x, y, 120, 32, parameter_name)
  349.     self.contents.font.color = normal_color
  350.     self.contents.draw_text_outline(x + 130, y, 36, 32, parameter_value.to_s, 2)
  351.   end
  352.   #=========================================
  353.   def draw_item_name2(item, x, y)
  354.     if item == nil
  355.        self.contents.draw_text_outline(x + 28, y, 212, 32, "EMPTY")
  356.       return
  357.     end
  358.     bitmap = RPG::Cache.icon(item.icon_name)
  359.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  360.     self.contents.draw_text_outline(x + 28, y, 212, 32, item.name)
  361.   end
  362.    # New colour for outlining text - Black
  363.   def outline_color
  364.    return Color.new(0, 0, 0, 255)
  365.  end
  366.   end
  367.   #==============================================================================
  368. # 笆  Window_Selectable
  369. #------------------------------------------------------------------------------
  370. # 縲€繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔d繧ケ繧ッ繝-繝シ繝ォ縺ョ讖溯・繧呈戟縺、繧ヲ繧」繝ウ繝峨え繧ッ繝ゥ繧ケ縺ァ縺吶€・
  371. #==============================================================================
  372.  
  373. class Window_Itemselectable < Window_Base
  374.   #--------------------------------------------------------------------------
  375.   # 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
  376.   #--------------------------------------------------------------------------
  377.   attr_reader   :index                    # 繧ォ繝シ繧ス繝ォ菴咲スョ
  378.   attr_reader   :help_window              # 繝倥Ν繝励え繧」繝ウ繝峨え
  379.   #--------------------------------------------------------------------------
  380.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  381.   #     x      : 繧ヲ繧」繝ウ繝峨え縺ョ X 蠎ァ讓・
  382.   #     y      : 繧ヲ繧」繝ウ繝峨え縺ョ Y 蠎ァ讓・
  383.   #     width  : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
  384.   #     height : 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&
  385.   #--------------------------------------------------------------------------
  386.   def initialize(x, y, width, height)
  387.     super(x, y, width, height)
  388.     @item_max = 1
  389.     @column_max = 1
  390.     @index = -1
  391.   end
  392.   #--------------------------------------------------------------------------
  393.   # 笳・繧ォ繝シ繧ス繝ォ菴咲スョ縺ョ險-螳・
  394.   #     index : 譁ー縺励>繧ォ繝シ繧ス繝ォ菴咲スョ
  395.   #--------------------------------------------------------------------------
  396.   def index=(index)
  397.     @index = index
  398.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  399.     if self.active and @help_window != nil
  400.       update_help
  401.     end
  402.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  403.     update_cursor_rect
  404.   end
  405.   #--------------------------------------------------------------------------
  406.   # 笳・陦梧焚縺ョ蜿門セ・
  407.   #--------------------------------------------------------------------------
  408.   def row_max
  409.     # ・・岼謨ー縺ィ蛻玲焚縺九i陦梧焚繧堤ョ怜・
  410.     return (@item_max + @column_max - 1) / @column_max
  411.   end
  412.   #--------------------------------------------------------------------------
  413.   # 笳・蜈磯 -縺ョ陦後・蜿門セ・
  414.   #--------------------------------------------------------------------------
  415.   def top_row
  416.     # 繧ヲ繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶r縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
  417.     return self.oy / 32
  418.   end
  419.   #--------------------------------------------------------------------------
  420.   # 笳・蜈磯 -縺ョ陦後・險-螳・
  421.   #     row : 蜈磯 -縺ォ陦ィ遉コ縺吶k陦・
  422.   #--------------------------------------------------------------------------
  423.   def top_row=(row)
  424.     # row 縺・0 譛ェ貅€縺ョ・エ蜷医・ 0 縺ォ菫ョ・」
  425.     if row < 0
  426.       row = 0
  427.     end
  428.     # row 縺・row_max - 1 雜・・・エ蜷医・ row_max - 1 縺ォ菫ョ・」
  429.     if row > row_max - 1
  430.       row = row_max - 1
  431.     end
  432.     # row 縺ォ 1 陦後・鬮倥& 32 繧呈寺縺代€√え繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶→縺吶k
  433.     self.oy = row * 32
  434.   end
  435.   #--------------------------------------------------------------------------
  436.   # 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k陦梧焚縺ョ蜿門セ・
  437.   #--------------------------------------------------------------------------
  438.   def page_row_max
  439.     # 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&縺九i縲√ヵ繝ャ繝シ繝 縺ョ鬮倥& 32 繧貞シ輔″縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
  440.     return (self.height - 32) / 32
  441.   end
  442.   #--------------------------------------------------------------------------
  443.   # 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k・・岼謨ー縺ョ蜿門セ・
  444.   #--------------------------------------------------------------------------
  445.   def page_item_max
  446.     # 陦梧焚 page_row_max 縺ォ 蛻玲焚 @column_max 繧呈寺縺代k
  447.     return page_row_max * @column_max
  448.   end
  449.   #--------------------------------------------------------------------------
  450.   # 笳・繝倥Ν繝励え繧」繝ウ繝峨え縺ョ險-螳・
  451.   #     help_window : 譁ー縺励>繝倥Ν繝励え繧」繝ウ繝峨え
  452.   #--------------------------------------------------------------------------
  453.   def help_window=(help_window)
  454.     @help_window = help_window
  455.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  456.     if self.active and @help_window != nil
  457.       update_help
  458.     end
  459.   end
  460.   #--------------------------------------------------------------------------
  461.   # 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
  462.   #--------------------------------------------------------------------------
  463.   def update_cursor_rect
  464.     # 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅€縺ョ・エ蜷・
  465.     if @index < 0
  466.       self.cursor_rect.empty
  467.       return
  468.     end
  469.     # 迴セ蝨ィ縺ョ陦後r蜿門セ・
  470.     row = @index / @column_max
  471.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
  472.     if row < self.top_row
  473.       # 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  474.       self.top_row = row
  475.     end
  476.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛€蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
  477.     if row > self.top_row + (self.page_row_max - 1)
  478.       # 迴セ蝨ィ縺ョ陦後′譛€蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  479.       self.top_row = row - (self.page_row_max - 1)
  480.     end
  481.     # 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
  482.     cursor_width = self.width / @column_max - 32
  483.     # 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
  484.     x = @index % @column_max * (cursor_width + 6) + 10
  485.     y = @index / @column_max * 32 - self.oy
  486.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  487.     self.cursor_rect.set(x, y, cursor_width, 32)
  488.   end
  489.   #--------------------------------------------------------------------------
  490.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  491.   #--------------------------------------------------------------------------
  492.   def update
  493.     super
  494.     # 繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔′蜿ッ閭ス縺ェ迥カ諷九・・エ蜷・
  495.     if self.active and @item_max > 0 and @index >= 0
  496.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
  497.       if Input.repeat?(Input::DOWN)
  498.         # 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  499.         # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 蛻玲焚)繧医j蜑阪・・エ蜷・
  500.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  501.            @index < @item_max - @column_max
  502.           # 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
  503.           $game_system.se_play($data_system.cursor_se)
  504.           @index = (@index + @column_max) % @item_max
  505.         end
  506.       end
  507.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
  508.       if Input.repeat?(Input::UP)
  509.         # 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  510.         # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺悟・謨ー繧医j蠕後m縺ョ・エ蜷・
  511.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  512.            @index >= @column_max
  513.           # 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
  514.           $game_system.se_play($data_system.cursor_se)
  515.           @index = (@index - @column_max + @item_max) % @item_max
  516.         end
  517.       end
  518.       # 譁ケ蜷代・繧ソ繝ウ縺ョ蜿ウ縺梧款縺輔l縺溷 エ蜷・
  519.       if Input.repeat?(Input::RIGHT)
  520.         # 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 1)繧医j蜑阪・・エ蜷・
  521.         if @column_max >= 2 and @index < @item_max - 1
  522.           # 繧ォ繝シ繧ス繝ォ繧貞承縺ォ遘サ蜍・
  523.           $game_system.se_play($data_system.cursor_se)
  524.           @index += 1
  525.         end
  526.       end
  527.       # 譁ケ蜷代・繧ソ繝ウ縺ョ蟾ヲ縺梧款縺輔l縺溷 エ蜷・
  528.       if Input.repeat?(Input::LEFT)
  529.         # 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
  530.         if @column_max >= 2 and @index > 0
  531.           # 繧ォ繝シ繧ス繝ォ繧貞キヲ縺ォ遘サ蜍・
  532.           $game_system.se_play($data_system.cursor_se)
  533.           @index -= 1
  534.         end
  535.       end
  536.       # R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  537.       if Input.repeat?(Input::R)
  538.         # 陦ィ遉コ縺輔l縺ヲ縺・k譛€蠕悟ーセ縺ョ陦後′縲√ョ繝シ繧ソ荳翫・譛€蠕後・陦後h繧翫b蜑阪・・エ蜷・
  539.         if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  540.           # 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蠕後m縺ォ遘サ蜍・
  541.           $game_system.se_play($data_system.cursor_se)
  542.           @index = [@index + self.page_item_max, @item_max - 1].min
  543.           self.top_row += self.page_row_max
  544.         end
  545.       end
  546.       # L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  547.       if Input.repeat?(Input::L)
  548.         # 陦ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後′ 0 繧医j蠕後m縺ョ・エ蜷・
  549.         if self.top_row > 0
  550.           # 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蜑阪↓遘サ蜍・
  551.           $game_system.se_play($data_system.cursor_se)
  552.           @index = [@index - self.page_item_max, 0].max
  553.           self.top_row -= self.page_row_max
  554.         end
  555.       end
  556.     end
  557.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  558.     if self.active and @help_window != nil
  559.       update_help
  560.     end
  561.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  562.     update_cursor_rect
  563.   end
  564. end
  565. #==============================================================================
  566. # 笆  Window_Menuselectable
  567. #------------------------------------------------------------------------------
  568. # 縲€繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔d繧ケ繧ッ繝-繝シ繝ォ縺ョ讖溯・繧呈戟縺、繧ヲ繧」繝ウ繝峨え繧ッ繝ゥ繧ケ縺ァ縺吶€・
  569. #==============================================================================
  570.  
  571. class Window_Menuselectable < Window_Base
  572.   #--------------------------------------------------------------------------
  573.   # 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
  574.   #--------------------------------------------------------------------------
  575.   attr_reader   :index                    # 繧ォ繝シ繧ス繝ォ菴咲スョ
  576.   attr_reader   :help_window              # 繝倥Ν繝励え繧」繝ウ繝峨え
  577.   #--------------------------------------------------------------------------
  578.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  579.   #     x      : 繧ヲ繧」繝ウ繝峨え縺ョ X 蠎ァ讓・
  580.   #     y      : 繧ヲ繧」繝ウ繝峨え縺ョ Y 蠎ァ讓・
  581.   #     width  : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
  582.   #     height : 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&
  583.   #--------------------------------------------------------------------------
  584.   def initialize(x, y, width, height)
  585.     super(x, y, width, height)
  586.     @item_max = 1
  587.     @column_max = 1
  588.     @index = -1
  589.   end
  590.   #--------------------------------------------------------------------------
  591.   # 笳・繧ォ繝シ繧ス繝ォ菴咲スョ縺ョ險-螳・
  592.   #     index : 譁ー縺励>繧ォ繝シ繧ス繝ォ菴咲スョ
  593.   #--------------------------------------------------------------------------
  594.   def index=(index)
  595.     @index = index
  596.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  597.     if self.active and @help_window != nil
  598.       update_help
  599.     end
  600.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  601.     update_cursor_rect
  602.   end
  603.   #--------------------------------------------------------------------------
  604.   # 笳・陦梧焚縺ョ蜿門セ・
  605.   #--------------------------------------------------------------------------
  606.   def row_max
  607.     # ・・岼謨ー縺ィ蛻玲焚縺九i陦梧焚繧堤ョ怜・
  608.     return (@item_max + @column_max - 1) / @column_max
  609.   end
  610.   #--------------------------------------------------------------------------
  611.   # 笳・蜈磯 -縺ョ陦後・蜿門セ・
  612.   #--------------------------------------------------------------------------
  613.   def top_row
  614.     # 繧ヲ繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶r縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
  615.     return self.oy / 32
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # 笳・蜈磯 -縺ョ陦後・險-螳・
  619.   #     row : 蜈磯 -縺ォ陦ィ遉コ縺吶k陦・
  620.   #--------------------------------------------------------------------------
  621.   def top_row=(row)
  622.     # row 縺・0 譛ェ貅€縺ョ・エ蜷医・ 0 縺ォ菫ョ・」
  623.     if row < 0
  624.       row = 0
  625.     end
  626.     # row 縺・row_max - 1 雜・・・エ蜷医・ row_max - 1 縺ォ菫ョ・」
  627.     if row > row_max - 1
  628.       row = row_max - 1
  629.     end
  630.     # row 縺ォ 1 陦後・鬮倥& 32 繧呈寺縺代€√え繧」繝ウ繝峨え蜀・ョケ縺ョ霆「騾∝・ Y 蠎ァ讓吶→縺吶k
  631.     self.oy = row * 32
  632.   end
  633.   #--------------------------------------------------------------------------
  634.   # 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k陦梧焚縺ョ蜿門セ・
  635.   #--------------------------------------------------------------------------
  636.   def page_row_max
  637.     # 繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&縺九i縲√ヵ繝ャ繝シ繝 縺ョ鬮倥& 32 繧貞シ輔″縲・ 陦後・鬮倥& 32 縺ァ蜑イ繧・
  638.     return (self.height - 32) / 32
  639.   end
  640.   #--------------------------------------------------------------------------
  641.   # 笳・1 繝壹・繧ク縺ォ陦ィ遉コ縺ァ縺阪k・・岼謨ー縺ョ蜿門セ・
  642.   #--------------------------------------------------------------------------
  643.   def page_item_max
  644.     # 陦梧焚 page_row_max 縺ォ 蛻玲焚 @column_max 繧呈寺縺代k
  645.     return page_row_max * @column_max
  646.   end
  647.   #--------------------------------------------------------------------------
  648.   # 笳・繝倥Ν繝励え繧」繝ウ繝峨え縺ョ險-螳・
  649.   #     help_window : 譁ー縺励>繝倥Ν繝励え繧」繝ウ繝峨え
  650.   #--------------------------------------------------------------------------
  651.   def help_window=(help_window)
  652.     @help_window = help_window
  653.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  654.     if self.active and @help_window != nil
  655.       update_help
  656.     end
  657.   end
  658.   #--------------------------------------------------------------------------
  659.   # 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
  660.   #--------------------------------------------------------------------------
  661.   def update_cursor_rect
  662.     # 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅€縺ョ・エ蜷・
  663.     if @index < 0
  664.       self.cursor_rect.empty
  665.       return
  666.     end
  667.     # 迴セ蝨ィ縺ョ陦後r蜿門セ・
  668.     row = @index / @column_max
  669.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
  670.     if row < self.top_row
  671.       # 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  672.       self.top_row = row
  673.     end
  674.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛€蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
  675.     if row > self.top_row + (self.page_row_max - 1)
  676.       # 迴セ蝨ィ縺ョ陦後′譛€蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  677.       self.top_row = row - (self.page_row_max - 1)
  678.     end
  679.     # 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
  680.     cursor_width = self.width / @column_max - 32
  681.     # 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
  682.     x = @index % @column_max * (cursor_width + 32)
  683.     y = @index / @column_max * 40 - self.oy
  684.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩
  685.   end
  686.   #--------------------------------------------------------------------------
  687.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  688.   #--------------------------------------------------------------------------
  689.   def update
  690.     super
  691.     # 繧ォ繝シ繧ス繝ォ縺ョ遘サ蜍輔′蜿ッ閭ス縺ェ迥カ諷九・・エ蜷・
  692.     if self.active and @item_max > 0 and @index >= 0
  693.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
  694.       if Input.repeat?(Input::DOWN)
  695.         # 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  696.         # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 蛻玲焚)繧医j蜑阪・・エ蜷・
  697.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  698.            @index < @item_max - @column_max
  699.           # 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
  700.           $game_system.se_play($data_system.cursor_se)
  701.           @index = (@index + @column_max) % @item_max
  702.         end
  703.       end
  704.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
  705.       if Input.repeat?(Input::UP)
  706.         # 蛻玲焚縺・1 縺九▽ 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  707.         # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺悟・謨ー繧医j蠕後m縺ョ・エ蜷・
  708.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  709.            @index >= @column_max
  710.           # 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
  711.           $game_system.se_play($data_system.cursor_se)
  712.           @index = (@index - @column_max + @item_max) % @item_max
  713.         end
  714.       end
  715.       # 譁ケ蜷代・繧ソ繝ウ縺ョ蜿ウ縺梧款縺輔l縺溷 エ蜷・
  716.       if Input.repeat?(Input::RIGHT)
  717.         # 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・・・岼謨ー - 1)繧医j蜑阪・・エ蜷・
  718.         if @column_max >= 2 and @index < @item_max - 1
  719.           # 繧ォ繝シ繧ス繝ォ繧貞承縺ォ遘サ蜍・
  720.           $game_system.se_play($data_system.cursor_se)
  721.           @index += 1
  722.         end
  723.       end
  724.       # 譁ケ蜷代・繧ソ繝ウ縺ョ蟾ヲ縺梧款縺輔l縺溷 エ蜷・
  725.       if Input.repeat?(Input::LEFT)
  726.         # 蛻玲焚縺・2 莉・荳翫〒縲√き繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
  727.         if @column_max >= 2 and @index > 0
  728.           # 繧ォ繝シ繧ス繝ォ繧貞キヲ縺ォ遘サ蜍・
  729.           $game_system.se_play($data_system.cursor_se)
  730.           @index -= 1
  731.         end
  732.       end
  733.       # R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  734.       if Input.repeat?(Input::R)
  735.         # 陦ィ遉コ縺輔l縺ヲ縺・k譛€蠕悟ーセ縺ョ陦後′縲√ョ繝シ繧ソ荳翫・譛€蠕後・陦後h繧翫b蜑阪・・エ蜷・
  736.         if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
  737.           # 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蠕後m縺ォ遘サ蜍・
  738.           $game_system.se_play($data_system.cursor_se)
  739.           @index = [@index + self.page_item_max, @item_max - 1].min
  740.           self.top_row += self.page_row_max
  741.         end
  742.       end
  743.       # L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  744.       if Input.repeat?(Input::L)
  745.         # 陦ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後′ 0 繧医j蠕後m縺ョ・エ蜷・
  746.         if self.top_row > 0
  747.           # 繧ォ繝シ繧ス繝ォ繧・1 繝壹・繧ク蜑阪↓遘サ蜍・
  748.           $game_system.se_play($data_system.cursor_se)
  749.           @index = [@index - self.page_item_max, 0].max
  750.           self.top_row -= self.page_row_max
  751.         end
  752.       end
  753.     end
  754.     # 繝倥Ν繝励ユ繧-繧ケ繝医r譖エ譁ー (update_help 縺ッ邯呎価蜈医〒螳夂セゥ縺輔l繧・
  755.     if self.active and @help_window != nil
  756.       update_help
  757.     end
  758.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  759.     update_cursor_rect
  760.   end
  761. end
  762. #==============================================================================
  763. # 笆  Window_Menucommand
  764. #------------------------------------------------------------------------------
  765. # 縲€荳€闊ャ逧・↑繧ウ繝槭Φ繝蛾∈謚槭r陦後≧繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  766. #==============================================================================
  767.  
  768. class Window_Menucommand < Window_Menuselectable
  769.   #--------------------------------------------------------------------------
  770.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  771.   #     width    : 繧ヲ繧」繝ウ繝峨え縺ョ蟷・
  772.   #     commands : 繧ウ繝槭Φ繝画枚・怜・縺ョ驟榊・
  773.   #--------------------------------------------------------------------------
  774.   def refresh(width, commands)
  775.     # 繧ウ繝槭Φ繝峨・蛟区焚縺九i繧ヲ繧」繝ウ繝峨え縺ョ鬮倥&繧堤ョ怜・
  776.     super(0, 0, width, commands.size * 32 + 32)
  777.     @item_max = commands.size
  778.     @commands = commands
  779.     self.contents = Bitmap.new(width - 32, @item_max * 32)
  780.     self.contents.font.name = $fontface
  781.     self.contents.font.size = $fontsize
  782.     refresh
  783.     self.index = 0
  784.   end
  785.   #--------------------------------------------------------------------------
  786.   # 笳・繝ェ繝輔Ξ繝・す繝・
  787.   #--------------------------------------------------------------------------
  788.   def refresh
  789.     self.contents.clear
  790.     for i in 0...@item_max
  791.       draw_item(i, normal_color)
  792.     end
  793.   end
  794.   #--------------------------------------------------------------------------
  795.   # 笳・・・岼縺ョ謠冗判
  796.   #     index : ・・岼逡ェ蜿キ
  797.   #     color : 譁・-苓牡
  798.   #--------------------------------------------------------------------------
  799.   def draw_item(index, color)
  800.     self.contents.font.color = color
  801.     rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
  802.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  803.     self.contents.draw_text(rect, @commands[index])
  804.   end
  805.   #--------------------------------------------------------------------------
  806.   # 笳・・・岼縺ョ辟。蜉ケ蛹・
  807.   #     index : ・・岼逡ェ蜿キ
  808.   #--------------------------------------------------------------------------
  809.   def disable_item(index)
  810.     draw_item(index, disabled_color)
  811.   end
  812. end
  813. #==============================================================================
  814. # 笆  Window_Help
  815. #------------------------------------------------------------------------------
  816. # 縲€繧ケ繧-繝ォ繧・い繧、繝・・縺ョ隱ャ譏弱€√い繧ッ繧ソ繝シ縺ョ繧ケ繝・・繧ソ繧ケ縺ェ縺ゥ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  817. #==============================================================================
  818.  
  819. class Window_Menuhelp < Window_Base
  820.   #--------------------------------------------------------------------------
  821.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  822.   #--------------------------------------------------------------------------
  823.   def initialize
  824.     super(0, - 77, 640, 64)
  825.     self.contents = Bitmap.new(width - 32, height - 32)
  826.     self.contents.font.name = $fontface
  827.     self.contents.font.size = 18
  828.     self.opacity = 0
  829.   end
  830.   #--------------------------------------------------------------------------
  831.   # 笳・繝・・繧ケ繝郁ィ-螳・
  832.   #     text  : 繧ヲ繧」繝ウ繝峨え縺ォ陦ィ遉コ縺吶k譁・-怜・
  833.   #     align : 繧「繝ゥ繧、繝ウ繝。繝ウ繝・(0..蟾ヲ謠・∴縲・..荳-螟ョ謠・∴縲・..蜿ウ謠・∴)
  834.   #--------------------------------------------------------------------------
  835.   def set_text(text, align = 0)
  836.     # 繝・・繧ケ繝医→繧「繝ゥ繧、繝ウ繝。繝ウ繝医・蟆代↑縺上→繧ゆク€譁ケ縺悟燕蝗槭→驕輔▲縺ヲ縺・k・エ蜷・
  837.     if text != @text or align != @align
  838.       # 繝・・繧ケ繝医r蜀肴緒逕サ
  839.       self.contents.clear
  840.       self.contents.font.color = normal_color
  841.       self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
  842.       @text = text
  843.       @align = align
  844.       @actor = nil
  845.     end
  846.     self.visible = true
  847.   end
  848.   #--------------------------------------------------------------------------
  849.   # 笳・繧「繧ッ繧ソ繝シ險-螳・
  850.   #     actor : 繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧「繧ッ繧ソ繝シ
  851.   #--------------------------------------------------------------------------
  852.   def set_actor(actor)
  853.     if actor != @actor
  854.       self.contents.clear
  855.       draw_actor_name(actor, 4, 0)
  856.       draw_actor_state(actor, 140, 0)
  857.       draw_actor_hp(actor, 284, 0)
  858.       draw_actor_sp(actor, 460, 0)
  859.       @actor = actor
  860.       @text = nil
  861.       self.visible = true
  862.     end
  863.   end
  864.   #--------------------------------------------------------------------------
  865.   # 笳・繧ィ繝阪Α繝シ險-螳・
  866.   #     enemy : 蜷榊燕縺ィ繧ケ繝・・繝医r陦ィ遉コ縺吶k繧ィ繝阪Α繝シ
  867.   #--------------------------------------------------------------------------
  868.   def set_enemy(enemy)
  869.     text = enemy.name
  870.     state_text = make_battler_state_text(enemy, 112, false)
  871.     if state_text != ""
  872.       text += "  " + state_text
  873.     end
  874.     set_text(text, 1)
  875.   end
  876. end
  877. #==============================================================================
  878. # 笆  Window_Gold
  879. #------------------------------------------------------------------------------
  880. # 縲€繧エ繝シ繝ォ繝峨r陦ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  881. #==============================================================================
  882.  
  883. class Window_Gold < Window_Base
  884.   #--------------------------------------------------------------------------
  885.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  886.   #--------------------------------------------------------------------------
  887.   def initialize
  888.     super(0, 0, 200, 64)
  889.     self.contents = Bitmap.new(width - 32, height - 32)
  890.     self.contents.font.name = $fontface
  891.     self.contents.font.size = 21
  892.     refresh
  893.   end
  894.   #--------------------------------------------------------------------------
  895.   # 笳・繝ェ繝輔Ξ繝・す繝・
  896.   #--------------------------------------------------------------------------
  897.   def refresh
  898.     self.contents.clear
  899.     cx = contents.text_size("Gold").width
  900.     self.contents.font.color = outline_color
  901.     self.contents.draw_text(81, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
  902.     self.contents.draw_text(81, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
  903.     self.contents.draw_text(79, 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
  904.     self.contents.draw_text(79, - 1, 120-cx-2, 32, $game_party.gold.to_s, 2)
  905.     self.contents.font.color = normal_color
  906.     self.contents.draw_text(80, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  907.     self.contents.font.color = outline_color
  908.     self.contents.draw_text(- 1, - 1, cx, 32, "Gold", 2)
  909.     self.contents.draw_text(1, 1, cx, 32, "Gold", 2)
  910.     self.contents.draw_text(- 1, 1, cx, 32, "Gold", 2)
  911.     self.contents.draw_text(1, - 1, cx, 32, "Gold", 2)
  912.     self.contents.font.color = Color.new(254, 230, 159, 255)
  913.     self.contents.draw_text(0, 0, cx, 32, "Gold", 2)
  914.   end
  915. end
  916. #==============================================================================
  917. # 笆  Window_PlayTime
  918. #------------------------------------------------------------------------------
  919. # 縲€繝。繝九Η繝シ逕サ髱「縺ァ繝励Ξ繧、譎る俣繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  920. #==============================================================================
  921.  
  922. class Window_PlayTime < Window_Base
  923.   #--------------------------------------------------------------------------
  924.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  925.   #--------------------------------------------------------------------------
  926.   def initialize
  927.     super(0, 0, 200, 70)
  928.     self.contents = Bitmap.new(width - 32, height - 32)
  929.     self.contents.font.name = $fontface
  930.     self.contents.font.size = 21
  931.     self.opacity = 0
  932.     refresh
  933.   end
  934.   #--------------------------------------------------------------------------
  935.   # 笳・繝ェ繝輔Ξ繝・す繝・
  936.   #--------------------------------------------------------------------------
  937.   def refresh
  938.     self.contents.clear
  939.     self.contents.font.color = outline_color
  940.     self.contents.draw_text(1, - 1, 120, 32, "Play Time")
  941.     self.contents.draw_text(1, 1, 120, 32, "Play Time")
  942.     self.contents.draw_text(-1, - 1, 120, 32, "Play Time")
  943.     self.contents.draw_text(-1, 1, 120, 32, "Play Time")
  944.     self.contents.font.color =  Color.new(254, 230, 159, 255)
  945.     self.contents.draw_text(0, 0, 120, 32, "Play Time")
  946.     @total_sec = Graphics.frame_count / Graphics.frame_rate
  947.     hour = @total_sec / 60 / 60
  948.     min = @total_sec / 60 % 60
  949.     sec = @total_sec % 60
  950.     text = sprintf("%02d:%02d:%02d", hour, min, sec)
  951.     self.contents.font.color = outline_color
  952.     self.contents.draw_text(39, - 1, 120, 32, text, 2)
  953.     self.contents.draw_text(39, 1, 120, 32, text, 2)
  954.     self.contents.draw_text(41, 1, 120, 32, text, 2)
  955.     self.contents.draw_text(41, -1, 120, 32, text, 2)
  956.     self.contents.font.color = normal_color
  957.     self.contents.draw_text(40, 0, 120, 32, text, 2)
  958.   end
  959.   #--------------------------------------------------------------------------
  960.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  961.   #--------------------------------------------------------------------------
  962.   def update
  963.     super
  964.     if Graphics.frame_count / Graphics.frame_rate != @total_sec
  965.       refresh
  966.     end
  967.   end
  968. end
  969. #==============================================================================
  970. # 笆  Window_MenuStatus
  971. #------------------------------------------------------------------------------
  972. # 縲€繝。繝九Η繝シ逕サ髱「縺ァ繝代・繝・ぅ繝。繝ウ繝舌・縺ョ繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  973. #==============================================================================
  974.  
  975. class Window_MenuStatus < Window_Selectable
  976.   #--------------------------------------------------------------------------
  977.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  978.   #--------------------------------------------------------------------------
  979.   def initialize
  980.     super(0, 0, 480, 430)
  981.     self.contents = Bitmap.new(width - 32, height - 32)
  982.     self.contents.font.name = $fontface
  983.     self.contents.font.size = $fontsize
  984.     refresh
  985.     self.active = false
  986.     self.index = -1
  987.   end
  988.   #--------------------------------------------------------------------------
  989.   # 笳・繝ェ繝輔Ξ繝・す繝・
  990.   #--------------------------------------------------------------------------
  991.   def refresh
  992.     self.contents.clear
  993.     @item_max = $game_party.actors.size
  994.     for i in 0...$game_party.actors.size
  995.       x = 100 - i * 18
  996.       y = i * 100
  997.       actor = $game_party.actors[i]
  998.       draw_actor_face(actor, x - 40, y + 80)
  999.       draw_actor_name2(actor, x + 50, y)
  1000.       draw_actor_class2(actor, x + 50, y + 50)
  1001.       draw_actor_level2(actor, x + 50, y + 25)
  1002.       draw_actor_state2(actor, x + 155, y + 50)
  1003.       draw_actor_hp2(actor, x + 140, y )
  1004.       draw_actor_sp2(actor, x + 140, y + 25)
  1005.       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))
  1006.       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))
  1007.     end
  1008.   end
  1009.   #--------------------------------------------------------------------------
  1010.   # 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
  1011.   #--------------------------------------------------------------------------
  1012.   def update_cursor_rect
  1013.       self.cursor_rect.empty
  1014.  end
  1015. end
  1016. #==============================================================================
  1017. # 笆  Window_Item
  1018. #------------------------------------------------------------------------------
  1019. # 縲€繧「繧、繝・・逕サ髱「縲√ヰ繝医Ν逕サ髱「縺ァ縲∵園謖√い繧、繝・・縺ョ荳€隕ァ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1020. #==============================================================================
  1021.  
  1022. class Window_Menuitem < Window_Itemselectable
  1023.   #--------------------------------------------------------------------------
  1024.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1025.   #--------------------------------------------------------------------------
  1026.   def initialize
  1027.     super(0, 500, 640, 380)
  1028.     @column_max = 2
  1029.     refresh
  1030.     self.index = 0
  1031.     self.opacity = 0
  1032.     # 謌ヲ髣倅ク-縺ョ・エ蜷医・繧ヲ繧」繝ウ繝峨え繧堤判髱「荳-螟ョ縺ク遘サ蜍輔@縲∝濠騾乗・縺ォ縺吶k
  1033.     if $game_temp.in_battle
  1034.       self.y = 64
  1035.       self.height = 256
  1036.       self.back_opacity = 160
  1037.     end
  1038.   end
  1039.   #--------------------------------------------------------------------------
  1040.   # 笳・繧「繧、繝・・縺ョ蜿門セ・
  1041.   #--------------------------------------------------------------------------
  1042.   def item
  1043.     return @data[self.index]
  1044.   end
  1045.   #--------------------------------------------------------------------------
  1046.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1047.   #--------------------------------------------------------------------------
  1048.   def refresh
  1049.     if self.contents != nil
  1050.       self.contents.dispose
  1051.       self.contents = nil
  1052.     end
  1053.     @data = []
  1054.     # 繧「繧、繝・・繧定ソス蜉
  1055.     for i in 1...$data_items.size
  1056.       if $game_party.item_number(i) > 0
  1057.         @data.push($data_items[i])
  1058.       end
  1059.     end
  1060.     # 謌ヲ髣倅ク-莉・螟悶↑繧画-ヲ蝎ィ縺ィ髦イ蜈キ繧りソス蜉
  1061.     unless $game_temp.in_battle
  1062.       for i in 1...$data_weapons.size
  1063.         if $game_party.weapon_number(i) > 0
  1064.           @data.push($data_weapons[i])
  1065.         end
  1066.       end
  1067.       for i in 1...$data_armors.size
  1068.         if $game_party.armor_number(i) > 0
  1069.           @data.push($data_armors[i])
  1070.         end
  1071.       end
  1072.     end
  1073.     # ・・岼謨ー縺・0 縺ァ縺ェ縺代l縺ー繝薙ャ繝医・繝・・繧剃ス懈・縺励€∝・・・岼繧呈緒逕サ
  1074.     @item_max = @data.size
  1075.     if @item_max > 0
  1076.       self.contents = Bitmap.new(width - 32, row_max * 32)
  1077.       self.contents.font.name = $fontface
  1078.       self.contents.font.size = $fontsize
  1079.       for i in 0...@item_max
  1080.         draw_item(i)
  1081.       end
  1082.     end
  1083.   end
  1084.   #--------------------------------------------------------------------------
  1085.   # 笳・・・岼縺ョ謠冗判
  1086.   #     index : ・・岼逡ェ蜿キ
  1087.   #--------------------------------------------------------------------------
  1088.   def draw_item(index)
  1089.     item = @data[index]
  1090.     case item
  1091.     when RPG::Item
  1092.       number = $game_party.item_number(item.id)
  1093.     when RPG::Weapon
  1094.       number = $game_party.weapon_number(item.id)
  1095.     when RPG::Armor
  1096.       number = $game_party.armor_number(item.id)
  1097.     end
  1098.     if item.is_a?(RPG::Item) and
  1099.        $game_party.item_can_use?(item.id)
  1100.       self.contents.font.color = normal_color
  1101.     else
  1102.       self.contents.font.color = Color.new(255, 255, 255, 200)
  1103.     end
  1104.     x = 4 + index % 2 * (270 + 25) + 12
  1105.     y = index / 2 * 32
  1106.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  1107.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  1108.     bitmap = RPG::Cache.icon(item.icon_name)
  1109.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1110.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  1111.     if item.is_a?(RPG::Item) and
  1112.        $game_party.item_can_use?(item.id)
  1113.     self.contents.draw_text_outline(x + 28, y, 212, 32, item.name, 0)
  1114.     self.contents.draw_text_outline(x + 240, y, 16, 32, ":", 1)
  1115.     self.contents.draw_text_outline(x + 256, y, 24, 32, number.to_s, 2)
  1116.     else
  1117.     self.contents.draw_text_outline2(x + 28, y, 212, 32, item.name, 0)
  1118.     self.contents.draw_text_outline2(x + 240, y, 16, 32, ":", 1)
  1119.     self.contents.draw_text_outline2(x + 256, y, 24, 32, number.to_s, 2)
  1120.     end
  1121.   end
  1122.   #--------------------------------------------------------------------------
  1123.   # 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
  1124.   #--------------------------------------------------------------------------
  1125.   def update_help
  1126.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1127.   end
  1128. end
  1129. #==============================================================================
  1130. # 笆  Window_Menuskill
  1131. #------------------------------------------------------------------------------
  1132. #
  1133. #==============================================================================
  1134.  
  1135. class Window_Menuskill < Window_Itemselectable
  1136.   #--------------------------------------------------------------------------
  1137.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1138.   #     actor : 繧「繧ッ繧ソ繝シ
  1139.   #--------------------------------------------------------------------------
  1140.   def initialize(actor)
  1141.     super(- 3, 531, 640, 352)
  1142.     @actor = actor
  1143.     @column_max = 2
  1144.     refresh
  1145.     self.index = 0
  1146.     # 謌ヲ髣倅ク-縺ョ・エ蜷医・繧ヲ繧」繝ウ繝峨え繧堤判髱「荳-螟ョ縺ク遘サ蜍輔@縲∝濠騾乗・縺ォ縺吶k
  1147.     if $game_temp.in_battle
  1148.       self.y = 64
  1149.       self.height = 256
  1150.       self.back_opacity = 160
  1151.     end
  1152.   end
  1153.   #--------------------------------------------------------------------------
  1154.   # 笳・繧ケ繧-繝ォ縺ョ蜿門セ・
  1155.   #--------------------------------------------------------------------------
  1156.   def skill
  1157.     return @data[self.index]
  1158.   end
  1159.   #--------------------------------------------------------------------------
  1160.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1161.   #--------------------------------------------------------------------------
  1162.   def refresh
  1163.     if self.contents != nil
  1164.       self.contents.dispose
  1165.       self.contents = nil
  1166.     end
  1167.     @data = []
  1168.     for i in [email hidden]
  1169.       skill = $data_skills[@actor.skills[i]]
  1170.       if skill != nil
  1171.         @data.push(skill)
  1172.       end
  1173.     end
  1174.     # ・・岼謨ー縺・0 縺ァ縺ェ縺代l縺ー繝薙ャ繝医・繝・・繧剃ス懈・縺励€∝・・・岼繧呈緒逕サ
  1175.     @item_max = @data.size
  1176.     if @item_max > 0
  1177.       self.contents = Bitmap.new(width - 32, row_max * 32)
  1178.       self.contents.font.name = $fontface
  1179.       self.contents.font.size = $fontsize
  1180.       for i in 0...@item_max
  1181.         draw_item(i)
  1182.       end
  1183.     end
  1184.   end
  1185.   #--------------------------------------------------------------------------
  1186.   # 笳・・・岼縺ョ謠冗判
  1187.   #     index : ・・岼逡ェ蜿キ
  1188.   #--------------------------------------------------------------------------
  1189.   def draw_item(index)
  1190.     skill = @data[index]
  1191.     if @actor.skill_can_use?(skill.id)
  1192.       self.contents.font.color = normal_color
  1193.     else
  1194.       self.contents.font.color = Color.new(255, 255, 255, 200)
  1195.     end
  1196.     x = 4 + index % 2 * (270 + 25) + 12
  1197.     y = index / 2 * 32
  1198.     rect = Rect.new(x, y, self.width / @column_max - 32, 32)
  1199.     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  1200.     bitmap = RPG::Cache.icon(skill.icon_name)
  1201.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1202.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
  1203.      if @actor.skill_can_use?(skill.id)
  1204.     self.contents.draw_text_outline(x + 28, y, 204, 32, skill.name, 0)
  1205.     self.contents.draw_text_outline(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  1206.     else
  1207.     self.contents.draw_text_outline2(x + 28, y, 204, 32, skill.name, 0)
  1208.     self.contents.draw_text_outline2(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  1209.     end
  1210.   end
  1211.   #--------------------------------------------------------------------------
  1212.   # 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
  1213.   #--------------------------------------------------------------------------
  1214.   def update_help
  1215.     @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  1216.   end
  1217. end
  1218. #==============================================================================
  1219. # 笆  Window_SkillStatus
  1220. #------------------------------------------------------------------------------
  1221. # 縲€繧ケ繧-繝ォ逕サ髱「縺ァ縲√せ繧-繝ォ菴ソ逕ィ閠・・繧ケ繝・・繧ソ繧ケ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1222. #==============================================================================
  1223.  
  1224. class Window_SkillStatus < Window_Base
  1225.   #--------------------------------------------------------------------------
  1226.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1227.   #     actor : 繧「繧ッ繧ソ繝シ
  1228.   #--------------------------------------------------------------------------
  1229.   def initialize(actor)
  1230.     super(630, 35, 410, 109)
  1231.     self.contents = Bitmap.new(width - 32, height - 32)
  1232.     self.contents.font.name = $fontface
  1233.     self.contents.font.size = $fontsize
  1234.     self.opacity = 0
  1235.     @actor = actor
  1236.     refresh
  1237.   end
  1238.   #--------------------------------------------------------------------------
  1239.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1240.   #--------------------------------------------------------------------------
  1241.   def refresh
  1242.     self.contents.clear
  1243.     x = 100
  1244.     y = 0
  1245.       draw_actor_face(@actor, x - 40, y + 80)
  1246.       draw_actor_name2(@actor, x + 50, y)
  1247.       draw_actor_class2(@actor, x + 50, y + 50)
  1248.       draw_actor_level2(@actor, x + 50, y + 25)
  1249.       draw_actor_state2(@actor, x + 155, y + 50)
  1250.       draw_actor_hp2(@actor, x + 140, y )
  1251.       draw_actor_sp2(@actor, x + 140, y + 25)
  1252.       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))
  1253.       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))
  1254.   end
  1255. end
  1256. #==============================================================================
  1257. # 笆  Window_Target
  1258. #------------------------------------------------------------------------------
  1259. # 縲€繧「繧、繝・・逕サ髱「縺ィ繧ケ繧-繝ォ逕サ髱「縺ァ縲∽スソ逕ィ蟇セ雎。縺ョ繧「繧ッ繧ソ繝シ繧帝∈謚槭☆繧九え繧」繝ウ繝峨え縺ァ縺吶€・
  1260. #==============================================================================
  1261.  
  1262. class Window_Target < Window_Selectable
  1263.   #--------------------------------------------------------------------------
  1264.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1265.   #--------------------------------------------------------------------------
  1266.   def initialize
  1267.     super(0, 0, 336, 480)
  1268.     self.contents = Bitmap.new(width - 32, height - 32)
  1269.     self.contents.font.name = $fontface
  1270.     self.contents.font.size = $fontsize
  1271.     self.z += 10
  1272.     @item_max = $game_party.actors.size
  1273.     refresh
  1274.   end
  1275.   #--------------------------------------------------------------------------
  1276.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1277.   #--------------------------------------------------------------------------
  1278.   def refresh
  1279.     self.contents.clear
  1280.     for i in 0...$game_party.actors.size
  1281.       x = 4
  1282.       y = i * 116
  1283.       actor = $game_party.actors[i]
  1284.       draw_actor_name2(actor, x, y)
  1285.       draw_actor_class2(actor, x + 144, y)
  1286.       draw_actor_level2(actor, x + 8, y + 32)
  1287.       draw_actor_state2(actor, x + 8, y + 64)
  1288.       draw_actor_hp2(actor, x + 152, y + 32)
  1289.       draw_actor_sp2(actor, x + 152, y + 64)
  1290.       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))
  1291.       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))
  1292.     end
  1293.   end
  1294.   #--------------------------------------------------------------------------
  1295.   # 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
  1296.   #--------------------------------------------------------------------------
  1297.   def update_cursor_rect
  1298.     # 繧ォ繝シ繧ス繝ォ菴咲スョ -1 縺ッ蜈ィ驕ク謚槭€・2 莉・荳九・蜊倡峡驕ク謚・(菴ソ逕ィ閠・・霄ォ)
  1299.     if @index <= -2
  1300.       self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
  1301.     elsif @index == -1
  1302.       self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
  1303.     else
  1304.       self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
  1305.     end
  1306.   end
  1307. end
  1308. #==============================================================================
  1309. # 笆  Window_EquipRight
  1310. #------------------------------------------------------------------------------
  1311. # 縲€陬・y逕サ髱「縺ァ縲√い繧ッ繧ソ繝シ縺檎樟蝨ィ陬・y縺励※縺・k繧「繧、繝・・繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1312. #==============================================================================
  1313.  
  1314. class Window_EquipRight < Window_Menuselectable
  1315.   #--------------------------------------------------------------------------
  1316.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1317.   #     actor : 繧「繧ッ繧ソ繝シ
  1318.   #--------------------------------------------------------------------------
  1319.   def initialize(actor)
  1320.     super(- 100, 125, 200, 350)
  1321.     self.contents = Bitmap.new(width - 32, height - 32)
  1322.     self.contents.font.name = $fontface
  1323.     self.contents.font.size = $fontsize
  1324.     self.opacity = 0
  1325.     @actor = actor
  1326.     refresh
  1327.     self.index = 0
  1328.   end
  1329.   #--------------------------------------------------------------------------
  1330.   # 笳・繧「繧、繝・・縺ョ蜿門セ・
  1331.   #--------------------------------------------------------------------------
  1332.   def item
  1333.     return @data[self.index]
  1334.   end
  1335.   #--------------------------------------------------------------------------
  1336.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1337.   #--------------------------------------------------------------------------
  1338.   def refresh
  1339.     self.contents.clear
  1340.     @data = []
  1341.     @data.push($data_weapons[@actor.weapon_id])
  1342.     @data.push($data_armors[@actor.armor1_id])
  1343.     @data.push($data_armors[@actor.armor2_id])
  1344.     @data.push($data_armors[@actor.armor3_id])
  1345.     @data.push($data_armors[@actor.armor4_id])
  1346.     @item_max = @data.size
  1347.     draw_item_name2(@data[0], 0, 68 * 0)
  1348.     draw_item_name2(@data[1], 0, 68 * 1)
  1349.     draw_item_name2(@data[2], 0, 68 * 2)
  1350.     draw_item_name2(@data[3], 0, 68 * 3)
  1351.     draw_item_name2(@data[4], 0, 68 * 4 - 2)
  1352.   end
  1353.   #--------------------------------------------------------------------------
  1354.   # 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
  1355.   #--------------------------------------------------------------------------
  1356.   def update_help
  1357.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1358.   end
  1359. end
  1360. #==============================================================================
  1361. # 笆  Window_EquipItem
  1362. #------------------------------------------------------------------------------
  1363. # 縲€陬・y逕サ髱「縺ァ縲∬」・y螟画峩縺ョ蛟呵」懊→縺ェ繧九い繧、繝・・縺ョ荳€隕ァ繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1364. #==============================================================================
  1365.  
  1366. class Window_EquipItem < Window_Selectable
  1367.   #--------------------------------------------------------------------------
  1368.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1369.   #     actor      : 繧「繧ッ繧ソ繝シ
  1370.   #     equip_type : 陬・y驛ィ菴・(0・・)
  1371.   #--------------------------------------------------------------------------
  1372.   def initialize(actor, equip_type)
  1373.     super(233, 573, 413, 224)
  1374.     @actor = actor
  1375.     @equip_type = equip_type
  1376.     @column_max = 2
  1377.     refresh
  1378.     self.active = false
  1379.     self.index = -1
  1380.     self.opacity = 0
  1381.   end
  1382.   #--------------------------------------------------------------------------
  1383.   # 笳・繧「繧、繝・・縺ョ蜿門セ・
  1384.   #--------------------------------------------------------------------------
  1385.   def item
  1386.     return @data[self.index]
  1387.   end
  1388.   #--------------------------------------------------------------------------
  1389.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1390.   #--------------------------------------------------------------------------
  1391.   def refresh
  1392.     if self.contents != nil
  1393.       self.contents.dispose
  1394.       self.contents = nil
  1395.     end
  1396.     @data = []
  1397.     # 陬・y蜿ッ閭ス縺ェ・ヲ蝎ィ繧定ソス蜉
  1398.     if @equip_type == 0
  1399.       weapon_set = $data_classes[@actor.class_id].weapon_set
  1400.       for i in 1...$data_weapons.size
  1401.         if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
  1402.           @data.push($data_weapons[i])
  1403.         end
  1404.       end
  1405.     end
  1406.     # 陬・y蜿ッ閭ス縺ェ髦イ蜈キ繧定ソス蜉
  1407.     if @equip_type != 0
  1408.       armor_set = $data_classes[@actor.class_id].armor_set
  1409.       for i in 1...$data_armors.size
  1410.         if $game_party.armor_number(i) > 0 and armor_set.include?(i)
  1411.           if $data_armors[i].kind == @equip_type-1
  1412.             @data.push($data_armors[i])
  1413.           end
  1414.         end
  1415.       end
  1416.     end
  1417.     # 遨コ逋ス繧定ソス蜉
  1418.     @data.push(nil)
  1419.     # 繝薙ャ繝医・繝・・繧剃ス懈・縺励€∝・・・岼繧呈緒逕サ
  1420.     @item_max = @data.size
  1421.     self.contents = Bitmap.new(width - 32, row_max * 32)
  1422.     self.contents.font.name = $fontface
  1423.     self.contents.font.size = 22
  1424.     for i in 0...@item_max-1
  1425.       draw_item(i)
  1426.     end
  1427.   end
  1428.   #--------------------------------------------------------------------------
  1429.   # 笳・・・岼縺ョ謠冗判
  1430.   #     index : ・・岼逡ェ蜿キ
  1431.   #--------------------------------------------------------------------------
  1432.   def draw_item(index)
  1433.     item = @data[index]
  1434.     x = 4 + index % 2 * (176 + 16)
  1435.     y = index / 2 * 32
  1436.     case item
  1437.     when RPG::Weapon
  1438.       number = $game_party.weapon_number(item.id)
  1439.     when RPG::Armor
  1440.       number = $game_party.armor_number(item.id)
  1441.     end
  1442.     bitmap = RPG::Cache.icon(item.icon_name)
  1443.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  1444.     self.contents.font.color = normal_color
  1445.     self.contents.draw_text_shadow(x + 28, y, 212, 32, item.name, 0)
  1446.     self.contents.draw_text_shadow(x + 140, y, 16, 32, ":", 1)
  1447.     self.contents.draw_text_shadow(x + 156, y, 24, 32, number.to_s, 2)
  1448.   end
  1449.   #--------------------------------------------------------------------------
  1450.     def update_cursor_rect
  1451.     # 繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 譛ェ貅€縺ョ・エ蜷・
  1452.     if @index < 0
  1453.       self.cursor_rect.empty
  1454.       return
  1455.     end
  1456.     # 迴セ蝨ィ縺ョ陦後r蜿門セ・
  1457.     row = @index / @column_max
  1458.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k蜈磯 -縺ョ陦後h繧雁燕縺ョ・エ蜷・
  1459.     if row < self.top_row
  1460.       # 迴セ蝨ィ縺ョ陦後′蜈磯 -縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  1461.       self.top_row = row
  1462.     end
  1463.     # 迴セ蝨ィ縺ョ陦後′縲∬。ィ遉コ縺輔l縺ヲ縺・k譛€蠕悟ーセ縺ョ陦後h繧雁セ後m縺ョ・エ蜷・
  1464.     if row > self.top_row + (self.page_row_max - 1)
  1465.       # 迴セ蝨ィ縺ョ陦後′譛€蠕悟ーセ縺ォ縺ェ繧九h縺・↓繧ケ繧ッ繝-繝シ繝ォ
  1466.       self.top_row = row - (self.page_row_max - 1)
  1467.     end
  1468.     # 繧ォ繝シ繧ス繝ォ縺ョ蟷・r險育ョ・
  1469.     cursor_width = self.width / @column_max - 32
  1470.     # 繧ォ繝シ繧ス繝ォ縺ョ蠎ァ讓吶r險育ョ・
  1471.     x = @index % @column_max * (cursor_width + 16)
  1472.     y = @index / @column_max * 32 - self.oy
  1473.     # 繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「繧呈峩譁ー
  1474.     self.cursor_rect.set(x + 2, y, cursor_width + 15, 32)
  1475.   end
  1476.   # 笳・繝倥Ν繝励ユ繧-繧ケ繝域峩譁ー
  1477.   #--------------------------------------------------------------------------
  1478.   def update_help
  1479.     @help_window.set_text(self.item == nil ? "" : self.item.description)
  1480.   end
  1481. end
  1482. #==============================================================================
  1483. # 笆  Window_Status
  1484. #------------------------------------------------------------------------------
  1485. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1486. #==============================================================================
  1487.  
  1488. class Window_Status < Window_Base
  1489.   #--------------------------------------------------------------------------
  1490.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1491.   #     actor : 繧「繧ッ繧ソ繝シ
  1492.   #--------------------------------------------------------------------------
  1493.   def initialize(actor)
  1494.     super(0, 0, 418, 133)
  1495.     self.contents = Bitmap.new(width - 32, height - 32)
  1496.     self.contents.font.name = $fontface
  1497.     self.contents.font.size = $fontsize
  1498.     @actor = actor
  1499.     refresh
  1500.   end
  1501.   #--------------------------------------------------------------------------
  1502.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1503.   #--------------------------------------------------------------------------
  1504.   def refresh
  1505.     self.contents.clear
  1506.     draw_actor_face(@actor, 0, 90)
  1507.     draw_actor_name2(@actor, 90, 0)
  1508.     draw_actor_class2(@actor, 250, 0)
  1509.     draw_actor_level2(@actor, 90, 32)
  1510.     draw_actor_state2(@actor, 90, 64)
  1511.     draw_actor_hp2(@actor, 210, 32, 172)
  1512.     draw_actor_sp2(@actor, 210, 64, 172)
  1513.     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))
  1514.     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))
  1515.     end
  1516.   end
  1517.   #==============================================================================
  1518. # 笆  Window_Status2
  1519. #------------------------------------------------------------------------------
  1520. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1521. #==============================================================================
  1522.  
  1523. class Window_Status2 < Window_Base
  1524.   #--------------------------------------------------------------------------
  1525.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1526.   #     actor : 繧「繧ッ繧ソ繝シ
  1527.   #--------------------------------------------------------------------------
  1528.   def initialize(actor)
  1529.     super(0, 0, 418, 178)
  1530.     self.contents = Bitmap.new(width - 32, height - 32)
  1531.     self.contents.font.name = $fontface
  1532.     self.contents.font.size = $fontsize
  1533.     @actor = actor
  1534.     refresh
  1535.   end
  1536.   #--------------------------------------------------------------------------
  1537.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1538.   #--------------------------------------------------------------------------
  1539.   def refresh
  1540.     self.contents.clear
  1541.           self.contents.font.size = 24
  1542.     draw_actor_parameter2(@actor, 0, 10, 0)
  1543.     draw_actor_parameter2(@actor, 0, 40, 1)
  1544.     draw_actor_parameter2(@actor, 0, 70, 2)
  1545.     draw_actor_parameter2(@actor, 0, 100, 3)
  1546.     draw_actor_parameter2(@actor, 190, 20, 4)
  1547.     draw_actor_parameter2(@actor, 190, 50, 5)
  1548.     draw_actor_parameter2(@actor, 190, 80, 6)
  1549.     draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @actor.atk, 500, Color.new(242, 2, 6, 255), Color.new(253, 53, 56, 255))
  1550.     draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @actor.pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  1551.     draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @actor.mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  1552.     draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @actor.str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  1553.     draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @actor.dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  1554.     draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @actor.agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  1555.     draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @actor.int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  1556.         if @new_atk != nil
  1557.         draw_actor_barz(@actor, 0, 37, "horizontal", 168, 1, @new_atk, 500, Color.new(255, 0, 0, 255), Color.new(255, 0, 0, 255))
  1558.       end
  1559.         if @new_pdef != nil
  1560.         draw_actor_barz(@actor, 0, 67, "horizontal", 168, 1, @new_pdef, 500, Color.new(228, 253, 48, 255), Color.new(238, 254, 124, 255))
  1561.        end
  1562.         if @new_mdef != nil
  1563.         draw_actor_barz(@actor, 0, 97, "horizontal", 168, 1, @new_mdef, 500, Color.new(229, 78, 253, 255), Color.new(237, 134, 254, 255))
  1564.       end
  1565.        if  @new_str != nil
  1566.        draw_actor_barz(@actor, 0, 127, "horizontal", 168, 1, @new_str, 500, Color.new(254, 209, 154, 255), Color.new(253, 163, 53, 255))
  1567.       end
  1568.        if  @new_dex != nil
  1569.        draw_actor_barz(@actor, 190, 47, "horizontal", 168, 1, @new_dex, 500, Color.new(222, 222, 222, 255), Color.new(255, 255, 255, 255))
  1570.       end
  1571.        if  @new_agi != nil
  1572.        draw_actor_barz(@actor, 190, 77, "horizontal", 168, 1, @new_agi, 500, Color.new(8, 160, 253, 255), Color.new(119, 203, 254, 255))
  1573.      end
  1574.        if @new_int != nil
  1575.        draw_actor_barz(@actor, 190, 107, "horizontal", 168, 1, @new_int, 500, Color.new(33, 253, 86, 255), Color.new(124, 254, 155, 255))
  1576.     end
  1577. end
  1578.     def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
  1579.     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
  1580.        @new_agi != new_agi or @new_int != new_int
  1581.       @new_atk = new_atk
  1582.       @new_pdef = new_pdef
  1583.       @new_mdef = new_mdef
  1584.       @new_str = new_str
  1585.       @new_dex = new_dex
  1586.       @new_agi = new_agi
  1587.       @new_int = new_int
  1588.       refresh
  1589.     end
  1590.   end
  1591. end
  1592. #==============================================================================
  1593. # 笆  Window_Status3
  1594. #------------------------------------------------------------------------------
  1595. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1596. #==============================================================================
  1597.  
  1598. class Window_Status3 < Window_Base
  1599.   #--------------------------------------------------------------------------
  1600.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1601.   #     actor : 繧「繧ッ繧ソ繝シ
  1602.   #--------------------------------------------------------------------------
  1603.   def initialize(actor)
  1604.     super(0, 0, 418, 229)
  1605.     self.contents = Bitmap.new(width - 32, height - 32)
  1606.     self.contents.font.name = $fontface
  1607.     self.contents.font.size = $fontsize
  1608.     @actor = actor
  1609.     refresh
  1610.   end
  1611.   #--------------------------------------------------------------------------
  1612.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1613.   #--------------------------------------------------------------------------
  1614.   def refresh
  1615.     self.contents.clear
  1616.     self.contents.font.size = 24
  1617.     self.contents.font.color = system_color
  1618.     self.contents.draw_text_outline3(150, 0, 96, 32, "Equipment")
  1619.     draw_item_name2($data_weapons[@actor.weapon_id], 15 + 16, 48)
  1620.     draw_item_name2($data_armors[@actor.armor1_id], 15 + 16, 86)
  1621.     draw_item_name2($data_armors[@actor.armor2_id], 15 + 16, 124)
  1622.     draw_item_name2($data_armors[@actor.armor3_id], 15 + 186, 68)
  1623.     draw_item_name2($data_armors[@actor.armor4_id], 15 + 186, 106)
  1624.       end
  1625.     end
  1626.     #==============================================================================
  1627. # 笆  Window_Status4
  1628. #------------------------------------------------------------------------------
  1629. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1630. #==============================================================================
  1631.  
  1632. class Window_Status4 < Window_Base
  1633.   #--------------------------------------------------------------------------
  1634.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1635.   #     actor : 繧「繧ッ繧ソ繝シ
  1636.   #--------------------------------------------------------------------------
  1637.   def initialize(actor)
  1638.     super(0, 0, 252, 100)
  1639.     self.contents = Bitmap.new(width - 32, height - 32)
  1640.     self.contents.font.name = $fontface
  1641.     self.contents.font.size = $fontsize
  1642.     @actor = actor
  1643.     refresh
  1644.   end
  1645.   #--------------------------------------------------------------------------
  1646.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1647.   #--------------------------------------------------------------------------
  1648.   def refresh
  1649.     self.contents.clear
  1650.     self.contents.font.size = 26
  1651.     self.contents.font.color = system_color
  1652.     self.contents.draw_text_outline3(10, 0, 80, 32, "EXP")
  1653.     self.contents.draw_text_outline3(10, 32, 80, 32, "NEXT")
  1654.     self.contents.font.color = normal_color
  1655.     self.contents.draw_text_outline(10 + 80, 0, 84, 32, @actor.exp_s, 2)
  1656.     self.contents.draw_text_outline(10 + 80, 32, 84, 32, @actor.next_rest_exp_s, 2)
  1657.       end
  1658.     end
  1659.     #==============================================================================
  1660. # 笆  Window_Status5
  1661. #------------------------------------------------------------------------------
  1662. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ァ陦ィ遉コ縺吶k縲√ヵ繝ォ莉墓ァ倥・繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1663. #==============================================================================
  1664.  
  1665. class Window_Status5 < Window_Base
  1666.   #--------------------------------------------------------------------------
  1667.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1668.   #     actor : 繧「繧ッ繧ソ繝シ
  1669.   #--------------------------------------------------------------------------
  1670.   def initialize(actor)
  1671.     super(0, 0, 300, 380)
  1672.     self.contents = Bitmap.new(width - 32, height - 32)
  1673.     self.contents.font.name = $fontface
  1674.     self.contents.font.size = $fontsize
  1675.     @actor = actor
  1676.     refresh
  1677.   end
  1678.   #--------------------------------------------------------------------------
  1679.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1680.   #--------------------------------------------------------------------------
  1681.   def refresh
  1682.     self.contents.clear
  1683.        draw_battlegraphic(@actor, 100, 300)
  1684.       end
  1685.     end
  1686.     #==============================================================================
  1687. # 笆  Window_SaveFile
  1688. #------------------------------------------------------------------------------
  1689. # 縲€繧サ繝シ繝也判髱「縺翫h縺ウ繝-繝シ繝臥判髱「縺ァ陦ィ遉コ縺吶k縲√そ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1690. #==============================================================================
  1691.  
  1692. class Window_SaveFile < Window_Base
  1693.   #--------------------------------------------------------------------------
  1694.   # 笳・蜈ャ髢九う繝ウ繧ケ繧ソ繝ウ繧ケ螟画焚
  1695.   #--------------------------------------------------------------------------
  1696.   attr_reader   :filename                 # 繝輔ぃ繧、繝ォ蜷・
  1697.   attr_reader   :selected                 # 驕ク謚樒憾諷・
  1698.   #--------------------------------------------------------------------------
  1699.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1700.   #     file_index : 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧、繝ウ繝・ャ繧ッ繧ケ (0・・)
  1701.   #     filename   : 繝輔ぃ繧、繝ォ蜷・
  1702.   #--------------------------------------------------------------------------
  1703.   def initialize(file_index, filename)
  1704.     super(0, 64 + file_index % 4 * 104, 640, 104)
  1705.     self.contents = Bitmap.new(width - 32, height - 32)
  1706.     self.contents.font.name = $fontface
  1707.     self.contents.font.size = $fontsize
  1708.     self.opacity = 0
  1709.     @file_index = file_index
  1710.     @filename = "Save#{@file_index + 1}.rxdata"
  1711.     @time_stamp = Time.at(0)
  1712.     @file_exist = FileTest.exist?(@filename)
  1713.     if @file_exist
  1714.       file = File.open(@filename, "r")
  1715.       @time_stamp = file.mtime
  1716.       @characters = Marshal.load(file)
  1717.       @frame_count = Marshal.load(file)
  1718.       @game_system = Marshal.load(file)
  1719.       @game_switches = Marshal.load(file)
  1720.       @game_variables = Marshal.load(file)
  1721.       @total_sec = @frame_count / Graphics.frame_rate
  1722.       file.close
  1723.     end
  1724.     refresh
  1725.     @selected = false
  1726.   end
  1727.   #--------------------------------------------------------------------------
  1728.   # 笳・繝ェ繝輔Ξ繝・す繝・
  1729.   #--------------------------------------------------------------------------
  1730.   def refresh
  1731.     self.contents.clear
  1732.     # 繝輔ぃ繧、繝ォ逡ェ蜿キ繧呈緒逕サ
  1733.     self.contents.font.color = normal_color
  1734.     name = "File #{@file_index + 1}"
  1735.     self.contents.draw_text_outline(4, 0, 600, 32, name)
  1736.     @name_width = contents.text_size(name).width
  1737.     # 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺悟-伜惠縺吶k・エ蜷・
  1738.     if @file_exist
  1739.       # 繧-繝」繝ゥ繧ッ繧ソ繝シ繧呈緒逕サ
  1740.       for i in [email hidden]
  1741.         bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
  1742.         cw = bitmap.rect.width / 4
  1743.         ch = bitmap.rect.height / 4
  1744.         src_rect = Rect.new(0, 0, cw, ch)
  1745.         x = 300 - @characters.size * 32 + i * 64 - cw / 2
  1746.         self.contents.blt(x, 68 - ch, bitmap, src_rect)
  1747.       end
  1748.       # 繝励Ξ繧、譎る俣繧呈緒逕サ
  1749.       hour = @total_sec / 60 / 60
  1750.       min = @total_sec / 60 % 60
  1751.       sec = @total_sec % 60
  1752.       time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
  1753.       self.contents.font.color = normal_color
  1754.       self.contents.draw_text_outline(4, 8, 600, 32, time_string, 2)
  1755.       # 繧ソ繧、繝 繧ケ繧ソ繝ウ繝励r謠冗判
  1756.       self.contents.font.color = normal_color
  1757.       time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
  1758.       self.contents.draw_text_outline(4, 40, 600, 32, time_string, 2)
  1759.     end
  1760.   end
  1761.   #--------------------------------------------------------------------------
  1762.   # 笳・驕ク謚樒憾諷九・險-螳・
  1763.   #     selected : 譁ー縺励>驕ク謚樒憾諷・(true=驕ク謚・false=髱樣∈謚・
  1764.   #--------------------------------------------------------------------------
  1765.   def selected=(selected)
  1766.     @selected = selected
  1767.     update_cursor_rect
  1768.   end
  1769.   #--------------------------------------------------------------------------
  1770.   # 笳・繧ォ繝シ繧ス繝ォ縺ョ遏ゥ蠖「譖エ譁ー
  1771.   #--------------------------------------------------------------------------
  1772.   def update_cursor_rect
  1773.     if @selected
  1774.       self.cursor_rect.set(0, 0, @name_width + 8, 32)
  1775.     else
  1776.       self.cursor_rect.empty
  1777.     end
  1778.   end
  1779. end
  1780. #==============================================================================
  1781. # 笆  Window_Location
  1782. #------------------------------------------------------------------------------
  1783. # 縲€繝。繝九Η繝シ逕サ髱「縺ァ・ゥ謨ー繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1784. class Game_Map
  1785.  
  1786. def name
  1787.  $map_infos[@map_id]
  1788. end
  1789. end
  1790.  
  1791. class Scene_Title
  1792. $map_infos = load_data("Data/MapInfos.rxdata")
  1793. for key in $map_infos.keys
  1794.  $map_infos[key] = $map_infos[key].name
  1795. end
  1796. end
  1797.  
  1798.  
  1799. #==============================================================================
  1800. # 笆  Window_Mapname
  1801. #------------------------------------------------------------------------------
  1802. # 縲€繝。繝九Η繝シ逕サ髱「縺ァ繝励Ξ繧、譎る俣繧定。ィ遉コ縺吶k繧ヲ繧」繝ウ繝峨え縺ァ縺吶€・
  1803. #==============================================================================
  1804.  
  1805. class Window_Mapname < Window_Base
  1806. #--------------------------------------------------------------------------
  1807. # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1808. #--------------------------------------------------------------------------
  1809. def refresh #initialize
  1810.  super(0, 0, 240, 96)
  1811.  self.contents = Bitmap.new(width - 52, height - 32)
  1812.  self.contents.font.name = $fontface
  1813.  self.contents.font.size = $fontsize
  1814.  self.opacity = 0
  1815. # refresh
  1816. end
  1817. #--------------------------------------------------------------------------
  1818. # 笳・繝ェ繝輔Ξ繝・す繝・
  1819. #--------------------------------------------------------------------------
  1820. def refresh
  1821.  self.contents.clear
  1822.  # Map Name
  1823.  #map = $game_map.name
  1824.  self.contents.font.color = system_color
  1825.  self.contents.font.size = 14
  1826.  self.contents.draw_text(4, 0, 220, 32, "Location")
  1827.   self.contents.font.size = $fontsize
  1828.  self.contents.font.color = normal_color
  1829.  self.contents.draw_text(110, 15, 80, 32, $game_map.name)
  1830. end
  1831. end
  1832. #==================================================
  1833. class Window_End < Window_Base
  1834.  
  1835. def initialize
  1836.  super(0, 0, 240, 150)
  1837.  self.contents = Bitmap.new(width - 52, height - 32)
  1838.  self.contents.font.name = $fontface
  1839.  self.contents.font.size = 30
  1840.  self.opacity = 0
  1841.  refresh
  1842. end
  1843. #--------------------------------------------------------------------------
  1844. # 笳・繝ェ繝輔Ξ繝・す繝・
  1845. #--------------------------------------------------------------------------
  1846. def refresh
  1847.   self.contents.clear
  1848.   self.contents.draw_text_outline(24, 0, 240, 32, "To Title")
  1849.   self.contents.draw_text_outline(10, 45, 240, 32, "Shutdown")
  1850.   self.contents.draw_text_outline(25, 85, 240, 32, "Cancel")
  1851. end
  1852. #==========================================
  1853. end
  1854. #==============================================================================
  1855. # 笆  Scene_Menu
  1856. #------------------------------------------------------------------------------
  1857. # 縲€繝。繝九Η繝シ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  1858. #==============================================================================
  1859.  
  1860. class Scene_Menu
  1861.   #--------------------------------------------------------------------------
  1862.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  1863.   #     menu_index : 繧ウ繝槭Φ繝峨・繧ォ繝シ繧ス繝ォ蛻晄悄菴咲スョ
  1864.   #--------------------------------------------------------------------------
  1865.   def initialize(menu_index = 0)
  1866.     @menu_index = menu_index
  1867.   end
  1868.   #--------------------------------------------------------------------------
  1869.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  1870.   #--------------------------------------------------------------------------
  1871.   def main
  1872.     #========================================
  1873.     # This is setting up the background picture
  1874.     @background = Sprite.new
  1875.     @background.bitmap = RPG::Cache.picture("background")
  1876.     @background.x = 0
  1877.     @background.y = 0
  1878.     #========================================
  1879.     # This is setting up the command pictures for 'item' etc..
  1880.     @command1 = Sprite.new
  1881.     @command1.bitmap = RPG::Cache.picture("cmscommand1")
  1882.     @command1.x = 15
  1883.     @command1.y = 40
  1884.     @command1.z = 100
  1885.     #========================================
  1886.     @command2 = Sprite.new
  1887.     @command2.bitmap = RPG::Cache.picture("cmscommand2")
  1888.     @command2.x = 15
  1889.     @command2.y = 40
  1890.     @command2.z = 100
  1891.     #========================================
  1892.     @command3 = Sprite.new
  1893.     @command3.bitmap = RPG::Cache.picture("cmscommand3")
  1894.     @command3.x = 15
  1895.     @command3.y = 40
  1896.     @command3.z = 100
  1897.     #========================================
  1898.     @command4 = Sprite.new
  1899.     @command4.bitmap = RPG::Cache.picture("cmscommand4")
  1900.     @command4.x = 15
  1901.     @command4.y = 40
  1902.     @command4.z = 100
  1903.     #========================================
  1904.     @command5 = Sprite.new
  1905.     @command5.bitmap = RPG::Cache.picture("cmscommand5")
  1906.     @command5.x = 15
  1907.     @command5.y = 40
  1908.     @command5.z = 100
  1909.     #========================================
  1910.     @command6 = Sprite.new
  1911.     @command6.bitmap = RPG::Cache.picture("cmscommand6")
  1912.     @command6.x = 15
  1913.     @command6.y = 40
  1914.     @command6.z = 100
  1915.     #========================================
  1916.     # This setting up the shadows for the commands.
  1917.     @commands1 = Sprite.new
  1918.     @commands1.bitmap = RPG::Cache.picture("cmscommandshadow")
  1919.     @commands1.x = 20
  1920.     @commands1.y = 45
  1921.     @commands1.z = 1
  1922.     @commands1.opacity = 155
  1923.     @commands1.visible = false
  1924.     #========================================
  1925.     @commands2 = Sprite.new
  1926.     @commands2.bitmap = RPG::Cache.picture("cmscommandshadow")
  1927.     @commands2.x = 20
  1928.     @commands2.y = 45
  1929.     @commands2.z = 1
  1930.     @commands2.opacity = 155
  1931.     @commands2.visible = false
  1932.     #========================================
  1933.     @commands3 = Sprite.new
  1934.     @commands3.bitmap = RPG::Cache.picture("cmscommandshadow")
  1935.     @commands3.x = 20
  1936.     @commands3.y = 45
  1937.     @commands3.z = 1
  1938.     @commands3.opacity = 155
  1939.     @commands3.visible = false
  1940.     #========================================
  1941.     @commands4 = Sprite.new
  1942.     @commands4.bitmap = RPG::Cache.picture("cmscommandshadow")
  1943.     @commands4.x = 20
  1944.     @commands4.y = 45
  1945.     @commands4.z = 1
  1946.     @commands4.opacity = 155
  1947.     @commands4.visible = false
  1948.     #========================================
  1949.     @commands5 = Sprite.new
  1950.     @commands5.bitmap = RPG::Cache.picture("cmscommandshadow")
  1951.     @commands5.x = 20
  1952.     @commands5.y = 45
  1953.     @commands5.z = 1
  1954.     @commands5.opacity = 155
  1955.     @commands5.visible = false
  1956.     #========================================
  1957.     @commands6 = Sprite.new
  1958.     @commands6.bitmap = RPG::Cache.picture("cmscommandshadow")
  1959.     @commands6.x = 20
  1960.     @commands6.y = 45
  1961.     @commands6.z = 1
  1962.     @commands6.opacity = 155
  1963.     @commands6.visible = false
  1964.     #========================================
  1965.     # This is setting up the arrow cursor used in the command window..
  1966.     @arrow = Sprite.new
  1967.     @arrow.bitmap = RPG::Cache.picture("arrow4")
  1968.     @arrow.x = 0
  1969.     @arrow.y = 45
  1970.     @arrow.z = 1000
  1971.     #========================================
  1972.     # This is setting up the arrow for the status window
  1973.     @arrow_status = Sprite.new
  1974.     @arrow_status.bitmap = RPG::Cache.picture("arrow4")
  1975.     @arrow_status.x = 260
  1976.     @arrow_status.y = 37
  1977.     @arrow_status.z = 1000
  1978.     @arrow_status.visible = false
  1979.     #========================================
  1980.     # This is setting up the status windows, making them not visible for the moment..
  1981.     @status_window1 = Sprite.new
  1982.     @status_window1.bitmap = RPG::Cache.picture("status window 1")
  1983.     @status_window1.x = 693
  1984.     @status_window1.y = 7
  1985.     @status_window1.z = 100
  1986.     @status_window1.visible = false
  1987.     #========================================
  1988.     @status_window2 = Sprite.new
  1989.     @status_window2.bitmap = RPG::Cache.picture("status window 2")
  1990.     @status_window2.x = 676
  1991.     @status_window2.y = 106
  1992.     @status_window2.z = 100
  1993.     @status_window2.visible = false
  1994.     #========================================
  1995.     @status_window3 = Sprite.new
  1996.     @status_window3.bitmap = RPG::Cache.picture("status window 3")
  1997.     @status_window3.x = 659
  1998.     @status_window3.y = 206
  1999.     @status_window3.z = 100
  2000.     @status_window3.visible = false
  2001.     #========================================
  2002.     @status_window4 = Sprite.new
  2003.     @status_window4.bitmap = RPG::Cache.picture("status window 4")
  2004.     @status_window4.x = 640
  2005.     @status_window4.y = 306
  2006.     @status_window4.z = 100
  2007.     @status_window4.visible = false
  2008.     #========================================
  2009.     # The shadows are set up for the status windows..
  2010.     @status_windowshadow1 = Sprite.new
  2011.     @status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
  2012.     @status_windowshadow1.x = 697
  2013.     @status_windowshadow1.y = 13
  2014.     @status_windowshadow1.z = 1
  2015.     @status_windowshadow1.opacity = 155
  2016.     @status_windowshadow1.visible = false
  2017.     #========================================
  2018.     @status_windowshadow2 = Sprite.new
  2019.     @status_windowshadow2.bitmap = RPG::Cache.picture("blackwindow2")
  2020.     @status_windowshadow2.x = 681
  2021.     @status_windowshadow2.y = 112
  2022.     @status_windowshadow2.z = 1
  2023.     @status_windowshadow2.opacity = 155
  2024.     @status_windowshadow2.visible = false
  2025.     #========================================
  2026.     @status_windowshadow3 = Sprite.new
  2027.     @status_windowshadow3.bitmap = RPG::Cache.picture("blackwindow2")
  2028.     @status_windowshadow3.x = 664
  2029.     @status_windowshadow3.y = 212
  2030.     @status_windowshadow3.z = 1
  2031.     @status_windowshadow3.opacity = 155
  2032.     @status_windowshadow3.visible = false
  2033.     #========================================
  2034.     @status_windowshadow4 = Sprite.new
  2035.     @status_windowshadow4.bitmap = RPG::Cache.picture("blackwindow2")
  2036.     @status_windowshadow4.x = 645
  2037.     @status_windowshadow4.y = 312
  2038.     @status_windowshadow4.z = 1
  2039.     @status_windowshadow4.opacity = 155
  2040.     @status_windowshadow4.visible = false
  2041.     #========================================
  2042.     # Here, certain status window pictures are made visible depending on
  2043.     # how many actors or players there are..
  2044.     if $game_party.actors.size == 1
  2045.       @status_window1.visible = true
  2046.       @status_windowshadow1.visible = true
  2047.     end
  2048.      if $game_party.actors.size == 2
  2049.        @status_window1.visible = true
  2050.        @status_windowshadow1.visible = true
  2051.        @status_window2.visible = true
  2052.        @status_windowshadow2.visible = true
  2053.      end
  2054.      if $game_party.actors.size == 3
  2055.        @status_window1.visible = true
  2056.        @status_windowshadow1.visible = true
  2057.        @status_window2.visible = true
  2058.        @status_windowshadow2.visible = true
  2059.        @status_window3.visible = true
  2060.        @status_windowshadow3.visible = true
  2061.      end
  2062.       if $game_party.actors.size == 4
  2063.        @status_window1.visible = true
  2064.        @status_windowshadow1.visible = true
  2065.        @status_window2.visible = true
  2066.        @status_windowshadow2.visible = true
  2067.        @status_window3.visible = true
  2068.        @status_windowshadow3.visible = true
  2069.        @status_window4.visible = true
  2070.        @status_windowshadow4.visible = true
  2071.      end
  2072.      #===========================================
  2073.      # The window displaying the gold, and playtime is set up...
  2074.      @playtimegoldpicture = Sprite.new
  2075.      @playtimegoldpicture.bitmap = RPG::Cache.picture("goldplaytimewindow")
  2076.      @playtimegoldpicture.x = 646
  2077.      @playtimegoldpicture.y = 404
  2078.      @playtimegoldpicture.z = 100
  2079.      #============================================
  2080.      # And its shadow
  2081.      @playtimegoldshadow = Sprite.new
  2082.      @playtimegoldshadow.bitmap = RPG::Cache.picture("goldplaytimeshadow")
  2083.      @playtimegoldshadow.x = 651
  2084.      @playtimegoldshadow.y = 409
  2085.      @playtimegoldshadow.z = 1
  2086.      @playtimegoldshadow.opacity = 155
  2087.      #============================================
  2088.      # Setting up the location window's bar....
  2089.      @location_bar = Sprite.new
  2090.      @location_bar.bitmap = RPG::Cache.picture("locationbar")
  2091.      @location_bar.x = 15
  2092.      @location_bar.y = 635
  2093.      #============================================
  2094.      # Setting up the actual window for the map, opacity - 0
  2095.      @location_window = Window_Mapname.new
  2096.      @location_window.x = 0
  2097.      @location_window.y = 609
  2098.      #============================================
  2099.      # Setting up a white bar below the location
  2100.      @location_white = Sprite.new
  2101.      @location_white.bitmap = RPG::Cache.picture("locationwhite")
  2102.      @location_white.x = - 8
  2103.      @location_white.y = 622
  2104.      @location_white.z = 120
  2105.      #============================================
  2106.      @playtime_window = Window_PlayTime.new
  2107.      @playtime_window.x = 645
  2108.      @playtime_window.y = 390
  2109.     # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧剃ス懈・
  2110.     # Command window, opacity - 0 so it is invisible, and commands are set to ""
  2111.     # - nothing so no text shows, as there is pictures used instead..
  2112.     s1 = ""
  2113.     s2 = ""
  2114.     s3 = ""
  2115.     s4 = ""
  2116.     s5 = ""
  2117.     s6 = ""
  2118.     @command_window = Window_Menucommand.new(200, [s1, s2, s3, s4, s5, s6])
  2119.     @command_window.opacity = 0
  2120.     @command_window.index = @menu_index
  2121.     # 繝代・繝・ぅ莠コ謨ー縺・0 莠コ縺ョ・エ蜷・
  2122.     if $game_party.actors.size == 0
  2123.       # 繧「繧、繝・・縲√せ繧-繝ォ縲∬」・y縲√せ繝・・繧ソ繧ケ繧堤┌蜉ケ蛹・
  2124.       @command_window.disable_item(0)
  2125.       @command_window.disable_item(1)
  2126.       @command_window.disable_item(2)
  2127.       @command_window.disable_item(3)
  2128.     end
  2129.     # 繧サ繝シ繝也ヲ∵-「縺ョ・エ蜷・
  2130.     if $game_system.save_disabled
  2131.       # 繧サ繝シ繝悶r辟。蜉ケ縺ォ縺吶k
  2132.       @command_window.disable_item(4)
  2133.     end
  2134.     # 繧エ繝シ繝ォ繝峨え繧」繝ウ繝峨え繧剃ス懈・
  2135.     @gold_window = Window_Gold.new
  2136.     @gold_window.x = 645
  2137.     @gold_window.y = 415
  2138.     @gold_window.opacity = 0
  2139.     # 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
  2140.     @status_window = Window_MenuStatus.new
  2141.     @status_window.x = 630
  2142.     @status_window.y = - 6
  2143.     @status_window.opacity = 0
  2144.     @status_window.visible = true
  2145.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  2146.     Graphics.transition
  2147.     # 繝。繧、繝ウ繝ォ繝シ繝・
  2148.     loop do
  2149.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  2150.       Graphics.update
  2151.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  2152.       Input.update
  2153.       # 繝輔Ξ繝シ繝 譖エ譁ー
  2154.       update
  2155.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  2156.       if $scene != self
  2157.         break
  2158.       end
  2159.     end
  2160.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  2161.     Graphics.freeze
  2162.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  2163.     @command_window.dispose
  2164.     @gold_window.dispose
  2165.     @status_window.dispose
  2166.     @background.dispose
  2167.     @command1.dispose
  2168.     @command2.dispose
  2169.     @command3.dispose
  2170.     @command4.dispose
  2171.     @command5.dispose
  2172.     @command6.dispose
  2173.     @commands1.dispose
  2174.     @commands2.dispose
  2175.     @commands3.dispose
  2176.     @commands4.dispose
  2177.     @commands5.dispose
  2178.     @commands6.dispose
  2179.     @arrow.dispose
  2180.     @status_window1.dispose
  2181.     @status_window2.dispose
  2182.     @status_window3.dispose
  2183.     @status_window4.dispose
  2184.     @status_windowshadow1.dispose
  2185.     @status_windowshadow2.dispose
  2186.     @status_windowshadow3.dispose
  2187.     @status_windowshadow4.dispose
  2188.     @playtimegoldpicture.dispose
  2189.     @playtimegoldshadow.dispose
  2190.     @location_bar.dispose
  2191.     @location_window.dispose
  2192.     @location_white.dispose
  2193.     @playtime_window.dispose
  2194.     @arrow_status.dispose
  2195.   end
  2196.   #--------------------------------------------------------------------------
  2197.   def delay(seconds)
  2198.   for i in 0...(seconds * 1)
  2199.     sleep 0.01
  2200.     Graphics.update
  2201.   end
  2202. end
  2203.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  2204.   #--------------------------------------------------------------------------
  2205.   def update
  2206.     if @command2.y < 100
  2207.       @command2.y += 20
  2208.     end
  2209.     if @command3.y < 160
  2210.       @command3.y += 20
  2211.     end
  2212.     if @command4.y < 220
  2213.       @command4.y += 20
  2214.     end
  2215.     if @command5.y < 280
  2216.       @command5.y += 20
  2217.     end
  2218.     if @command6.y < 340
  2219.       @command6.y += 20
  2220.     end
  2221.     if @command6.y >= 340
  2222.      @commands1.visible = true
  2223.      @commands2.visible = true
  2224.      @commands3.visible = true
  2225.      @commands4.visible = true
  2226.      @commands5.visible = true
  2227.      @commands6.visible = true
  2228.      end
  2229.     if @status_window1.x > 293
  2230.      @status_window1.x -= 50
  2231.     end
  2232.     if @status_window2.x > 276
  2233.      @status_window2.x -= 50
  2234.     end
  2235.     if @status_window3.x > 259
  2236.      @status_window3.x -= 50
  2237.     end
  2238.     if @status_window4.x > 240
  2239.      @status_window4.x -= 50
  2240.     end
  2241.     if @status_windowshadow1.x > 297
  2242.       @status_windowshadow1.x -= 50
  2243.     end
  2244.     if @status_windowshadow2.x > 281
  2245.       @status_windowshadow2.x -= 50
  2246.     end
  2247.     if @status_windowshadow3.x > 264
  2248.       @status_windowshadow3.x -= 50
  2249.     end
  2250.     if @status_windowshadow4.x > 245
  2251.       @status_windowshadow4.x -= 50
  2252.     end
  2253.     if @status_window.x > 230
  2254.       @status_window.x -= 50
  2255.       end
  2256.     if @playtimegoldpicture.x > 446
  2257.      @playtimegoldpicture.x -= 25
  2258.     end
  2259.     if @playtimegoldshadow.x > 451
  2260.      @playtimegoldshadow.x -= 25
  2261.    end
  2262.    if @playtime_window.x > 445
  2263.      @playtime_window.x -= 25
  2264.    end
  2265.    if @gold_window.x > 445
  2266.      @gold_window.x -= 25
  2267.    end
  2268.    if @location_bar.y > 435
  2269.      @location_bar.y -= 25
  2270.    end
  2271.    if @location_window.y > 409
  2272.      @location_window.y -= 25
  2273.    end
  2274.    if @location_white.y > 422
  2275.      @location_white.y -= 25
  2276.      end
  2277.      # 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
  2278.     @command_window.update
  2279.     @playtime_window.update
  2280.     @gold_window.update
  2281.     @status_window.update
  2282.     @arrow.update
  2283.     @playtime_window.update
  2284.     # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_command 繧貞他縺カ
  2285.     if @command_window.active
  2286.       update_command
  2287.       return
  2288.     end
  2289.     # 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_status 繧貞他縺カ
  2290.     if @status_window.active
  2291.       update_status
  2292.       return
  2293.     end
  2294.   end
  2295.   #--------------------------------------------------------------------------
  2296.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  2297.   #--------------------------------------------------------------------------
  2298.   def update_command
  2299.      case @command_window.index
  2300.     when 0
  2301.       @arrow.y = 45
  2302.       @commands1.y = 45
  2303.       @commands2.y = 105
  2304.       @commands3.y = 165
  2305.       @commands4.y = 225
  2306.       @commands5.y = 285
  2307.       @commands6.y = 345
  2308.       @status_windowshadow1.y = 13
  2309.       @status_windowshadow2.y = 112
  2310.       @status_windowshadow3.y = 212
  2311.       @status_windowshadow4.y = 312
  2312.       @playtimegoldshadow.y = 409
  2313.     when 1
  2314.       @arrow.y = 105
  2315.       @commands1.y = 42
  2316.       @commands2.y = 100
  2317.       @commands3.y = 162
  2318.       @commands4.y = 222
  2319.       @commands5.y = 282
  2320.       @commands6.y = 342
  2321.       @status_windowshadow1.y = 11
  2322.       @status_windowshadow2.y = 110
  2323.       @status_windowshadow3.y = 210
  2324.       @status_windowshadow4.y = 310
  2325.       @playtimegoldshadow.y = 406
  2326.     when 2
  2327.       @arrow.y = 165
  2328.       @commands1.y = 39
  2329.       @commands2.y = 97
  2330.       @commands3.y = 159
  2331.       @commands4.y = 219
  2332.       @commands5.y = 279
  2333.       @commands6.y = 339
  2334.       @status_windowshadow1.y = 8
  2335.       @status_windowshadow2.y = 107
  2336.       @status_windowshadow3.y = 207
  2337.       @status_windowshadow4.y = 307
  2338.       @playtimegoldshadow.y = 403
  2339.     when 3
  2340.       @arrow.y = 225
  2341.       @commands1.y = 36
  2342.       @commands2.y = 94
  2343.       @commands3.y = 156
  2344.       @commands4.y = 216
  2345.       @commands5.y = 276
  2346.       @commands6.y = 336
  2347.       @status_windowshadow1.y = 5
  2348.       @status_windowshadow2.y = 104
  2349.       @status_windowshadow3.y = 204
  2350.       @status_windowshadow4.y = 304
  2351.       @playtimegoldshadow.y = 400
  2352.     when 4
  2353.       @arrow.y = 285
  2354.       @commands1.y = 33
  2355.       @commands2.y = 91
  2356.       @commands3.y = 153
  2357.       @commands4.y = 213
  2358.       @commands5.y = 273
  2359.       @commands6.y = 333
  2360.       @status_windowshadow1.y = 2
  2361.       @status_windowshadow2.y = 101
  2362.       @status_windowshadow3.y = 201
  2363.       @status_windowshadow4.y = 301
  2364.       @playtimegoldshadow.y = 397
  2365.     when 5
  2366.       @arrow.y = 345
  2367.       @commands1.y = 30
  2368.       @commands2.y = 88
  2369.       @commands3.y = 150
  2370.       @commands4.y = 210
  2371.       @commands5.y = 270
  2372.       @commands6.y = 330
  2373.       @status_windowshadow1.y = - 1
  2374.       @status_windowshadow2.y = 99
  2375.       @status_windowshadow3.y = 199
  2376.       @status_windowshadow4.y = 299
  2377.       @playtimegoldshadow.y = 394
  2378.     end
  2379.     #======================
  2380.   # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  2381.     if Input.trigger?(Input::B)
  2382.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  2383.       @arrow.visible = false
  2384.       loop do
  2385.      if @command1.x > - 200
  2386.        @command1.x -= 40
  2387.        end
  2388.        if @command2.x > - 200
  2389.       @command2.x -= 40
  2390.     end
  2391.     if @command3.x > - 200
  2392.       @command3.x -= 40
  2393.     end
  2394.     if @command4.x > - 200
  2395.       @command4.x -= 40
  2396.     end
  2397.     if @command5.x > - 200
  2398.       @command5.x -= 40
  2399.     end
  2400.     if @command6.x > - 200
  2401.       @command6.x -= 40
  2402.     end
  2403.      @commands1.visible = false
  2404.      @commands2.visible = false
  2405.      @commands3.visible = false
  2406.      @commands4.visible = false
  2407.      @commands5.visible = false
  2408.      @commands6.visible = false
  2409.     if @status_window1.x < 640
  2410.      @status_window1.x += 50
  2411.     end
  2412.     if @status_window2.x < 640
  2413.      @status_window2.x += 50
  2414.     end
  2415.     if @status_window3.x < 640
  2416.      @status_window3.x += 50
  2417.     end
  2418.     if @status_window4.x < 640
  2419.      @status_window4.x += 50
  2420.     end
  2421.     if @status_windowshadow1.x < 640
  2422.       @status_windowshadow1.x += 50
  2423.     end
  2424.     if @status_windowshadow2.x < 640
  2425.       @status_windowshadow2.x += 50
  2426.     end
  2427.     if @status_windowshadow3.x < 640
  2428.       @status_windowshadow3.x += 50
  2429.     end
  2430.     if @status_windowshadow4.x < 640
  2431.       @status_windowshadow4.x += 50
  2432.     end
  2433.     if @status_window.x < 640
  2434.       @status_window.x += 50
  2435.       end
  2436.     if @playtimegoldpicture.x < 640
  2437.      @playtimegoldpicture.x += 25
  2438.     end
  2439.     if @playtimegoldshadow.x < 640
  2440.      @playtimegoldshadow.x += 25
  2441.    end
  2442.    if @playtime_window.x < 640
  2443.      @playtime_window.x += 25
  2444.    end
  2445.    if @gold_window.x < 640
  2446.      @gold_window.x += 25
  2447.    end
  2448.    if @location_bar.y < 480
  2449.      @location_bar.y += 25
  2450.    end
  2451.    if @location_window.y < 480
  2452.      @location_window.y += 25
  2453.    end
  2454.    if @location_white.y < 480
  2455.      @location_white.y += 25
  2456.    end
  2457.    delay(0.1)
  2458.    if @status_window.x >= 640
  2459.      break
  2460.    end
  2461.    end
  2462.       $game_system.se_play($data_system.cancel_se)
  2463.       # 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
  2464.       $scene = Scene_Map.new
  2465.       return
  2466.     end
  2467.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  2468.     if Input.trigger?(Input::C)
  2469.       # 繝代・繝・ぅ莠コ謨ー縺・0 莠コ縺ァ縲√そ繝シ繝悶€√ご繝シ繝 邨ゆコ・サ・螟悶・繧ウ繝槭Φ繝峨・・エ蜷・
  2470.       if $game_party.actors.size == 0 and @command_window.index < 4
  2471.         # 繝悶じ繝シ SE 繧呈シ泌・・
  2472.         $game_system.se_play($data_system.buzzer_se)
  2473.         return
  2474.       end
  2475.       # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
  2476.       case @command_window.index
  2477.       when 0  # 繧「繧、繝・・
  2478.         @command1.z = 999
  2479.         loop do
  2480.         if @status_window.x < 640
  2481.           @status_window.x += 50
  2482.           end
  2483.         if @status_window1.x < 640
  2484.           @status_window1.x += 50
  2485.         end
  2486.         if @status_window2.x < 640
  2487.           @status_window2.x += 50
  2488.         end
  2489.         if @status_window3.x < 640
  2490.           @status_window3.x += 50
  2491.         end
  2492.         if @status_window4.x < 640
  2493.           @status_window4.x += 50
  2494.         end
  2495.         if @status_windowshadow1.x < 640
  2496.           @status_windowshadow1.x += 50
  2497.         end
  2498.         if @status_windowshadow2.x < 640
  2499.           @status_windowshadow2.x += 50
  2500.         end
  2501.         if @status_windowshadow3.x < 640
  2502.           @status_windowshadow3.x += 50
  2503.         end
  2504.         if @status_windowshadow4.x < 640
  2505.           @status_windowshadow4.x += 50
  2506.         end
  2507.         if @playtimegoldpicture.x < 640
  2508.           @playtimegoldpicture.x += 50
  2509.         end
  2510.         if @playtimegoldshadow.x < 640
  2511.           @playtimegoldshadow.x += 50
  2512.         end
  2513.         if @gold_window.x < 640
  2514.           @gold_window.x += 50
  2515.         end
  2516.         if @playtime_window.x < 640
  2517.           @playtime_window.x += 50
  2518.         end
  2519.         if @command2.y > 40
  2520.           @command2.y -= 30
  2521.         end
  2522.         if @command3.y > 40
  2523.           @command3.y -= 30
  2524.         end
  2525.         if @command4.y > 40
  2526.           @command4.y -= 30
  2527.         end
  2528.         if @command5.y > 40
  2529.           @command5.y -= 30
  2530.         end
  2531.         if @command6.y > 40
  2532.           @command6.y -= 30
  2533.         end
  2534.         @commands2.visible = false
  2535.         @commands3.visible = false
  2536.         @commands4.visible = false
  2537.         @commands5.visible = false
  2538.         @commands6.visible = false
  2539.         @arrow.visible = false
  2540.         if @location_bar.y < 480
  2541.           @location_bar.y += 30
  2542.         end
  2543.         if @location_white.y < 480
  2544.           @location_white.y += 30
  2545.         end
  2546.         if @location_window.y < 480
  2547.           @location_window.y += 30
  2548.         end
  2549.         delay(0.1)
  2550.         if @command6.y <= 40
  2551.         break
  2552.       end
  2553.       end
  2554.         # 豎コ螳・ SE 繧呈シ泌・・
  2555.         $game_system.se_play($data_system.decision_se)
  2556.         # 繧「繧、繝・・逕サ髱「縺ォ蛻・j譖ソ縺・
  2557.         $scene = Scene_Item.new
  2558.       when 1  # 繧ケ繧-繝ォ
  2559.         # 豎コ螳・SE 繧呈シ泌・・
  2560.         $game_system.se_play($data_system.decision_se)
  2561.         # 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
  2562.         @command_window.active = false
  2563.         @status_window.active = true
  2564.         @status_window.index = 0
  2565.         @arrow_status.visible = true
  2566.       when 2  # 陬・y
  2567.         # 豎コ螳・SE 繧呈シ泌・・
  2568.         $game_system.se_play($data_system.decision_se)
  2569.         # 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
  2570.         @command_window.active = false
  2571.         @status_window.active = true
  2572.         @status_window.index = 0
  2573.         @arrow_status.visible = true
  2574.       when 3  # 繧ケ繝・・繧ソ繧ケ
  2575.         # 豎コ螳・SE 繧呈シ泌・・
  2576.         $game_system.se_play($data_system.decision_se)
  2577.         # 繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
  2578.         @command_window.active = false
  2579.         @status_window.active = true
  2580.         @status_window.index = 0
  2581.         @arrow_status.visible = true
  2582.       when 4  # 繧サ繝シ繝・
  2583.         # 繧サ繝シ繝也ヲ∵-「縺ョ・エ蜷・
  2584.         if $game_system.save_disabled
  2585.           # 繝悶じ繝シ SE 繧呈シ泌・・
  2586.           $game_system.se_play($data_system.buzzer_se)
  2587.           return
  2588.         end
  2589.         #=====================
  2590.                 @command5.z = 999
  2591.         loop do
  2592.         if @status_window.x < 640
  2593.           @status_window.x += 50
  2594.           end
  2595.         if @status_window1.x < 640
  2596.           @status_window1.x += 50
  2597.         end
  2598.         if @status_window2.x < 640
  2599.           @status_window2.x += 50
  2600.         end
  2601.         if @status_window3.x < 640
  2602.           @status_window3.x += 50
  2603.         end
  2604.         if @status_window4.x < 640
  2605.           @status_window4.x += 50
  2606.         end
  2607.         if @status_windowshadow1.x < 640
  2608.           @status_windowshadow1.x += 50
  2609.         end
  2610.         if @status_windowshadow2.x < 640
  2611.           @status_windowshadow2.x += 50
  2612.         end
  2613.         if @status_windowshadow3.x < 640
  2614.           @status_windowshadow3.x += 50
  2615.         end
  2616.         if @status_windowshadow4.x < 640
  2617.           @status_windowshadow4.x += 50
  2618.         end
  2619.         if @playtimegoldpicture.x < 640
  2620.           @playtimegoldpicture.x += 50
  2621.         end
  2622.         if @playtimegoldshadow.x < 640
  2623.           @playtimegoldshadow.x += 50
  2624.         end
  2625.         if @gold_window.x < 640
  2626.           @gold_window.x += 50
  2627.         end
  2628.         if @playtime_window.x < 640
  2629.           @playtime_window.x += 50
  2630.         end
  2631.         if @command2.y > 40
  2632.           @command2.y -= 30
  2633.         end
  2634.         if @command3.y > 40
  2635.           @command3.y -= 30
  2636.         end
  2637.         if @command4.y > 40
  2638.           @command4.y -= 30
  2639.         end
  2640.         if @command5.y > 40
  2641.           @command5.y -= 30
  2642.         end
  2643.         if @command6.y > 40
  2644.           @command6.y -= 30
  2645.         end
  2646.         @commands2.visible = false
  2647.         @commands3.visible = false
  2648.         @commands4.visible = false
  2649.         @commands5.visible = false
  2650.         @commands6.visible = false
  2651.          @arrow.visible = false
  2652.         if @location_bar.y < 480
  2653.           @location_bar.y += 30
  2654.         end
  2655.         if @location_white.y < 480
  2656.           @location_white.y += 30
  2657.         end
  2658.         if @location_window.y < 480
  2659.           @location_window.y += 30
  2660.         end
  2661.         delay(0.1)
  2662.         if @command6.y <= 40
  2663.         break
  2664.       end
  2665.       end
  2666.         # 豎コ螳・SE 繧呈シ泌・・
  2667.         $game_system.se_play($data_system.decision_se)
  2668.         # 繧サ繝シ繝也判髱「縺ォ蛻・j譖ソ縺・
  2669.         $scene = Scene_Save.new
  2670.       when 5  # 繧イ繝シ繝 邨ゆコ・
  2671.                 @command6.z = 999
  2672.         loop do
  2673.         if @status_window.x < 640
  2674.           @status_window.x += 50
  2675.           end
  2676.         if @status_window1.x < 640
  2677.           @status_window1.x += 50
  2678.         end
  2679.         if @status_window2.x < 640
  2680.           @status_window2.x += 50
  2681.         end
  2682.         if @status_window3.x < 640
  2683.           @status_window3.x += 50
  2684.         end
  2685.         if @status_window4.x < 640
  2686.           @status_window4.x += 50
  2687.         end
  2688.         if @status_windowshadow1.x < 640
  2689.           @status_windowshadow1.x += 50
  2690.         end
  2691.         if @status_windowshadow2.x < 640
  2692.           @status_windowshadow2.x += 50
  2693.         end
  2694.         if @status_windowshadow3.x < 640
  2695.           @status_windowshadow3.x += 50
  2696.         end
  2697.         if @status_windowshadow4.x < 640
  2698.           @status_windowshadow4.x += 50
  2699.         end
  2700.         if @playtimegoldpicture.x < 640
  2701.           @playtimegoldpicture.x += 50
  2702.         end
  2703.         if @playtimegoldshadow.x < 640
  2704.           @playtimegoldshadow.x += 50
  2705.         end
  2706.         if @gold_window.x < 640
  2707.           @gold_window.x += 50
  2708.         end
  2709.         if @playtime_window.x < 640
  2710.           @playtime_window.x += 50
  2711.         end
  2712.         if @command2.y > 40
  2713.           @command2.y -= 30
  2714.         end
  2715.         if @command3.y > 40
  2716.           @command3.y -= 30
  2717.         end
  2718.         if @command4.y > 40
  2719.           @command4.y -= 30
  2720.         end
  2721.         if @command5.y > 40
  2722.           @command5.y -= 30
  2723.         end
  2724.         if @command6.y > 40
  2725.           @command6.y -= 30
  2726.         end
  2727.         @commands2.visible = false
  2728.         @commands3.visible = false
  2729.         @commands4.visible = false
  2730.         @commands5.visible = false
  2731.         @commands6.visible = false
  2732.         @arrow.visible = false
  2733.         if @location_bar.y < 480
  2734.           @location_bar.y += 30
  2735.         end
  2736.         if @location_white.y < 480
  2737.           @location_white.y += 30
  2738.         end
  2739.         if @location_window.y < 480
  2740.           @location_window.y += 30
  2741.         end
  2742.         delay(0.1)
  2743.         if @command6.y <= 40
  2744.         break
  2745.       end
  2746.       end
  2747.         # 豎コ螳・SE 繧呈シ泌・・
  2748.         $game_system.se_play($data_system.decision_se)
  2749.         # 繧イ繝シ繝 邨ゆコ・判髱「縺ォ蛻・j譖ソ縺・
  2750.         $scene = Scene_End.new
  2751.       end
  2752.       return
  2753.     end
  2754.   end
  2755.   #--------------------------------------------------------------------------
  2756.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ケ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  2757.   #--------------------------------------------------------------------------
  2758.   def update_status
  2759.     case @command_window.index
  2760.     when 1
  2761.       @arrow.y = 105
  2762.       @commands1.y = 42
  2763.       @commands2.y = 100
  2764.       @commands3.y = 162
  2765.       @commands4.y = 222
  2766.       @commands5.y = 282
  2767.       @commands6.y = 342
  2768.       @status_windowshadow1.y = 11
  2769.       @status_windowshadow2.y = 110
  2770.       @status_windowshadow3.y = 210
  2771.       @status_windowshadow4.y = 310
  2772.       @playtimegoldshadow.y = 406
  2773.     when 2
  2774.       @arrow.y = 165
  2775.       @commands1.y = 39
  2776.       @commands2.y = 97
  2777.       @commands3.y = 159
  2778.       @commands4.y = 219
  2779.       @commands5.y = 279
  2780.       @commands6.y = 339
  2781.       @status_windowshadow1.y = 8
  2782.       @status_windowshadow2.y = 107
  2783.       @status_windowshadow3.y = 207
  2784.       @status_windowshadow4.y = 307
  2785.       @playtimegoldshadow.y = 403
  2786.     when 3
  2787.       @arrow.y = 225
  2788.       @commands1.y = 36
  2789.       @commands2.y = 94
  2790.       @commands3.y = 156
  2791.       @commands4.y = 216
  2792.       @commands5.y = 276
  2793.       @commands6.y = 336
  2794.       @status_windowshadow1.y = 5
  2795.       @status_windowshadow2.y = 104
  2796.       @status_windowshadow3.y = 204
  2797.       @status_windowshadow4.y = 304
  2798.       @playtimegoldshadow.y = 400
  2799.       end
  2800.   #========================
  2801.     case @status_window.index
  2802.     when 0
  2803.       @arrow_status.y = 37
  2804.       @arrow_status.x = 260
  2805.     when 1
  2806.       @arrow_status.y = 137
  2807.       @arrow_status.x = 265 - @status_window.index * 25
  2808.     when 2
  2809.       @arrow_status.y = 237
  2810.       @arrow_status.x = 265 - @status_window.index * 25
  2811.     when 3
  2812.       @arrow_status.y = 337
  2813.       @arrow_status.x = 265 - @status_window.index * 23
  2814.       end
  2815.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  2816.     if Input.trigger?(Input::B)
  2817.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  2818.       $game_system.se_play($data_system.cancel_se)
  2819.       # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝悶↓縺吶k
  2820.       @command_window.active = true
  2821.       @status_window.active = false
  2822.       @status_window.index = -1
  2823.       @arrow_status.visible = false
  2824.       return
  2825.     end
  2826.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  2827.     if Input.trigger?(Input::C)
  2828.       # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
  2829.       case @command_window.index
  2830.       when 1  # 繧ケ繧-繝ォ
  2831.         # 縺薙・繧「繧ッ繧ソ繝シ縺ョ陦悟虚蛻カ髯舌′ 2 莉・荳翫・・エ蜷・
  2832.         if $game_party.actors[@status_window.index].restriction >= 2
  2833.           # 繝悶じ繝シ SE 繧呈シ泌・・
  2834.           $game_system.se_play($data_system.buzzer_se)
  2835.           return
  2836.         end
  2837.         @command2.z = 999
  2838.         loop do
  2839.         if @status_window.x < 640
  2840.           @status_window.x += 50
  2841.           end
  2842.         if @status_window1.x < 640
  2843.           @status_window1.x += 50
  2844.         end
  2845.         if @status_window2.x < 640
  2846.           @status_window2.x += 50
  2847.         end
  2848.         if @status_window3.x < 640
  2849.           @status_window3.x += 50
  2850.         end
  2851.         if @status_window4.x < 640
  2852.           @status_window4.x += 50
  2853.         end
  2854.         if @status_windowshadow1.x < 640
  2855.           @status_windowshadow1.x += 50
  2856.         end
  2857.         if @status_windowshadow2.x < 640
  2858.           @status_windowshadow2.x += 50
  2859.         end
  2860.         if @status_windowshadow3.x < 640
  2861.           @status_windowshadow3.x += 50
  2862.         end
  2863.         if @status_windowshadow4.x < 640
  2864.           @status_windowshadow4.x += 50
  2865.         end
  2866.         if @playtimegoldpicture.x < 640
  2867.           @playtimegoldpicture.x += 50
  2868.         end
  2869.         if @playtimegoldshadow.x < 640
  2870.           @playtimegoldshadow.x += 50
  2871.         end
  2872.         if @gold_window.x < 640
  2873.           @gold_window.x += 50
  2874.         end
  2875.         if @playtime_window.x < 640
  2876.           @playtime_window.x += 50
  2877.         end
  2878.         if @command2.y > 40
  2879.           @command2.y -= 30
  2880.         end
  2881.         if @command3.y > 40
  2882.           @command3.y -= 30
  2883.         end
  2884.         if @command4.y > 40
  2885.           @command4.y -= 30
  2886.         end
  2887.         if @command5.y > 40
  2888.           @command5.y -= 30
  2889.         end
  2890.         if @command6.y > 40
  2891.           @command6.y -= 30
  2892.         end
  2893.         @commands2.visible = false
  2894.         @commands3.visible = false
  2895.         @commands4.visible = false
  2896.         @commands5.visible = false
  2897.         @commands6.visible = false
  2898.         @arrow.visible = false
  2899.         @arrow_status.visible = false
  2900.         if @location_bar.y < 480
  2901.           @location_bar.y += 30
  2902.         end
  2903.         if @location_white.y < 480
  2904.           @location_white.y += 30
  2905.         end
  2906.         if @location_window.y < 480
  2907.           @location_window.y += 30
  2908.         end
  2909.         delay(0.1)
  2910.         if @command6.y <= 40
  2911.         break
  2912.       end
  2913.       end
  2914.         # 豎コ螳・SE 繧呈シ泌・・
  2915.         $game_system.se_play($data_system.decision_se)
  2916.         # 繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
  2917.         $scene = Scene_Skill.new(@status_window.index)
  2918.       when 2  # 陬・y
  2919.                 @command3.z = 999
  2920.         loop do
  2921.         if @status_window.x < 640
  2922.           @status_window.x += 50
  2923.           end
  2924.         if @status_window1.x < 640
  2925.           @status_window1.x += 50
  2926.         end
  2927.         if @status_window2.x < 640
  2928.           @status_window2.x += 50
  2929.         end
  2930.         if @status_window3.x < 640
  2931.           @status_window3.x += 50
  2932.         end
  2933.         if @status_window4.x < 640
  2934.           @status_window4.x += 50
  2935.         end
  2936.         if @status_windowshadow1.x < 640
  2937.           @status_windowshadow1.x += 50
  2938.         end
  2939.         if @status_windowshadow2.x < 640
  2940.           @status_windowshadow2.x += 50
  2941.         end
  2942.         if @status_windowshadow3.x < 640
  2943.           @status_windowshadow3.x += 50
  2944.         end
  2945.         if @status_windowshadow4.x < 640
  2946.           @status_windowshadow4.x += 50
  2947.         end
  2948.         if @playtimegoldpicture.x < 640
  2949.           @playtimegoldpicture.x += 50
  2950.         end
  2951.         if @playtimegoldshadow.x < 640
  2952.           @playtimegoldshadow.x += 50
  2953.         end
  2954.         if @gold_window.x < 640
  2955.           @gold_window.x += 50
  2956.         end
  2957.         if @playtime_window.x < 640
  2958.           @playtime_window.x += 50
  2959.         end
  2960.         if @command2.y > 40
  2961.           @command2.y -= 30
  2962.         end
  2963.         if @command3.y > 40
  2964.           @command3.y -= 30
  2965.         end
  2966.         if @command4.y > 40
  2967.           @command4.y -= 30
  2968.         end
  2969.         if @command5.y > 40
  2970.           @command5.y -= 30
  2971.         end
  2972.         if @command6.y > 40
  2973.           @command6.y -= 30
  2974.         end
  2975.         @commands2.visible = false
  2976.         @commands3.visible = false
  2977.         @commands4.visible = false
  2978.         @commands5.visible = false
  2979.         @commands6.visible = false
  2980.         @arrow.visible = false
  2981.         @arrow_status.visible = false
  2982.         if @location_bar.y < 480
  2983.           @location_bar.y += 30
  2984.         end
  2985.         if @location_white.y < 480
  2986.           @location_white.y += 30
  2987.         end
  2988.         if @location_window.y < 480
  2989.           @location_window.y += 30
  2990.         end
  2991.         delay(0.1)
  2992.         if @command6.y <= 40
  2993.         break
  2994.       end
  2995.       end
  2996.         # 豎コ螳・SE 繧呈シ泌・・
  2997.         $game_system.se_play($data_system.decision_se)
  2998.         # 陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
  2999.         $scene = Scene_Equip.new(@status_window.index)
  3000.       when 3  # 繧ケ繝・・繧ソ繧ケ
  3001.                 @command4.z = 999
  3002.         loop do
  3003.         if @status_window.x < 640
  3004.           @status_window.x += 50
  3005.           end
  3006.         if @status_window1.x < 640
  3007.           @status_window1.x += 50
  3008.         end
  3009.         if @status_window2.x < 640
  3010.           @status_window2.x += 50
  3011.         end
  3012.         if @status_window3.x < 640
  3013.           @status_window3.x += 50
  3014.         end
  3015.         if @status_window4.x < 640
  3016.           @status_window4.x += 50
  3017.         end
  3018.         if @status_windowshadow1.x < 640
  3019.           @status_windowshadow1.x += 50
  3020.         end
  3021.         if @status_windowshadow2.x < 640
  3022.           @status_windowshadow2.x += 50
  3023.         end
  3024.         if @status_windowshadow3.x < 640
  3025.           @status_windowshadow3.x += 50
  3026.         end
  3027.         if @status_windowshadow4.x < 640
  3028.           @status_windowshadow4.x += 50
  3029.         end
  3030.         if @playtimegoldpicture.x < 640
  3031.           @playtimegoldpicture.x += 50
  3032.         end
  3033.         if @playtimegoldshadow.x < 640
  3034.           @playtimegoldshadow.x += 50
  3035.         end
  3036.         if @gold_window.x < 640
  3037.           @gold_window.x += 50
  3038.         end
  3039.         if @playtime_window.x < 640
  3040.           @playtime_window.x += 50
  3041.         end
  3042.         if @command2.y > 40
  3043.           @command2.y -= 30
  3044.         end
  3045.         if @command3.y > 40
  3046.           @command3.y -= 30
  3047.         end
  3048.         if @command4.y > 40
  3049.           @command4.y -= 30
  3050.         end
  3051.         if @command5.y > 40
  3052.           @command5.y -= 30
  3053.         end
  3054.         if @command6.y > 40
  3055.           @command6.y -= 30
  3056.         end
  3057.         @commands2.visible = false
  3058.         @commands3.visible = false
  3059.         @commands4.visible = false
  3060.         @commands5.visible = false
  3061.         @commands6.visible = false
  3062.         @arrow.visible = false
  3063.         @arrow_status.visible = false
  3064.         if @location_bar.y < 480
  3065.           @location_bar.y += 30
  3066.         end
  3067.         if @location_white.y < 480
  3068.           @location_white.y += 30
  3069.         end
  3070.         if @location_window.y < 480
  3071.           @location_window.y += 30
  3072.         end
  3073.         delay(0.1)
  3074.         if @command6.y <= 40
  3075.         break
  3076.       end
  3077.       end
  3078.         # 豎コ螳・SE 繧呈シ泌・・
  3079.         $game_system.se_play($data_system.decision_se)
  3080.         # 繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
  3081.         $scene = Scene_Status.new(@status_window.index)
  3082.       end
  3083.       return
  3084.     end
  3085.   end
  3086. end
  3087. #==============================================================================
  3088. # 笆  Scene_Item
  3089. #------------------------------------------------------------------------------
  3090. # 縲€繧「繧、繝・・逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  3091. #==============================================================================
  3092.  
  3093. class Scene_Item
  3094.   #--------------------------------------------------------------------------
  3095.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  3096.   #--------------------------------------------------------------------------
  3097.   def main
  3098.     #==============================================
  3099.     # Setting up all the images
  3100.     @background = Sprite.new
  3101.     @background.bitmap = RPG::Cache.picture("background")
  3102.     @background.x = 0
  3103.     @background.y = 0
  3104.     #================help window pic====================
  3105.     @help_picture = Sprite.new
  3106.     @help_picture.bitmap = RPG::Cache.picture("helpwindow12")
  3107.     @help_picture.x = 0
  3108.     @help_picture.y = - 52
  3109.     #=================Command=======================
  3110.     @command1 = Sprite.new
  3111.     @command1.bitmap = RPG::Cache.picture("cmscommand1")
  3112.     @command1.x = 15
  3113.     @command1.y = 40
  3114.     @command1.z = 100
  3115.     #=====================shadow=======================
  3116.     @commands1 = Sprite.new
  3117.     @commands1.bitmap = RPG::Cache.picture("cmscommandshadow")
  3118.     @commands1.x = 20
  3119.     @commands1.y = 45
  3120.     @commands1.z = 1
  3121.     @commands1.opacity = 155
  3122.     #===================item window======================
  3123.     @item_picture = Sprite.new
  3124.     @item_picture.bitmap = RPG::Cache.picture("itemwindow")
  3125.     @item_picture.x = 7
  3126.     @item_picture.y = 509
  3127.     @item_picture.z = 11
  3128.     #===============================================
  3129.     @item_shadow = Sprite.new
  3130.     @item_shadow.bitmap = RPG::Cache.picture("itemshadow")
  3131.     @item_shadow.x = 12
  3132.     @item_shadow.y = 514
  3133.     @item_shadow.z = 1
  3134.     @item_shadow.opacity = 155
  3135.     #===============================================
  3136.     @help_window = Window_Menuhelp.new
  3137.     @item_window = Window_Menuitem.new
  3138.     @item_window.z = 100
  3139.     @item_window.help_window = @help_window
  3140.     # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧剃ス懈・ (荳榊庄隕悶・髱槭い繧ッ繝・ぅ繝悶↓險-螳・
  3141.     @target_picture = Sprite.new
  3142.     @target_picture.bitmap = RPG::Cache.picture("targetwindow")
  3143.     @target_picture.z = 998
  3144.     @target_picture.visible = false
  3145.     @target_window = Window_Target.new
  3146.     @target_window.z = 999
  3147.     @target_window.opacity = 0
  3148.     @target_window.visible = false
  3149.     @target_window.active = false
  3150.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  3151.     Graphics.transition
  3152.     # 繝。繧、繝ウ繝ォ繝シ繝・
  3153.     loop do
  3154.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  3155.       Graphics.update
  3156.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  3157.       Input.update
  3158.       # 繝輔Ξ繝シ繝 譖エ譁ー
  3159.       update
  3160.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  3161.       if $scene != self
  3162.         break
  3163.       end
  3164.     end
  3165.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  3166.     Graphics.freeze
  3167.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  3168.     @help_window.dispose
  3169.     @item_window.dispose
  3170.     @target_window.dispose
  3171.     @background.dispose
  3172.     @command1.dispose
  3173.     @commands1.dispose
  3174.     @help_picture.dispose
  3175.     @item_shadow.dispose
  3176.   end
  3177.   #--------------------------------------------------------------------------
  3178.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  3179.   #--------------------------------------------------------------------------
  3180.   def update
  3181.     # 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
  3182.     @help_window.update
  3183.     @item_window.update
  3184.     @target_window.update
  3185.     @command1.update
  3186.     # enter animation
  3187.     if @item_shadow.y > 114
  3188.       @item_shadow.y -= 50
  3189.       end
  3190.     if @item_picture.y > 109
  3191.       @item_picture.y -= 50
  3192.     end
  3193.     if @item_window.y > 100
  3194.       @item_window.y -= 50
  3195.     end
  3196.     if @help_picture.y < - 4
  3197.       @help_picture.y += 24
  3198.     end
  3199.     if @help_window.y < - 7
  3200.       @help_window.y += 35
  3201.     end
  3202.     if @command1.x < 215
  3203.       @command1.x += 100
  3204.     end
  3205.     if @command1.y < 50
  3206.       @command1.y += 5
  3207.     end
  3208.     if @commands1.x < 220
  3209.       @commands1.x += 100
  3210.     end
  3211.     if @commands1.y < 55
  3212.       @commands1.y += 5
  3213.       end
  3214.     # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_item 繧貞他縺カ
  3215.     if @item_window.active
  3216.       update_item
  3217.       return
  3218.     end
  3219.     # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_target 繧貞他縺カ
  3220.     if @target_window.active
  3221.       update_target
  3222.       return
  3223.     end
  3224.   end
  3225.   #--------------------------------------------------------------------------
  3226.   def delay(seconds)
  3227.   for i in 0...(seconds * 1)
  3228.     sleep 0.01
  3229.     Graphics.update
  3230.   end
  3231. end
  3232.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3233.   #--------------------------------------------------------------------------
  3234.   def update_item
  3235.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3236.     if Input.trigger?(Input::B)
  3237.       # exit animation
  3238.       $game_system.se_play($data_system.cancel_se)
  3239.       loop do
  3240.         if @item_shadow.y < 480
  3241.           @item_shadow.y += 50
  3242.           end
  3243.         if @item_picture.y < 480
  3244.           @item_picture.y += 50
  3245.         end
  3246.         if @item_window.y < 480
  3247.           @item_window.y += 50
  3248.         end
  3249.         if @help_picture.y > - 50
  3250.           @help_picture.y -= 30
  3251.         end
  3252.         if @help_window.y > - 64
  3253.           @help_window.y -= 30
  3254.         end
  3255.         if @command1.x > 15
  3256.           @command1.x -= 100
  3257.         end
  3258.         if @command1.y > 40
  3259.           @command1.y -= 5
  3260.         end
  3261.         if @commands1.x > 20
  3262.           @commands1.x -= 100
  3263.         end
  3264.         if @commands1.y > 45
  3265.           @commands1.y -= 5
  3266.         end
  3267.         delay(0.2)
  3268.         if @item_picture.y >= 480
  3269.           break
  3270.         end
  3271.         end
  3272.       # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  3273.       $scene = Scene_Menu.new(0)
  3274.       return
  3275.     end
  3276.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3277.     if Input.trigger?(Input::C)
  3278.       # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
  3279.       @item = @item_window.item
  3280.       # 菴ソ逕ィ繧「繧、繝・・縺ァ縺ッ縺ェ縺・ エ蜷・
  3281.       unless @item.is_a?(RPG::Item)
  3282.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3283.         $game_system.se_play($data_system.buzzer_se)
  3284.         return
  3285.       end
  3286.       # 菴ソ逕ィ縺ァ縺阪↑縺・ エ蜷・
  3287.       unless $game_party.item_can_use?(@item.id)
  3288.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3289.         $game_system.se_play($data_system.buzzer_se)
  3290.         return
  3291.       end
  3292.       # 豎コ螳・SE 繧呈シ泌・・
  3293.       $game_system.se_play($data_system.decision_se)
  3294.       # 蜉ケ譫懃ッ・峇縺悟袖譁ケ縺ョ・エ蜷・
  3295.       if @item.scope >= 3
  3296.         # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
  3297.         @item_window.active = false
  3298.         @target_window.x = (@item_window.index + 1) % 2 * 304
  3299.         @target_picture.x = (@item_window.index + 1) % 2 * 304
  3300.         @target_picture.visible = true
  3301.         @target_window.visible = true
  3302.         @target_window.active = true
  3303.         # 蜉ケ譫懃ッ・峇 (蜊倅ス・蜈ィ菴・ 縺ォ蠢懊§縺ヲ繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
  3304.         if @item.scope == 4 || @item.scope == 6
  3305.           @target_window.index = -1
  3306.         else
  3307.           @target_window.index = 0
  3308.         end
  3309.       # 蜉ケ譫懃ッ・峇縺悟袖譁ケ莉・螟悶・・エ蜷・
  3310.       else
  3311.         # 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
  3312.         if @item.common_event_id > 0
  3313.           # 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
  3314.           $game_temp.common_event_id = @item.common_event_id
  3315.           # 繧「繧、繝・・縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
  3316.           $game_system.se_play(@item.menu_se)
  3317.           # 豸郁€怜刀縺ョ・エ蜷・
  3318.           if @item.consumable
  3319.             # 菴ソ逕ィ縺励◆繧「繧、繝・・繧・1 貂帙i縺・
  3320.             $game_party.lose_item(@item.id, 1)
  3321.             # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ・・岼繧貞・謠冗判
  3322.             @item_window.draw_item(@item_window.index)
  3323.           end
  3324.           # 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
  3325.           $scene = Scene_Map.new
  3326.           return
  3327.         end
  3328.       end
  3329.       return
  3330.     end
  3331.   end
  3332.   #--------------------------------------------------------------------------
  3333.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3334.   #--------------------------------------------------------------------------
  3335.   def update_target
  3336.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3337.     if Input.trigger?(Input::B)
  3338.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  3339.       $game_system.se_play($data_system.cancel_se)
  3340.       # 繧「繧、繝・・蛻・l縺ェ縺ゥ縺ァ菴ソ逕ィ縺ァ縺阪↑縺上↑縺」縺溷 エ蜷・
  3341.       unless $game_party.item_can_use?(@item.id)
  3342.         # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
  3343.         @item_window.refresh
  3344.       end
  3345.       # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧呈カ亥悉
  3346.       @item_window.active = true
  3347.       @target_window.visible = false
  3348.       @target_picture.visible = false
  3349.       @target_window.active = false
  3350.       return
  3351.     end
  3352.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3353.     if Input.trigger?(Input::C)
  3354.       # 繧「繧、繝・・繧剃スソ縺・・縺」縺溷 エ蜷・
  3355.       if $game_party.item_number(@item.id) == 0
  3356.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3357.         $game_system.se_play($data_system.buzzer_se)
  3358.         return
  3359.       end
  3360.       # 繧ソ繝シ繧イ繝・ヨ縺悟・菴薙・・エ蜷・
  3361.       if @target_window.index == -1
  3362.         # 繝代・繝・ぅ蜈ィ菴薙↓繧「繧、繝・・縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
  3363.         used = false
  3364.         for i in $game_party.actors
  3365.           used |= i.item_effect(@item)
  3366.         end
  3367.       end
  3368.       # 繧ソ繝シ繧イ繝・ヨ縺悟腰菴薙・・エ蜷・
  3369.       if @target_window.index >= 0
  3370.         # 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧「繧、繝・・縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
  3371.         target = $game_party.actors[@target_window.index]
  3372.         used = target.item_effect(@item)
  3373.       end
  3374.       # 繧「繧、繝・・繧剃スソ縺」縺溷 エ蜷・
  3375.       if used
  3376.         # 繧「繧、繝・・縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
  3377.         $game_system.se_play(@item.menu_se)
  3378.         # 豸郁€怜刀縺ョ・エ蜷・
  3379.         if @item.consumable
  3380.           # 菴ソ逕ィ縺励◆繧「繧、繝・・繧・1 貂帙i縺・
  3381.           $game_party.lose_item(@item.id, 1)
  3382.           # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ・・岼繧貞・謠冗判
  3383.           @item_window.draw_item(@item_window.index)
  3384.         end
  3385.         # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
  3386.         @target_window.refresh
  3387.         # 蜈ィ貊・・・エ蜷・
  3388.         if $game_party.all_dead?
  3389.           # 繧イ繝シ繝 繧ェ繝シ繝舌・逕サ髱「縺ォ蛻・j譖ソ縺・
  3390.           $scene = Scene_Gameover.new
  3391.           return
  3392.         end
  3393.         # 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
  3394.         if @item.common_event_id > 0
  3395.           # 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
  3396.           $game_temp.common_event_id = @item.common_event_id
  3397.           # 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
  3398.           $scene = Scene_Map.new
  3399.           return
  3400.         end
  3401.       end
  3402.       # 繧「繧、繝・・繧剃スソ繧上↑縺九▲縺溷 エ蜷・
  3403.       unless used
  3404.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3405.         $game_system.se_play($data_system.buzzer_se)
  3406.       end
  3407.       return
  3408.     end
  3409.   end
  3410. end
  3411. #==============================================================================
  3412. # 笆  Scene_Skill
  3413. #------------------------------------------------------------------------------
  3414. # 縲€繧ケ繧-繝ォ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  3415. #==============================================================================
  3416.  
  3417. class Scene_Skill
  3418.   #--------------------------------------------------------------------------
  3419.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  3420.   #     actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
  3421.   #--------------------------------------------------------------------------
  3422.   def initialize(actor_index = 0, equip_index = 0)
  3423.     @actor_index = actor_index
  3424.   end
  3425.   #--------------------------------------------------------------------------
  3426.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  3427.   #--------------------------------------------------------------------------
  3428.   def main
  3429.      #==============================================
  3430.     # Setting up all the images
  3431.     @background = Sprite.new
  3432.     @background.bitmap = RPG::Cache.picture("background")
  3433.     @background.x = 0
  3434.     @background.y = 0
  3435.     #================help window image=====================
  3436.     @help_picture = Sprite.new
  3437.     @help_picture.bitmap = RPG::Cache.picture("helpwindow12")
  3438.     @help_picture.x = 0
  3439.     @help_picture.y = - 52
  3440.     #==============Command image=====================
  3441.     @command2 = Sprite.new
  3442.     @command2.bitmap = RPG::Cache.picture("cmscommand2")
  3443.     @command2.x = 15
  3444.     @command2.y = 40
  3445.     @command2.z = 100
  3446.     #==============shadow================================
  3447.     @commands2 = Sprite.new
  3448.     @commands2.bitmap = RPG::Cache.picture("cmscommandshadow")
  3449.     @commands2.x = 20
  3450.     @commands2.y = 45
  3451.     @commands2.z = 1
  3452.     @commands2.opacity = 155
  3453.     #==============status window==========================
  3454.     @status_window1 = Sprite.new
  3455.     @status_window1.bitmap = RPG::Cache.picture("status window 1")
  3456.     @status_window1.x = 693
  3457.     @status_window1.y = 45
  3458.     @status_window1.z = 100
  3459.     #============shadow================================
  3460.     @status_windowshadow1 = Sprite.new
  3461.     @status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
  3462.     @status_windowshadow1.x = 697
  3463.     @status_windowshadow1.y = 50
  3464.     @status_windowshadow1.z = 1
  3465.     @status_windowshadow1.opacity = 155
  3466.     #==================skill window pic====================
  3467.     @skill_picture = Sprite.new
  3468.     @skill_picture.bitmap = RPG::Cache.picture("skillwindow")
  3469.     @skill_picture.x = 7
  3470.     @skill_picture.y = 540
  3471.     @skill_picture.z = 2
  3472.     #================skill shadow pic=====================
  3473.     @skill_shadow = Sprite.new
  3474.     @skill_shadow.bitmap = RPG::Cache.picture("skillshadow")
  3475.     @skill_shadow.x = 14
  3476.     @skill_shadow.y = 545
  3477.     @skill_shadow.z = 1
  3478.     @skill_shadow.opacity = 155
  3479.     #===============target window========================
  3480.     @target_picture = Sprite.new
  3481.     @target_picture.bitmap = RPG::Cache.picture("targetwindow")
  3482.     @target_picture.z = 998
  3483.     @target_picture.visible = false
  3484.     # 繧「繧ッ繧ソ繝シ繧貞叙蠕・
  3485.     @actor = $game_party.actors[@actor_index]
  3486.     # 繝倥Ν繝励え繧」繝ウ繝峨え縲√せ繝・・繧ソ繧ケ繧ヲ繧」繝ウ繝峨え縲√せ繧-繝ォ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
  3487.     @help_window = Window_Menuhelp.new
  3488.     @help_window.opacity = 0
  3489.     @status_window = Window_SkillStatus.new(@actor)
  3490.     @skill_window = Window_Menuskill.new(@actor)
  3491.     @skill_window.opacity = 0
  3492.     # 繝倥Ν繝励え繧」繝ウ繝峨え繧帝未騾」莉倥¢
  3493.     @skill_window.help_window = @help_window
  3494.     # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧剃ス懈・ (荳榊庄隕悶・髱槭い繧ッ繝・ぅ繝悶↓險-螳・
  3495.     @target_window = Window_Target.new
  3496.     @target_window.z = 999
  3497.     @target_window.opacity = 0
  3498.     @target_window.visible = false
  3499.     @target_window.active = false
  3500.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  3501.     Graphics.transition
  3502.     # 繝。繧、繝ウ繝ォ繝シ繝・
  3503.     loop do
  3504.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  3505.       Graphics.update
  3506.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  3507.       Input.update
  3508.       # 繝輔Ξ繝シ繝 譖エ譁ー
  3509.       update
  3510.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  3511.       if $scene != self
  3512.         break
  3513.       end
  3514.     end
  3515.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  3516.     Graphics.freeze
  3517.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  3518.     @help_window.dispose
  3519.     @status_window.dispose
  3520.     @skill_window.dispose
  3521.     @target_window.dispose
  3522.     @background.dispose
  3523.     @help_picture.dispose
  3524.     @commands2.dispose
  3525.     @command2.dispose
  3526.     @status_window1.dispose
  3527.     @status_windowshadow1.dispose
  3528.     @skill_picture.dispose
  3529.     @skill_shadow.dispose
  3530.   end
  3531.   #--------------------------------------------------------------------------
  3532.   def delay(seconds)
  3533.   for i in 0...(seconds * 1)
  3534.     sleep 0.01
  3535.     Graphics.update
  3536.   end
  3537. end
  3538.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  3539.   #--------------------------------------------------------------------------
  3540.   def update
  3541.     # enter animation
  3542.     if @help_picture.y < - 4
  3543.       @help_picture.y += 24
  3544.     end
  3545.     if @help_window.y < - 7
  3546.       @help_window.y += 35
  3547.     end
  3548.     if @command2.y < 60
  3549.       @command2.y += 20
  3550.     end
  3551.     if @commands2.y < 65
  3552.       @commands2.y += 20
  3553.     end
  3554.     if @skill_shadow.y > 145
  3555.       @skill_shadow.y -= 50
  3556.       end
  3557.     if @skill_picture.y > 140
  3558.       @skill_picture.y -= 50
  3559.     end
  3560.     if @skill_window.y > 131
  3561.       @skill_window.y -= 50
  3562.     end
  3563.     if @status_window1.x > 293
  3564.        @status_window1.x -= 100
  3565.     end
  3566.     if @status_window.x > 230
  3567.        @status_window.x -= 100
  3568.      end
  3569.      if @status_windowshadow1.x > 297
  3570.        @status_windowshadow1.x -= 100
  3571.      end
  3572.     # 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
  3573.     @help_window.update
  3574.     @status_window.update
  3575.     @skill_window.update
  3576.     @target_window.update
  3577.     # 繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_skill 繧貞他縺カ
  3578.     if @skill_window.active
  3579.       update_skill
  3580.       return
  3581.     end
  3582.     # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_target 繧貞他縺カ
  3583.     if @target_window.active
  3584.       update_target
  3585.       return
  3586.     end
  3587.   end
  3588.   #--------------------------------------------------------------------------
  3589.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3590.   #--------------------------------------------------------------------------
  3591.   def update_skill
  3592.     if Input.trigger?(Input::B)
  3593.       # exit animation
  3594.        loop do
  3595.          if @skill_shadow.y < 480
  3596.            @skill_shadow.y += 50
  3597.            end
  3598.         if @skill_picture.y < 480
  3599.           @skill_picture.y += 50
  3600.         end
  3601.         if @skill_window.y < 480
  3602.           @skill_window.y += 50
  3603.         end
  3604.         if @help_picture.y > - 50
  3605.           @help_picture.y -= 30
  3606.         end
  3607.         if @help_window.y > - 64
  3608.           @help_window.y -= 30
  3609.         end
  3610.         if @command2.x > 15
  3611.           @command2.x -= 100
  3612.         end
  3613.         if @command2.y > 40
  3614.           @command2.y -= 10
  3615.         end
  3616.         if @commands2.x > 20
  3617.           @commands2.x -= 100
  3618.         end
  3619.         if @commands2.y > 45
  3620.           @commands2.y -= 10
  3621.         end
  3622.         if @status_window1.x < 640
  3623.            @status_window1.x += 100
  3624.         end
  3625.         if @status_window.x < 640
  3626.            @status_window.x += 100
  3627.          end
  3628.          if @status_windowshadow1.x < 640
  3629.            @status_windowshadow1.x += 100
  3630.            end
  3631.         delay(0.2)
  3632.         if @skill_picture.y >= 480
  3633.           break
  3634.         end
  3635.         end
  3636.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  3637.       $game_system.se_play($data_system.cancel_se)
  3638.       # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  3639.       $scene = Scene_Menu.new(1)
  3640.       return
  3641.     end
  3642.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3643.     if Input.trigger?(Input::C)
  3644.       # 繧ケ繧-繝ォ繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
  3645.       @skill = @skill_window.skill
  3646.       # 菴ソ逕ィ縺ァ縺阪↑縺・ エ蜷・
  3647.       if @skill == nil or not @actor.skill_can_use?(@skill.id)
  3648.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3649.         $game_system.se_play($data_system.buzzer_se)
  3650.         return
  3651.       end
  3652.       # 豎コ螳・SE 繧呈シ泌・・
  3653.       $game_system.se_play($data_system.decision_se)
  3654.       # 蜉ケ譫懃ッ・峇縺悟袖譁ケ縺ョ・エ蜷・
  3655.       if @skill.scope >= 3
  3656.         # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
  3657.         @skill_window.active = false
  3658.         @target_window.x = (@skill_window.index + 1) % 2 * 304
  3659.         @target_picture.x = (@skill_window.index + 1) % 2 * 304
  3660.         @target_window.visible = true
  3661.         @target_window.active = true
  3662.         @target_picture.visible = true
  3663.         # 蜉ケ譫懃ッ・峇 (蜊倅ス・蜈ィ菴・ 縺ォ蠢懊§縺ヲ繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
  3664.         if @skill.scope == 4 || @skill.scope == 6
  3665.           @target_window.index = -1
  3666.         elsif @skill.scope == 7
  3667.           @target_window.index = @actor_index - 10
  3668.         else
  3669.           @target_window.index = 0
  3670.         end
  3671.       # 蜉ケ譫懃ッ・峇縺悟袖譁ケ莉・螟悶・・エ蜷・
  3672.       else
  3673.         # 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
  3674.         if @skill.common_event_id > 0
  3675.           # 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
  3676.           $game_temp.common_event_id = @skill.common_event_id
  3677.           # 繧ケ繧-繝ォ縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
  3678.           $game_system.se_play(@skill.menu_se)
  3679.           # SP 豸郁イサ
  3680.           @actor.sp -= @skill.sp_cost
  3681.           # 蜷・え繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
  3682.           @status_window.refresh
  3683.           @skill_window.refresh
  3684.           @target_window.refresh
  3685.           # 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
  3686.           $scene = Scene_Map.new
  3687.           return
  3688.         end
  3689.       end
  3690.       return
  3691.     end
  3692.     # R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3693.     if Input.trigger?(Input::R)
  3694.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  3695.       $game_system.se_play($data_system.cursor_se)
  3696.       # 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
  3697.       @actor_index += 1
  3698.       @actor_index %= $game_party.actors.size
  3699.       # 蛻・縺ョ繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
  3700.       $scene = Scene_Skill.new(@actor_index)
  3701.       return
  3702.     end
  3703.     # L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3704.     if Input.trigger?(Input::L)
  3705.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  3706.       $game_system.se_play($data_system.cursor_se)
  3707.       # 蜑阪・繧「繧ッ繧ソ繝シ縺ク
  3708.       @actor_index += $game_party.actors.size - 1
  3709.       @actor_index %= $game_party.actors.size
  3710.       # 蛻・縺ョ繧ケ繧-繝ォ逕サ髱「縺ォ蛻・j譖ソ縺・
  3711.       $scene = Scene_Skill.new(@actor_index)
  3712.       return
  3713.     end
  3714.   end
  3715.   #--------------------------------------------------------------------------
  3716.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3717.   #--------------------------------------------------------------------------
  3718.   def update_target
  3719.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3720.     if Input.trigger?(Input::B)
  3721.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  3722.       $game_system.se_play($data_system.cancel_se)
  3723.       # 繧ソ繝シ繧イ繝・ヨ繧ヲ繧」繝ウ繝峨え繧呈カ亥悉
  3724.       @skill_window.active = true
  3725.       @target_window.visible = false
  3726.       @target_window.active = false
  3727.       @target_picture.visible = false
  3728.       return
  3729.     end
  3730.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  3731.     if Input.trigger?(Input::C)
  3732.       # SP 蛻・l縺ェ縺ゥ縺ァ菴ソ逕ィ縺ァ縺阪↑縺上↑縺」縺溷 エ蜷・
  3733.       unless @actor.skill_can_use?(@skill.id)
  3734.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3735.         $game_system.se_play($data_system.buzzer_se)
  3736.         return
  3737.       end
  3738.       # 繧ソ繝シ繧イ繝・ヨ縺悟・菴薙・・エ蜷・
  3739.       if @target_window.index == -1
  3740.         # 繝代・繝・ぅ蜈ィ菴薙↓繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
  3741.         used = false
  3742.         for i in $game_party.actors
  3743.           used |= i.skill_effect(@actor, @skill)
  3744.         end
  3745.       end
  3746.       # 繧ソ繝シ繧イ繝・ヨ縺御スソ逕ィ閠・・・エ蜷・
  3747.       if @target_window.index <= -2
  3748.         # 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
  3749.         target = $game_party.actors[@target_window.index + 10]
  3750.         used = target.skill_effect(@actor, @skill)
  3751.       end
  3752.       # 繧ソ繝シ繧イ繝・ヨ縺悟腰菴薙・・エ蜷・
  3753.       if @target_window.index >= 0
  3754.         # 繧ソ繝シ繧イ繝・ヨ縺ョ繧「繧ッ繧ソ繝シ縺ォ繧ケ繧-繝ォ縺ョ菴ソ逕ィ蜉ケ譫懊r驕ゥ逕ィ
  3755.         target = $game_party.actors[@target_window.index]
  3756.         used = target.skill_effect(@actor, @skill)
  3757.       end
  3758.       # 繧ケ繧-繝ォ繧剃スソ縺」縺溷 エ蜷・
  3759.       if used
  3760.         # 繧ケ繧-繝ォ縺ョ菴ソ逕ィ譎・SE 繧呈シ泌・・
  3761.         $game_system.se_play(@skill.menu_se)
  3762.         # SP 豸郁イサ
  3763.         @actor.sp -= @skill.sp_cost
  3764.         # 蜷・え繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
  3765.         @status_window.refresh
  3766.         @skill_window.refresh
  3767.         @target_window.refresh
  3768.         # 蜈ィ貊・・・エ蜷・
  3769.         if $game_party.all_dead?
  3770.           # 繧イ繝シ繝 繧ェ繝シ繝舌・逕サ髱「縺ォ蛻・j譖ソ縺・
  3771.           $scene = Scene_Gameover.new
  3772.           return
  3773.         end
  3774.         # 繧ウ繝「繝ウ繧、繝吶Φ繝・ID 縺梧怏蜉ケ縺ョ・エ蜷・
  3775.         if @skill.common_event_id > 0
  3776.           # 繧ウ繝「繝ウ繧、繝吶Φ繝亥他縺ウ蜃コ縺嶺コ育エ・
  3777.           $game_temp.common_event_id = @skill.common_event_id
  3778.           # 繝槭ャ繝礼判髱「縺ォ蛻・j譖ソ縺・
  3779.           $scene = Scene_Map.new
  3780.           return
  3781.         end
  3782.       end
  3783.       # 繧ケ繧-繝ォ繧剃スソ繧上↑縺九▲縺溷 エ蜷・
  3784.       unless used
  3785.         # 繝悶じ繝シ SE 繧呈シ泌・・
  3786.         $game_system.se_play($data_system.buzzer_se)
  3787.       end
  3788.       return
  3789.     end
  3790.   end
  3791. end
  3792. #==============================================================================
  3793. # 笆  Scene_Equip
  3794. #------------------------------------------------------------------------------
  3795. # 縲€陬・y逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  3796. #==============================================================================
  3797.  
  3798. class Scene_Equip
  3799.   #--------------------------------------------------------------------------
  3800.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  3801.   #     actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
  3802.   #     equip_index : 陬・y繧、繝ウ繝・ャ繧ッ繧ケ
  3803.   #--------------------------------------------------------------------------
  3804.   def initialize(actor_index = 0, equip_index = 0)
  3805.     @actor_index = actor_index
  3806.     @equip_index = equip_index
  3807.   end
  3808.   #--------------------------------------------------------------------------
  3809.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  3810.   #--------------------------------------------------------------------------
  3811.   def main
  3812.      # This is setting up the background picture
  3813.     @background = Sprite.new
  3814.     @background.bitmap = RPG::Cache.picture("background")
  3815.     @background.x = 0
  3816.     @background.y = 0
  3817.     #=============the equip command pic========================
  3818.     @command3 = Sprite.new
  3819.     @command3.bitmap = RPG::Cache.picture("cmscommand3")
  3820.     @command3.x = 15
  3821.     @command3.y = 40
  3822.     @command3.z = 100
  3823.     #=================the shadow of it=======================
  3824.     @commands3 = Sprite.new
  3825.     @commands3.bitmap = RPG::Cache.picture("cmscommandshadow")
  3826.     @commands3.x = 20
  3827.     @commands3.y = 45
  3828.     @commands3.z = 1
  3829.     @commands3.opacity = 155
  3830.     #================the status window pic====================
  3831.     @status_window1 = Sprite.new
  3832.     @status_window1.bitmap = RPG::Cache.picture("status window 1")
  3833.     @status_window1.x = 693
  3834.     @status_window1.y = 45
  3835.     @status_window1.z = 100
  3836.     #=============the shadow of it===========================
  3837.     @status_windowshadow1 = Sprite.new
  3838.     @status_windowshadow1.bitmap = RPG::Cache.picture("blackwindow2")
  3839.     @status_windowshadow1.x = 697
  3840.     @status_windowshadow1.y = 50
  3841.     @status_windowshadow1.z = 1
  3842.     @status_windowshadow1.opacity = 155
  3843.     #================help window image=====================
  3844.     @help_picture = Sprite.new
  3845.     @help_picture.bitmap = RPG::Cache.picture("helpwindow12")
  3846.     @help_picture.x = 0
  3847.     @help_picture.y = - 52
  3848.     #==============This sets up the 3rd status picture=============
  3849.     @picture_status2 = Sprite.new
  3850.     @picture_status2.bitmap = RPG::Cache.picture("windowstatus2")
  3851.     @picture_status2.x = 850
  3852.     @picture_status2.y = 135
  3853.     @picture_status2.z = 3
  3854.     #============the shadow of the 2nd status pic================
  3855.     @picture_shadow2 = Sprite.new
  3856.     @picture_shadow2.bitmap = RPG::Cache.picture("windowstatus2shadow")
  3857.     @picture_shadow2.x = 855
  3858.     @picture_shadow2.y = 140
  3859.     @picture_shadow2.z = 1
  3860.     @picture_shadow2.opacity = 155
  3861.     #======the pic for equip left (status window 2 in this script)==========
  3862.     @equip_window1 = Sprite.new
  3863.     @equip_window1.bitmap = RPG::Cache.picture("equipwindow1")
  3864.     @equip_window1.x = - 113
  3865.     @equip_window1.y = 117
  3866.     @equip_window1.z = 2
  3867.     #============the equipment selection window pic===============
  3868.     @equip_window2 = Sprite.new
  3869.     @equip_window2.bitmap = RPG::Cache.picture("equipwindow2")
  3870.     @equip_window2.x = 245
  3871.     @equip_window2.y = 585
  3872.     @equip_window2.z = 2
  3873.     #================the shadow of it==========================
  3874.     @equip_shadow2 = Sprite.new
  3875.     @equip_shadow2.bitmap = RPG::Cache.picture("equipwindow2shadow")
  3876.     @equip_shadow2.x = 250
  3877.     @equip_shadow2.y = 590
  3878.     @equip_shadow2.opacity = 155
  3879.     @equip_shadow2.z = 1
  3880.     #================the selection arrow=========================
  3881.     @arrow = Sprite.new
  3882.     @arrow.bitmap = RPG::Cache.picture("arrow4")
  3883.     @arrow.x = - 60
  3884.     @arrow.y = 141
  3885.     @arrow.z = 1000
  3886.     # 繧「繧ッ繧ソ繝シ繧貞叙蠕・
  3887.     @actor = $game_party.actors[@actor_index]
  3888.     # 繧ヲ繧」繝ウ繝峨え繧剃ス懈・
  3889.     @status_window = Window_SkillStatus.new(@actor)
  3890.     @status_window2 = Window_Status2.new(@actor)
  3891.     @status_window2.x = 850
  3892.     @status_window2.y = 120
  3893.     @status_window2.opacity = 0
  3894.     @help_window = Window_Menuhelp.new
  3895.     @help_window.opacity = 0
  3896.     @right_window = Window_EquipRight.new(@actor)
  3897.     @right_window.visible = true
  3898.     @item_window1 = Window_EquipItem.new(@actor, 0)
  3899.     @item_window2 = Window_EquipItem.new(@actor, 1)
  3900.     @item_window3 = Window_EquipItem.new(@actor, 2)
  3901.     @item_window4 = Window_EquipItem.new(@actor, 3)
  3902.     @item_window5 = Window_EquipItem.new(@actor, 4)
  3903.     # 繝倥Ν繝励え繧」繝ウ繝峨え繧帝未騾」莉倥¢
  3904.     @right_window.help_window = @help_window
  3905.     @item_window1.help_window = @help_window
  3906.     @item_window2.help_window = @help_window
  3907.     @item_window3.help_window = @help_window
  3908.     @item_window4.help_window = @help_window
  3909.     @item_window5.help_window = @help_window
  3910.     # 繧ォ繝シ繧ス繝ォ菴咲スョ繧定ィ-螳・
  3911.     @right_window.index = @equip_index
  3912.     refresh
  3913.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  3914.     Graphics.transition
  3915.     # 繝。繧、繝ウ繝ォ繝シ繝・
  3916.     loop do
  3917.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  3918.       Graphics.update
  3919.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  3920.       Input.update
  3921.       # 繝輔Ξ繝シ繝 譖エ譁ー
  3922.       update
  3923.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  3924.       if $scene != self
  3925.         break
  3926.       end
  3927.     end
  3928.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  3929.     Graphics.freeze
  3930.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  3931.     @help_window.dispose
  3932.     @right_window.dispose
  3933.     @item_window1.dispose
  3934.     @item_window2.dispose
  3935.     @item_window3.dispose
  3936.     @item_window4.dispose
  3937.     @item_window5.dispose
  3938.     @background.dispose
  3939.     @command3.dispose
  3940.     @commands3.dispose
  3941.     @status_window1.dispose
  3942.     @status_windowshadow1.dispose
  3943.     @help_picture.dispose
  3944.     @status_window.dispose
  3945.     @status_window2.dispose
  3946.     @equip_window1.dispose
  3947.     @equip_window2.dispose
  3948.     @picture_status2.dispose
  3949.     @arrow.dispose
  3950.     @equip_shadow2.dispose
  3951.     @picture_shadow2.dispose
  3952.   end
  3953.   #--------------------------------------------------------------------------
  3954.   # 笳・繝ェ繝輔Ξ繝・す繝・
  3955.   #--------------------------------------------------------------------------
  3956.   def refresh
  3957.     # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜿ッ隕也憾諷玖ィ-螳・
  3958.     @item_window1.visible = (@right_window.index == 0)
  3959.     @item_window2.visible = (@right_window.index == 1)
  3960.     @item_window3.visible = (@right_window.index == 2)
  3961.     @item_window4.visible = (@right_window.index == 3)
  3962.     @item_window5.visible = (@right_window.index == 4)
  3963.     # 迴セ蝨ィ陬・y荳-縺ョ繧「繧、繝・・繧貞叙蠕・
  3964.     item1 = @right_window.item
  3965.     # 迴セ蝨ィ縺ョ繧「繧、繝・・繧ヲ繧」繝ウ繝峨え繧・@item_window 縺ォ險-螳・
  3966.     case @right_window.index
  3967.     when 0
  3968.       @item_window = @item_window1
  3969.     when 1
  3970.       @item_window = @item_window2
  3971.     when 2
  3972.       @item_window = @item_window3
  3973.     when 3
  3974.       @item_window = @item_window4
  3975.     when 4
  3976.       @item_window = @item_window5
  3977.     end
  3978.     # 繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3979.     if @right_window.active
  3980.       # 陬・y螟画峩蠕後・繝代Λ繝。繝シ繧ソ繧呈カ亥悉
  3981.       @status_window2.set_new_parameters(nil, nil, nil, nil, nil, nil, nil)
  3982.     end
  3983.     # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  3984.     if @item_window.active
  3985.       # 迴セ蝨ィ驕ク謚樔ク-縺ョ繧「繧、繝・・繧貞叙蠕・
  3986.       item2 = @item_window.item
  3987.       # 陬・y繧貞、画峩
  3988.       last_hp = @actor.hp
  3989.       last_sp = @actor.sp
  3990.       @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
  3991.       # 陬・y螟画峩蠕後・繝代Λ繝。繝シ繧ソ繧貞叙蠕・
  3992.       new_atk = @actor.atk
  3993.       new_pdef = @actor.pdef
  3994.       new_mdef = @actor.mdef
  3995.       new_str = @actor.str
  3996.       new_dex = @actor.dex
  3997.       new_agi = @actor.agi
  3998.       new_int = @actor.int
  3999.       # 陬・y繧呈綾縺・
  4000.       @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
  4001.       @actor.hp = last_hp
  4002.       @actor.sp = last_sp
  4003.       # 繝ャ繝輔ヨ繧ヲ繧」繝ウ繝峨え縺ォ謠冗判
  4004.     @status_window2.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int)
  4005.     @status_window2.refresh
  4006.     end
  4007.   end
  4008.   #--------------------------------------------------------------------------
  4009.   def delay(seconds)
  4010.   for i in 0...(seconds * 1)
  4011.     sleep 0.01
  4012.     Graphics.update
  4013.   end
  4014. end
  4015.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  4016.   #--------------------------------------------------------------------------
  4017.   def update
  4018.     @status_window.update
  4019.         if @command3.y < 60
  4020.       @command3.y += 20
  4021.     end
  4022.     if @commands3.y < 65
  4023.       @commands3.y += 20
  4024.     end
  4025.       if @help_picture.y < - 4
  4026.       @help_picture.y += 24
  4027.     end
  4028.     if @help_window.y < - 7
  4029.       @help_window.y += 35
  4030.     end
  4031.     if @status_window1.x > 293
  4032.        @status_window1.x -= 80
  4033.      end
  4034.     if @status_windowshadow1.x > 297
  4035.       @status_windowshadow1.x -= 80
  4036.       end
  4037.         if @status_window.x > 230
  4038.        @status_window.x -= 50
  4039.      end
  4040.        if @status_window2.x > 250
  4041.       @status_window2.x -= 100
  4042.     end
  4043.       if @picture_status2.x > 250
  4044.       @picture_status2.x -= 100
  4045.     end
  4046.      if @picture_shadow2.x > 255
  4047.       @picture_shadow2.x -= 100
  4048.     end
  4049.     if @equip_window1.x < 7
  4050.       @equip_window1.x += 20
  4051.     end
  4052.     if @right_window.x < 20
  4053.       @right_window.x += 20
  4054.     end
  4055.     if @equip_window2.y > 285
  4056.       @equip_window2.y -= 50
  4057.     end
  4058.     if @equip_shadow2.y > 290
  4059.       @equip_shadow2.y -= 50
  4060.       end
  4061.     if @arrow.x < - 10
  4062.       @arrow.x += 10
  4063.     end
  4064.        if @item_window1.y > 273
  4065.       @item_window1.y -= 50
  4066.     end
  4067.     if @item_window2.y > 273
  4068.       @item_window2.y -= 50
  4069.     end
  4070.     if @item_window3.y > 273
  4071.       @item_window3.y -= 50
  4072.     end
  4073.     if @item_window4.y > 273
  4074.       @item_window4.y -= 50
  4075.     end
  4076.     if @item_window5.y > 273
  4077.       @item_window5.y -= 50
  4078.       end
  4079.     # 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
  4080.     @right_window.update
  4081.     @item_window.update
  4082.     refresh
  4083.     # 繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_right 繧貞他縺カ
  4084.     if @right_window.active
  4085.       update_right
  4086.       return
  4087.     end
  4088.     # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・ update_item 繧貞他縺カ
  4089.     if @item_window.active
  4090.       update_item
  4091.       return
  4092.     end
  4093.   end
  4094.   #--------------------------------------------------------------------------
  4095.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繝ゥ繧、繝医え繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  4096.   #--------------------------------------------------------------------------
  4097.   def update_right
  4098.     case @right_window.index
  4099.     when 0
  4100.       @arrow.y = 141
  4101.     when 1
  4102.       @arrow.y = 208
  4103.     when 2
  4104.       @arrow.y = 276
  4105.     when 3
  4106.       @arrow.y = 344
  4107.     when 4
  4108.       @arrow.y = 408
  4109.       end
  4110.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4111.     if Input.trigger?(Input::B)
  4112.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  4113.       loop do
  4114.           if @command3.x > 15
  4115.           @command3.x -= 100
  4116.         end
  4117.         if @command3.y > 40
  4118.           @command3.y -= 10
  4119.         end
  4120.         if @commands3.x > 20
  4121.           @commands2.x -= 100
  4122.         end
  4123.         if @commands3.y > 45
  4124.           @commands3.y -= 10
  4125.         end
  4126.         if @help_picture.y > - 50
  4127.           @help_picture.y -= 30
  4128.         end
  4129.         if @help_window.y > - 64
  4130.           @help_window.y -= 30
  4131.         end
  4132.          if @status_window1.x < 640
  4133.            @status_window1.x += 100
  4134.         end
  4135.         if @status_window.x < 640
  4136.            @status_window.x += 100
  4137.          end
  4138.          if @status_windowshadow1.x < 640
  4139.            @status_windowshadow1.x += 100
  4140.          end
  4141.          if @status_window2.x < 640
  4142.             @status_window2.x += 100
  4143.          end
  4144.         if @picture_status2.x < 640
  4145.            @picture_status2.x += 100
  4146.          end
  4147.          if @picture_shadow2.x < 640
  4148.            @picture_shadow2.x += 100
  4149.          end
  4150.           if @equip_window1.x > - 250
  4151.           @equip_window1.x -= 50
  4152.          end
  4153.         if @right_window.x > - 250
  4154.        @right_window.x -= 50
  4155.       end
  4156.       if @equip_window2.y < 480
  4157.        @equip_window2.y += 50
  4158.      end
  4159.       if @equip_shadow2.y < 480
  4160.       @equip_shadow2.y += 50
  4161.       end
  4162.       if @item_window1.y < 480
  4163.         @item_window1.y += 50
  4164.       end
  4165.       if @item_window2.y < 480
  4166.         @item_window2.y += 50
  4167.       end
  4168.        if @item_window3.y < 480
  4169.         @item_window3.y += 50
  4170.        end
  4171.        if @item_window4.y < 480
  4172.        @item_window4.y += 50
  4173.       end
  4174.       if @item_window5.y < 480
  4175.          @item_window5.y += 50
  4176.        end
  4177.     @arrow.visible = false
  4178.       delay(0.1)
  4179.       if @equip_window1.x <= - 250
  4180.         break
  4181.     end
  4182.     end
  4183.        $game_system.se_play($data_system.cancel_se)
  4184.       # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  4185.       $scene = Scene_Menu.new(2)
  4186.       return
  4187.     end
  4188.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4189.     if Input.trigger?(Input::C)
  4190.       # 陬・y蝗コ螳壹・・エ蜷・
  4191.       if @actor.equip_fix?(@right_window.index)
  4192.         # 繝悶じ繝シ SE 繧呈シ泌・・
  4193.         $game_system.se_play($data_system.buzzer_se)
  4194.         return
  4195.       end
  4196.       # 豎コ螳・SE 繧呈シ泌・・
  4197.       $game_system.se_play($data_system.decision_se)
  4198.       # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
  4199.       @right_window.active = false
  4200.       @item_window.active = true
  4201.       @item_window.index = 0
  4202.       return
  4203.     end
  4204.     # R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4205.     if Input.trigger?(Input::R)
  4206.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4207.       $game_system.se_play($data_system.cursor_se)
  4208.       # 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
  4209.       @actor_index += 1
  4210.       @actor_index %= $game_party.actors.size
  4211.       # 蛻・縺ョ陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
  4212.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  4213.       return
  4214.     end
  4215.     # L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4216.     if Input.trigger?(Input::L)
  4217.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4218.       $game_system.se_play($data_system.cursor_se)
  4219.       # 蜑阪・繧「繧ッ繧ソ繝シ縺ク
  4220.       @actor_index += $game_party.actors.size - 1
  4221.       @actor_index %= $game_party.actors.size
  4222.       # 蛻・縺ョ陬・y逕サ髱「縺ォ蛻・j譖ソ縺・
  4223.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  4224.       return
  4225.     end
  4226.   end
  4227.   #--------------------------------------------------------------------------
  4228.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー (繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺後い繧ッ繝・ぅ繝悶・・エ蜷・
  4229.   #--------------------------------------------------------------------------
  4230.   def update_item
  4231.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4232.     if Input.trigger?(Input::B)
  4233.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  4234.       $game_system.se_play($data_system.cancel_se)
  4235.       # 繝ゥ繧、繝医え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
  4236.       @right_window.active = true
  4237.       @status_window2.refresh
  4238.       @item_window.active = false
  4239.       @item_window.index = -1
  4240.       return
  4241.     end
  4242.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4243.     if Input.trigger?(Input::C)
  4244.       # 陬・y SE 繧呈シ泌・・
  4245.       $game_system.se_play($data_system.equip_se)
  4246.       # 繧「繧、繝・・繧ヲ繧」繝ウ繝峨え縺ァ迴セ蝨ィ驕ク謚槭&繧後※縺・k繝・・繧ソ繧貞叙蠕・
  4247.       item = @item_window.item
  4248.       # 陬・y繧貞、画峩
  4249.       @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  4250.       # 繝ゥ繧、繝医え繧」繝ウ繝峨え繧偵い繧ッ繝・ぅ繝門喧
  4251.       @right_window.active = true
  4252.       @item_window.active = false
  4253.       @item_window.index = -1
  4254.       # 繝ゥ繧、繝医え繧」繝ウ繝峨え縲√い繧、繝・・繧ヲ繧」繝ウ繝峨え縺ョ蜀・ョケ繧貞・菴懈・
  4255.       @right_window.refresh
  4256.       @item_window.refresh
  4257.       return
  4258.     end
  4259.   end
  4260. end
  4261. #==============================================================================
  4262. # 笆  Scene_Status
  4263. #------------------------------------------------------------------------------
  4264. # 縲€繧ケ繝・・繧ソ繧ケ逕サ髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  4265. #==============================================================================
  4266.  
  4267. class Scene_Status
  4268.   #--------------------------------------------------------------------------
  4269.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  4270.   #     actor_index : 繧「繧ッ繧ソ繝シ繧、繝ウ繝・ャ繧ッ繧ケ
  4271.   #--------------------------------------------------------------------------
  4272.   def initialize(actor_index = 0, equip_index = 0)
  4273.     @actor_index = actor_index
  4274.   end
  4275.   #--------------------------------------------------------------------------
  4276.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  4277.   #--------------------------------------------------------------------------
  4278.   def main
  4279.     #========================================
  4280.     # This is setting up the background picture
  4281.     @background = Sprite.new
  4282.     @background.bitmap = RPG::Cache.picture("background")
  4283.     @background.x = 0
  4284.     @background.y = 0
  4285.     #========================================
  4286.     # This sets up the command picture & shadow
  4287.     @command4 = Sprite.new
  4288.     @command4.bitmap = RPG::Cache.picture("cmscommand4")
  4289.     @command4.x = 15
  4290.     @command4.y = 40
  4291.     @command4.z = 100
  4292.     #========================================
  4293.     @commands4 = Sprite.new
  4294.     @commands4.bitmap = RPG::Cache.picture("cmscommandshadow")
  4295.     @commands4.x = 20
  4296.     @commands4.y = 45
  4297.     @commands4.z = 1
  4298.     @commands4.opacity = 155
  4299.     #==============This sets up the 1st status picture=============
  4300.     @picture_status1 = Sprite.new
  4301.     @picture_status1.bitmap = RPG::Cache.picture("windowstatus1")
  4302.     @picture_status1.x = 230
  4303.     @picture_status1.y = - 120
  4304.     @picture_status1.z = 2
  4305.     #=============This sets up the 2nd status picture==============
  4306.     @picture_status2 = Sprite.new
  4307.     @picture_status2.bitmap = RPG::Cache.picture("windowstatus2")
  4308.     @picture_status2.x = 830
  4309.     @picture_status2.y = 115
  4310.     @picture_status2.z = 2
  4311.     #==============This sets up the 3rd status picture=============
  4312.     @picture_status3 = Sprite.new
  4313.     @picture_status3.bitmap = RPG::Cache.picture("windowstatus3")
  4314.     @picture_status3.x = 230
  4315.     @picture_status3.y = 480
  4316.     @picture_status3.z = 2
  4317.     #===============This sets up the 4th status picture==============
  4318.     @picture_status4 = Sprite.new
  4319.     @picture_status4.bitmap = RPG::Cache.picture("windowstatus4")
  4320.     @picture_status4.x = - 280
  4321.     @picture_status4.y = 388
  4322.     @picture_status4.z = 2
  4323.     #============the shadow of the 1st status pic==================
  4324.     @picture_shadow1 = Sprite.new
  4325.     @picture_shadow1.bitmap = RPG::Cache.picture("windowstatus1shadow")
  4326.     @picture_shadow1.x = 235
  4327.     @picture_shadow1.y = - 115
  4328.     @picture_shadow1.z = 1
  4329.     @picture_shadow1.opacity = 155
  4330.     #============the shadow of the 2nd status pic==================
  4331.     @picture_shadow2 = Sprite.new
  4332.     @picture_shadow2.bitmap = RPG::Cache.picture("windowstatus2shadow")
  4333.     @picture_shadow2.x = 835
  4334.     @picture_shadow2.y = 120
  4335.     @picture_shadow2.z = 1
  4336.     @picture_shadow2.opacity = 155
  4337.     #============the shadow of the 3rd status pic==================
  4338.     @picture_shadow3 = Sprite.new
  4339.     @picture_shadow3.bitmap = RPG::Cache.picture("windowstatus3shadow")
  4340.     @picture_shadow3.x = 235
  4341.     @picture_shadow3.y = 485
  4342.     @picture_shadow3.z = 1
  4343.     @picture_shadow3.opacity = 155
  4344.     #============the shadow of the 4th status pic==================
  4345.     @picture_shadow4 = Sprite.new
  4346.     @picture_shadow4.bitmap = RPG::Cache.picture("windowstatus4shadow")
  4347.     @picture_shadow4.x = - 275
  4348.     @picture_shadow4.y = 393
  4349.     @picture_shadow4.z = 1
  4350.     @picture_shadow4.opacity = 155
  4351.     # 繧「繧ッ繧ソ繝シ繧貞叙蠕・
  4352.     @actor = $game_party.actors[@actor_index]
  4353.     # Sets up the 1st status window
  4354.     @status_window1 = Window_Status.new(@actor)
  4355.     @status_window1.x = 220
  4356.     @status_window1.y = - 160
  4357.     @status_window1.opacity = 0
  4358.     #=============Sets up the 2nd status window==================
  4359.     @status_window2 = Window_Status2.new(@actor)
  4360.     @status_window2.x = 830
  4361.     @status_window2.y = 100
  4362.     @status_window2.opacity = 0
  4363.     #============Sets up the 3rd status window===================
  4364.     @status_window3 = Window_Status3.new(@actor)
  4365.     @status_window3.x = 220
  4366.     @status_window3.y = 700
  4367.     @status_window3.opacity = 0
  4368.     #=============Sets up the 4th status window==================
  4369.     @status_window4 = Window_Status4.new(@actor)
  4370.     @status_window4.x = - 280
  4371.     @status_window4.y = 385
  4372.     @status_window4.opacity = 0
  4373.     #============Sets up the 5th status window - battler=============
  4374.     @status_window5 = Window_Status5.new(@actor)
  4375.     @status_window5.x = - 300
  4376.     @status_window5.y = 0
  4377.     @status_window5.opacity = 0
  4378.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  4379.     Graphics.transition
  4380.     # 繝。繧、繝ウ繝ォ繝シ繝・
  4381.     loop do
  4382.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  4383.       Graphics.update
  4384.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  4385.       Input.update
  4386.       # 繝輔Ξ繝シ繝 譖エ譁ー
  4387.       update
  4388.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  4389.       if $scene != self
  4390.         break
  4391.       end
  4392.     end
  4393.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  4394.     Graphics.freeze
  4395.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  4396.     @background.dispose
  4397.     @command4.dispose
  4398.     @commands4.dispose
  4399.     @picture_status1.dispose
  4400.     @picture_status2.dispose
  4401.     @picture_status3.dispose
  4402.     @picture_status4.dispose
  4403.     @status_window1.dispose
  4404.     @status_window2.dispose
  4405.     @status_window3.dispose
  4406.     @status_window4.dispose
  4407.     @status_window5.dispose
  4408.     @picture_shadow1.dispose
  4409.     @picture_shadow2.dispose
  4410.     @picture_shadow3.dispose
  4411.     @picture_shadow4.dispose
  4412.   end
  4413.   #--------------------------------------------------------------------------
  4414.     def delay(seconds)
  4415.   for i in 0...(seconds * 1)
  4416.     sleep 0.01
  4417.     Graphics.update
  4418.   end
  4419. end
  4420.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  4421.   #--------------------------------------------------------------------------
  4422.   def update
  4423.     #===========================================
  4424.     # enter animation
  4425.     if @picture_status1.y < 15
  4426.       @picture_status1.y += 45
  4427.     end
  4428.      if @picture_shadow1.y < 20
  4429.       @picture_shadow1.y += 45
  4430.     end
  4431.     if @picture_status2.x > 230
  4432.       @picture_status2.x -= 150
  4433.     end
  4434.       if @picture_shadow2.x > 235
  4435.       @picture_shadow2.x -= 150
  4436.     end
  4437.     if @picture_status3.y > 262
  4438.       @picture_status3.y -= 109
  4439.     end
  4440.     if @picture_shadow3.y > 267
  4441.       @picture_shadow3.y -= 109
  4442.     end
  4443.     if @picture_status4.x < 5
  4444.       @picture_status4.x += 95
  4445.     end
  4446.     if @picture_shadow4.x < 10
  4447.       @picture_shadow4.x += 95
  4448.     end
  4449.     if @status_window1.y < 0
  4450.       @status_window1.y += 80
  4451.     end
  4452.     if @status_window2.x > 230
  4453.       @status_window2.x -= 150
  4454.     end
  4455.     if @status_window3.y > 250
  4456.       @status_window3.y -= 150
  4457.     end
  4458.     if @status_window4.x < 5
  4459.       @status_window4.x += 95
  4460.     end
  4461.     if @status_window5.x < 0
  4462.       @status_window5.x += 100
  4463.       end
  4464.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4465.     if Input.trigger?(Input::B)
  4466.       # exit animation
  4467.       loop do
  4468.     if @picture_status1.y > - 400
  4469.       @picture_status1.y -= 100
  4470.     end
  4471.       if @picture_shadow1.y > - 400
  4472.       @picture_shadow1.y -= 100
  4473.     end
  4474.     if @picture_status2.x < 640
  4475.       @picture_status2.x += 100
  4476.     end
  4477.      if @picture_shadow2.x < 640
  4478.       @picture_shadow2.x += 100
  4479.     end
  4480.     if @picture_status3.y < 480
  4481.       @picture_status3.y += 100
  4482.     end
  4483.      if @picture_shadow3.y < 480
  4484.       @picture_shadow3.y += 100
  4485.     end
  4486.     if @picture_status4.x > - 300
  4487.       @picture_status4.x -= 100
  4488.     end
  4489.     if @picture_shadow4.x > - 400
  4490.       @picture_shadow4.x -= 100
  4491.     end
  4492.     if @status_window1.y > - 400
  4493.       @status_window1.y -= 100
  4494.     end
  4495.     if @status_window2.x < 640
  4496.       @status_window2.x += 100
  4497.     end
  4498.     if @status_window3.y < 640
  4499.       @status_window3.y += 100
  4500.     end
  4501.     if @status_window4.x > - 200
  4502.       @status_window4.x -= 100
  4503.     end
  4504.     if @status_window5.x > - 300
  4505.       @status_window5.x -= 100
  4506.     end
  4507.     delay(0.1)
  4508.     if @status_window2.x >= 640
  4509.       break
  4510.     end
  4511.     end
  4512.       $game_system.se_play($data_system.cancel_se)
  4513.       # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  4514.       $scene = Scene_Menu.new(3)
  4515.       return
  4516.     end
  4517.     # R 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4518.     if Input.trigger?(Input::R)
  4519.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4520.       $game_system.se_play($data_system.cursor_se)
  4521.       # 谺。縺ョ繧「繧ッ繧ソ繝シ縺ク
  4522.       @actor_index += 1
  4523.       @actor_index %= $game_party.actors.size
  4524.       # 蛻・縺ョ繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
  4525.       $scene = Scene_Status.new(@actor_index)
  4526.       return
  4527.     end
  4528.     # L 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4529.     if Input.trigger?(Input::L)
  4530.       # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4531.       $game_system.se_play($data_system.cursor_se)
  4532.       # 蜑阪・繧「繧ッ繧ソ繝シ縺ク
  4533.       @actor_index += $game_party.actors.size - 1
  4534.       @actor_index %= $game_party.actors.size
  4535.       # 蛻・縺ョ繧ケ繝・・繧ソ繧ケ逕サ髱「縺ォ蛻・j譖ソ縺・
  4536.       $scene = Scene_Status.new(@actor_index)
  4537.       return
  4538.     end
  4539.   end
  4540. end
  4541. #==============================================================================
  4542. # 笆  Scene_File
  4543. #------------------------------------------------------------------------------
  4544. # 縲€繧サ繝シ繝也判髱「縺翫h縺ウ繝-繝シ繝臥判髱「縺ョ繧ケ繝シ繝代・繧ッ繝ゥ繧ケ縺ァ縺吶€・
  4545. #==============================================================================
  4546.  
  4547. class Scene_File
  4548.   #--------------------------------------------------------------------------
  4549.   # 笳・繧ェ繝悶ず繧ァ繧ッ繝亥・譛溷喧
  4550.   #     help_text : 繝倥Ν繝励え繧」繝ウ繝峨え縺ォ陦ィ遉コ縺吶k譁・-怜・
  4551.   #--------------------------------------------------------------------------
  4552.   def initialize(help_text)
  4553.     @help_text = help_text
  4554.   end
  4555.   #--------------------------------------------------------------------------
  4556.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  4557.   #--------------------------------------------------------------------------
  4558.   def main
  4559.     # This is setting up the background picture
  4560.     @background = Sprite.new
  4561.     @background.bitmap = RPG::Cache.picture("save window")
  4562.     @background.x = 0
  4563.     @background.y = 0
  4564.     # 繝倥Ν繝励え繧」繝ウ繝峨え繧剃ス懈・
  4565.     @help_window = Window_Help.new
  4566.     @help_window.opacity = 0
  4567.     @help_window.set_text(@help_text)
  4568.     # 繧サ繝シ繝悶ヵ繧。繧、繝ォ繧ヲ繧」繝ウ繝峨え繧剃ス懈・
  4569.     @savefile_windows = []
  4570.     for i in 0..3
  4571.       @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
  4572.     end
  4573.     # 譛€蠕後↓謫堺ス懊@縺溘ヵ繧。繧、繝ォ繧帝∈謚・
  4574.     @file_index = $game_temp.last_file_index
  4575.     @savefile_windows[@file_index].selected = true
  4576.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  4577.     Graphics.transition
  4578.     # 繝。繧、繝ウ繝ォ繝シ繝・
  4579.     loop do
  4580.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  4581.       Graphics.update
  4582.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  4583.       Input.update
  4584.       # 繝輔Ξ繝シ繝 譖エ譁ー
  4585.       update
  4586.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  4587.       if $scene != self
  4588.         break
  4589.       end
  4590.     end
  4591.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  4592.     Graphics.freeze
  4593.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  4594.     @background.dispose
  4595.     @help_window.dispose
  4596.     for i in @savefile_windows
  4597.       i.dispose
  4598.     end
  4599.   end
  4600.   #--------------------------------------------------------------------------
  4601.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  4602.   #--------------------------------------------------------------------------
  4603.   def update
  4604.     # 繧ヲ繧」繝ウ繝峨え繧呈峩譁ー
  4605.     @help_window.update
  4606.     for i in @savefile_windows
  4607.       i.update
  4608.     end
  4609.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4610.     if Input.trigger?(Input::C)
  4611.       # 繝。繧ス繝・ラ on_decision (邯呎価蜈医〒螳夂セゥ) 繧貞他縺カ
  4612.       on_decision(make_filename(@file_index))
  4613.       $game_temp.last_file_index = @file_index
  4614.       return
  4615.     end
  4616.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4617.     if Input.trigger?(Input::B)
  4618.       # 繝。繧ス繝・ラ on_cancel (邯呎価蜈医〒螳夂セゥ) 繧貞他縺カ
  4619.       on_cancel
  4620.       return
  4621.     end
  4622.     # 譁ケ蜷代・繧ソ繝ウ縺ョ荳九′謚シ縺輔l縺溷 エ蜷・
  4623.     if Input.repeat?(Input::DOWN)
  4624.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳九・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  4625.       # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・3 繧医j蜑阪・・エ蜷・
  4626.       if Input.trigger?(Input::DOWN) or @file_index < 3
  4627.         # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4628.         $game_system.se_play($data_system.cursor_se)
  4629.         # 繧ォ繝シ繧ス繝ォ繧剃ク九↓遘サ蜍・
  4630.         @savefile_windows[@file_index].selected = false
  4631.         @file_index = (@file_index + 1) % 4
  4632.         @savefile_windows[@file_index].selected = true
  4633.         return
  4634.       end
  4635.     end
  4636.     # 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫′謚シ縺輔l縺溷 エ蜷・
  4637.     if Input.repeat?(Input::UP)
  4638.       # 譁ケ蜷代・繧ソ繝ウ縺ョ荳翫・謚シ荳狗憾諷九′繝ェ繝斐・繝医〒縺ェ縺・ エ蜷医°縲・
  4639.       # 縺セ縺溘・繧ォ繝シ繧ス繝ォ菴咲スョ縺・0 繧医j蠕後m縺ョ・エ蜷・
  4640.       if Input.trigger?(Input::UP) or @file_index > 0
  4641.         # 繧ォ繝シ繧ス繝ォ SE 繧呈シ泌・・
  4642.         $game_system.se_play($data_system.cursor_se)
  4643.         # 繧ォ繝シ繧ス繝ォ繧剃ク翫↓遘サ蜍・
  4644.         @savefile_windows[@file_index].selected = false
  4645.         @file_index = (@file_index + 3) % 4
  4646.         @savefile_windows[@file_index].selected = true
  4647.         return
  4648.       end
  4649.     end
  4650.   end
  4651.   #--------------------------------------------------------------------------
  4652.   # 笳・繝輔ぃ繧、繝ォ蜷阪・菴懈・
  4653.   #     file_index : 繧サ繝シ繝悶ヵ繧。繧、繝ォ縺ョ繧、繝ウ繝・ャ繧ッ繧ケ (0・・)
  4654.   #--------------------------------------------------------------------------
  4655.   def make_filename(file_index)
  4656.     return "Save#{file_index + 1}.rxdata"
  4657.   end
  4658. end
  4659. #==============================================================================
  4660. # 笆  Scene_End
  4661. #------------------------------------------------------------------------------
  4662. # 縲€繧イ繝シ繝 邨ゆコ・判髱「縺ョ蜃ヲ逅・r陦後≧繧ッ繝ゥ繧ケ縺ァ縺吶€・
  4663. #==============================================================================
  4664.  
  4665. class Scene_End
  4666.   #--------------------------------------------------------------------------
  4667.   # 笳・繝。繧、繝ウ蜃ヲ逅・
  4668.   #--------------------------------------------------------------------------
  4669.   def main
  4670.      # This is setting up the background picture
  4671.     @background = Sprite.new
  4672.     @background.bitmap = RPG::Cache.picture("background")
  4673.     @background.x = 0
  4674.     @background.y = 0
  4675.     @background.opacity = 255
  4676.     # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧剃ス懈・
  4677.     s1 = ""
  4678.     s2 = ""
  4679.     s3 = ""
  4680.     @command_window = Window_Command.new(192, [s1, s2, s3])
  4681.     @command_window.x = 320 - @command_window.width / 2
  4682.     @command_window.y = 240 - @command_window.height / 2
  4683.     @command_window.opacity = 0
  4684.     @command_window.visible = false
  4685.     #===============Arrow selection pic======================
  4686.     @arrow = Sprite.new
  4687.     @arrow.bitmap = RPG::Cache.picture("arrow4")
  4688.     @arrow.x = 320 - @command_window.width / 2 - 30
  4689.     @arrow.y = 175
  4690.     @arrow.z = 999
  4691.     #=======the end window - replaces command window===========
  4692.     @end_window = Window_End.new
  4693.     @end_window.x = 320 - @command_window.width / 2 + 8
  4694.     @end_window.y = 240 - @command_window.height / 2 - 15
  4695.     #=============end window pic============================
  4696.     @endwindow = Sprite.new
  4697.     @endwindow.bitmap = RPG::Cache.picture("endwindow")
  4698.     @endwindow.opacity = 255
  4699.     @endwindow.x = 320 - @command_window.width / 2 - 10
  4700.     @endwindow.y = 240 - @command_window.height / 2 - 10
  4701.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ螳溯。・
  4702.     Graphics.transition
  4703.     # 繝。繧、繝ウ繝ォ繝シ繝・
  4704.     loop do
  4705.       # 繧イ繝シ繝 逕サ髱「繧呈峩譁ー
  4706.       Graphics.update
  4707.       # 蜈・蜉帶ュ・ア繧呈峩譁ー
  4708.       Input.update
  4709.       # 繝輔Ξ繝シ繝 譖エ譁ー
  4710.       update
  4711.       # 逕サ髱「縺悟・繧頑崛繧上▲縺溘i繝ォ繝シ繝励r荳-譁-
  4712.       if $scene != self
  4713.         break
  4714.       end
  4715.     end
  4716.     # 繝医Λ繝ウ繧ク繧キ繝ァ繝ウ貅門y
  4717.     Graphics.freeze
  4718.     # 繧ヲ繧」繝ウ繝峨え繧定ァ」謾セ
  4719.     @endwindow.dispose
  4720.     @command_window.dispose
  4721.     @end_window.dispose
  4722.     @arrow.dispose
  4723.     @background.dispose
  4724.     # 繧ソ繧、繝医Ν逕サ髱「縺ォ蛻・j譖ソ縺井ク-縺ョ・エ蜷・
  4725.     if $scene.is_a?(Scene_Title)
  4726.       # 逕サ髱「繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
  4727.       Graphics.transition
  4728.       Graphics.freeze
  4729.     end
  4730.   end
  4731.   #--------------------------------------------------------------------------
  4732.      def delay(seconds)
  4733.   for i in 0...(seconds * 1)
  4734.     sleep 0.01
  4735.     Graphics.update
  4736.   end
  4737. end
  4738.   # 笳・繝輔Ξ繝シ繝 譖エ譁ー
  4739.   #--------------------------------------------------------------------------
  4740.   def update
  4741.     # Little effect added
  4742.       if @background.opacity > 100
  4743.         @background.opacity -= 2
  4744.       end
  4745.       if @endwindow.opacity > 150
  4746.         @endwindow.opacity -= 1
  4747.         end
  4748.     case @command_window.index
  4749.      when 0
  4750.        @arrow.y = 175
  4751.      when 1
  4752.        @arrow.y = 220
  4753.      when 2
  4754.        @arrow.y = 265
  4755.        end
  4756.     # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え繧呈峩譁ー
  4757.     @command_window.update
  4758.     # B 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4759.     if Input.trigger?(Input::B)
  4760.       # 繧-繝」繝ウ繧サ繝ォ SE 繧呈シ泌・・
  4761.       $game_system.se_play($data_system.cancel_se)
  4762.       # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  4763.       $scene = Scene_Menu.new(5)
  4764.       return
  4765.     end
  4766.     # C 繝懊ち繝ウ縺梧款縺輔l縺溷 エ蜷・
  4767.     if Input.trigger?(Input::C)
  4768.       # 繧ウ繝槭Φ繝峨え繧」繝ウ繝峨え縺ョ繧ォ繝シ繧ス繝ォ菴咲スョ縺ァ蛻・イ・
  4769.       case @command_window.index
  4770.       when 0  # 繧ソ繧、繝医Ν縺ク
  4771.         command_to_title
  4772.       when 1  # 繧キ繝」繝・ヨ繝€繧ヲ繝ウ
  4773.         command_shutdown
  4774.       when 2  # 繧・a繧・
  4775.         command_cancel
  4776.       end
  4777.       return
  4778.     end
  4779.   end
  4780.   #--------------------------------------------------------------------------
  4781.   # 笳・繧ウ繝槭Φ繝・[繧ソ繧、繝医Ν縺ク] 驕ク謚樊凾縺ョ蜃ヲ逅・
  4782.   #--------------------------------------------------------------------------
  4783.   def command_to_title
  4784.     # 豎コ螳・SE 繧呈シ泌・・
  4785.     $game_system.se_play($data_system.decision_se)
  4786.     # BGM縲。GS縲`E 繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
  4787.     Audio.bgm_fade(800)
  4788.     Audio.bgs_fade(800)
  4789.     Audio.me_fade(800)
  4790.     # 繧ソ繧、繝医Ν逕サ髱「縺ォ蛻・j譖ソ縺・
  4791.     $scene = Scene_Title.new
  4792.   end
  4793.   #--------------------------------------------------------------------------
  4794.   # 笳・繧ウ繝槭Φ繝・[繧キ繝」繝・ヨ繝€繧ヲ繝ウ] 驕ク謚樊凾縺ョ蜃ヲ逅・
  4795.   #--------------------------------------------------------------------------
  4796.   def command_shutdown
  4797.     # 豎コ螳・SE 繧呈シ泌・・
  4798.     $game_system.se_play($data_system.decision_se)
  4799.     # BGM縲。GS縲`E 繧偵ヵ繧ァ繝シ繝峨い繧ヲ繝・
  4800.     Audio.bgm_fade(800)
  4801.     Audio.bgs_fade(800)
  4802.     Audio.me_fade(800)
  4803.     # 繧キ繝」繝・ヨ繝€繧ヲ繝ウ
  4804.     $scene = nil
  4805.   end
  4806.   #--------------------------------------------------------------------------
  4807.   # 笳・繧ウ繝槭Φ繝・[繧・a繧犠 驕ク謚樊凾縺ョ蜃ヲ逅・
  4808.   #--------------------------------------------------------------------------
  4809.   def command_cancel
  4810.     # 豎コ螳・SE 繧呈シ泌・・
  4811.     $game_system.se_play($data_system.decision_se)
  4812.     # 繝。繝九Η繝シ逕サ髱「縺ォ蛻・j譖ソ縺・
  4813.     $scene = Scene_Menu.new(5)
  4814.   end
  4815. end
Expand to see the code.


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)) :

  1. # Setting up the actual window for the map, opacity - 0
  2.      @location_window = Window_Mapname.new
  3.      @location_window.x = 0
  4.      @location_window.y = 609
Expand to see the code.

and it's the same about this (wrong number of arguments 2 for 4)):

  1. # Command window, opacity - 0 so it is invisible, and commands are set to ""
  2.     # - nothing so no text shows, as there is pictures used instead..
  3.     s1 = ""
  4.     s2 = ""
  5.     s3 = ""
  6.     s4 = ""
  7.     s5 = ""
  8.     s6 = ""
  9.     @command_window = Window_Menucommand.new(200, [s1, s2, s3, s4, s5, s6])
  10.     @command_window.opacity = 0
  11.     @command_window.index = @menu_index
Expand to see the code.

... 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
it would be helpful if you posted the whole script, as we are not familiar with such. Also, using code tags cleans up the post as well. Good luck with what you are looking for.
John Egbert wrote:
it would be helpful if you posted the whole script, as we are not familiar with such. Also, using code tags cleans up the post as well. Good luck with what you are looking for.

Sorry... I'm used to books, not forums ._.
There is no issue with this script. As far as your debugging tells, you are having a different class definition of Window_Mapname and Window_Menucommand somewhere else in your project, because if you look through the script, Window_Menucommand requires 2 arguments, but your error says it requires 4. The Mapname has no initialize definition, so it definitely requires no arguments, but your error says it requires 2. This only tells me that you are having these classes elsewhere. As long as these exist, they will clash with this script.
Well, in that case the script is not working with the original set-up of scripts since it doesn't work with a plain new project either... I suppose it might interfiere with the original menu scripts...

EDIT: It seems like when he made this script he used the japanese version of RPGMaker XP, which means that the scripts are slightly different... In other words, just replacing the unedited Scripts.rxdata from the japanese version and then adding the script (including pictures) makes it work... Little bit annoying, but hey, it works!

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71314