| 
 
| 赞 | 5 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 72 |  
| 经验 | 15725 |  
| 最后登录 | 2025-10-12 |  
| 在线时间 | 1239 小时 |  
 Lv4.逐梦者 
	梦石0 星屑7216 在线时间1239 小时注册时间2015-8-15帖子711 | 
| 
本帖最后由 金芒芒 于 2016-3-28 17:14 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 
 #==============================================================================# ■ Window_EquipRight#------------------------------------------------------------------------------#  装备画面、显示角色现在装备的物品的窗口。#============================================================================== class Window_Equip_right1 < Window_Selectable#_New  LAST0_X = 276   # 最后一项装备的x坐标  #开门  0  LAST0_Y = 194   # 最后一项装备的y坐标  LAST0_W = 48   # 最后一项装备的光标宽度  LAST0_H = 48   # 最后一项装备的光标高度   LAST1_X = 300   # 最后一项装备的x坐标  #杜门  0  LAST1_Y = 218   # 最后一项装备的y坐标  LAST1_W = 48   # 最后一项装备的光标宽度  LAST1_H = 48   # 最后一项装备的光标高度   LAST2_X = 370   # 最后一项装备的x坐标  #休门  0  LAST2_Y = 293   # 最后一项装备的y坐标  LAST2_W = 48   # 最后一项装备的光标宽度  LAST2_H = 48   # 最后一项装备的光标高度   LAST3_X = 324   # 最后一项装备的x坐标  #生门  0  LAST3_Y = 389   # 最后一项装备的y坐标  LAST3_W = 48   # 最后一项装备的光标宽度  LAST3_H = 48   # 最后一项装备的光标高度   LAST4_X = 276   # 最后一项装备的x坐标  #死门  0  LAST4_Y = 390   # 最后一项装备的y坐标  LAST4_W = 48   # 最后一项装备的光标宽度  LAST4_H = 48   # 最后一项装备的光标高度   LAST5_X = 228   # 最后一项装备的x坐标  #惊门  0  LAST5_Y = 335   # 最后一项装备的y坐标  LAST5_W = 48   # 最后一项装备的光标宽度  LAST5_H = 48   # 最后一项装备的光标高度   LAST_X = 276   # 最后一项装备的x坐标  #奇门  0  LAST_Y = 293   # 最后一项装备的y坐标  LAST_W = 48   # 最后一项装备的光标宽度  LAST_H = 48   # 最后一项装备的光标高度  #--------------------------------------------------------------------------  # ● 初始化对像  #     actor : 角色  #--------------------------------------------------------------------------  def initialize(actor)    super(120, 104, 368, 400)#(120, 104, 368, 400)    self.contents = Bitmap.new(width - 32, height - 32)    @actor = actor    refresh    self.index = 0  end  #--------------------------------------------------------------------------  # ● 获取物品  #--------------------------------------------------------------------------  def item    return @data[self.index]  end   def set_actor(actor)    @actor = actor    refresh  end   #--------------------------------------------------------------------------  # ● 刷新  #--------------------------------------------------------------------------  def refresh    self.contents.clear    draw_actor_name(@actor, 140, 0-5)    @data = []    @data.push($data_armors[@actor.armor4_id])    @data.push($data_armors[@actor.armor4_id])    @data.push($data_armors[@actor.armor4_id])    @data.push($data_armors[@actor.armor4_id])    @data.push($data_armors[@actor.armor4_id])    @item_max = @data.size    self.contents.font.color = system_color    y_r = 4 # 右窗口 y 坐标    self.contents.font.size = 20 #   draw_walk_actor_graphic(@actor, 108, 60)    self.contents.draw_text(LAST_X + y_r, LAST_Y, 92, 32, "鞋")    self.contents.draw_text(LAST0_X + y_r, LAST0_Y, 92, 32, "鞋")    self.contents.draw_text(LAST1_X + y_r, LAST1_Y, 92, 32, "鞋")    self.contents.draw_text(LAST2_X + y_r, LAST2_Y, 92, 32, "鞋")    self.contents.draw_text(LAST3_X + y_r, LAST3_Y, 92, 32, "鞋")    self.contents.draw_text(LAST4_X + y_r, LAST4_Y, 92, 32, "鞋")    self.contents.draw_text(LAST5_X + y_r, LAST5_Y, 92, 32, "鞋")    self.contents.font.size = 18    draw_item_name(@data[0], LAST_X+3, LAST_Y)    draw_item_name(@data[1], LAST0_X+3, LAST0_Y)    draw_item_name(@data[2], LAST1_X+3, LAST1_Y)    draw_item_name(@data[3], LAST2_X+3, LAST2_Y)    draw_item_name(@data[4], LAST3_X+3, LAST3_Y)    draw_item_name(@data[5], LAST4_X+3, LAST4_Y)    draw_item_name(@data[6], LAST5_X+3, LAST5_Y)     draw_actor_level(@actor, 12, 300)  end  #--------------------------------------------------------------------------  # ● 刷新帮助文本  #--------------------------------------------------------------------------  def update_help    @help_window.set_text(make_description(self.item))  end   #--------------------------------------------------------------------------  # ● 刷新画面  #--------------------------------------------------------------------------  def update    super    # 可以移动光标的情况下    if self.active and @item_max > 0 and @index >= 0      # 方向键下被按下的情况下      if Input.repeat?(Input::DOWN)        # 列数不是 1 并且不与方向键下的按下状态重复的情况、        # 或光标位置在(项目数-列数)之前的情况下        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or           @index < @item_max - @column_max          # 光标向下移动          $game_system.se_play($data_system.cursor_se)          @index = (@index + @column_max) % @item_max        end      end      # 方向键上被按下的情况下      if Input.repeat?(Input::UP)        # 列数不是 1 并且不与方向键下的按下状态重复的情况、        # 或光标位置在列之后的情况下        if (@column_max == 1 and Input.trigger?(Input::UP)) or           @index >= @column_max          # 光标向上移动          $game_system.se_play($data_system.cursor_se)          @index = (@index - @column_max + @item_max) % @item_max        end      end      # 方向键右被按下的情况下      if Input.repeat?(Input::RIGHT)        # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下        if @column_max >= 2 and @index < @item_max - 1          # 光标向右移动          $game_system.se_play($data_system.cursor_se)          @index += 1        end      end      # 方向键左被按下的情况下      if Input.repeat?(Input::LEFT)        # 列数为 2 以上并且、光标位置在 0 之后的情况下        if @column_max >= 2 and @index > 0          # 光标向左移动          $game_system.se_play($data_system.cursor_se)          @index -= 1        end      end      # R 键被按下的情况下      if Input.repeat?(Input::R)        # 显示的最后行在数据中最后行上方的情况下        if self.top_row + (self.page_row_max -1) < (self.row_max -1)          # 光标向后移动一页          $game_system.se_play($data_system.cursor_se)          @index = [@index + self.page_item_max, @item_max -1].min          self.top_row += self.page_row_max        end      end      # L 键被按下的情况下      if Input.repeat?(Input::L)        # 显示的开头行在位置 0 之后的情况下        if self.top_row > 0          # 光标向前移动一页          $game_system.se_play($data_system.cursor_se)          @index = [@index - self.page_item_max, 0].max          self.top_row -= self.page_row_max        end      end    end    # 刷新帮助文本 (update_help 定义了继承目标)    if self.active and @help_window != nil      update_help    end   end  #-----------------------------奇门1  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST_X, LAST_Y, LAST_W, LAST_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end   #-----------------------------开门2  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST0_X, LAST0_Y, LAST0_W, LAST0_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end    #-----------------------------杜门3  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST1_X, LAST1_Y, LAST1_W, LAST1_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end      #-----------------------------休门4  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST2_X, LAST2_Y, LAST2_W, LAST2_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end     #-----------------------------生门5  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST3_X, LAST3_Y, LAST3_W, LAST3_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end     #-----------------------------死门6  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST4_X, LAST4_Y, LAST4_W, LAST4_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end   #-----------------------------惊门7  # ○ 刷新光标矩形  #-----------------------------  def update_cursor_rect#    self.cursor_rect.set(0, @index * 28+2, 176, 28)    # 最后一项的情况    if @index == @item_max - 1      self.cursor_rect.set(LAST5_X, LAST5_Y, LAST5_W, LAST5_H)    # 其他情况    else      if @index <= -2        self.cursor_rect.empty      elsif @index == -1        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)      else        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)      end    end  end end
#============================================================================== 
# ■ Window_EquipRight 
#------------------------------------------------------------------------------ 
#  装备画面、显示角色现在装备的物品的窗口。 
#============================================================================== 
  
class Window_Equip_right1 < Window_Selectable#_New 
  LAST0_X = 276   # 最后一项装备的x坐标  #开门  0 
  LAST0_Y = 194   # 最后一项装备的y坐标 
  LAST0_W = 48   # 最后一项装备的光标宽度 
  LAST0_H = 48   # 最后一项装备的光标高度 
  
  LAST1_X = 300   # 最后一项装备的x坐标  #杜门  0 
  LAST1_Y = 218   # 最后一项装备的y坐标 
  LAST1_W = 48   # 最后一项装备的光标宽度 
  LAST1_H = 48   # 最后一项装备的光标高度 
  
  LAST2_X = 370   # 最后一项装备的x坐标  #休门  0 
  LAST2_Y = 293   # 最后一项装备的y坐标 
  LAST2_W = 48   # 最后一项装备的光标宽度 
  LAST2_H = 48   # 最后一项装备的光标高度 
  
  LAST3_X = 324   # 最后一项装备的x坐标  #生门  0 
  LAST3_Y = 389   # 最后一项装备的y坐标 
  LAST3_W = 48   # 最后一项装备的光标宽度 
  LAST3_H = 48   # 最后一项装备的光标高度 
  
  LAST4_X = 276   # 最后一项装备的x坐标  #死门  0 
  LAST4_Y = 390   # 最后一项装备的y坐标 
  LAST4_W = 48   # 最后一项装备的光标宽度 
  LAST4_H = 48   # 最后一项装备的光标高度 
  
  LAST5_X = 228   # 最后一项装备的x坐标  #惊门  0 
  LAST5_Y = 335   # 最后一项装备的y坐标 
  LAST5_W = 48   # 最后一项装备的光标宽度 
  LAST5_H = 48   # 最后一项装备的光标高度 
  
  LAST_X = 276   # 最后一项装备的x坐标  #奇门  0 
  LAST_Y = 293   # 最后一项装备的y坐标 
  LAST_W = 48   # 最后一项装备的光标宽度 
  LAST_H = 48   # 最后一项装备的光标高度 
  #-------------------------------------------------------------------------- 
  # ● 初始化对像 
  #     actor : 角色 
  #-------------------------------------------------------------------------- 
  def initialize(actor) 
    super(120, 104, 368, 400)#(120, 104, 368, 400) 
    self.contents = Bitmap.new(width - 32, height - 32) 
    @actor = actor 
    refresh 
    self.index = 0 
  end 
  #-------------------------------------------------------------------------- 
  # ● 获取物品 
  #-------------------------------------------------------------------------- 
  def item 
    return @data[self.index] 
  end 
  
  def set_actor(actor) 
    @actor = actor 
    refresh 
  end 
  
  #-------------------------------------------------------------------------- 
  # ● 刷新 
  #-------------------------------------------------------------------------- 
  def refresh 
    self.contents.clear 
    draw_actor_name(@actor, 140, 0-5) 
    @data = [] 
    @data.push($data_armors[@actor.armor4_id]) 
    @data.push($data_armors[@actor.armor4_id]) 
    @data.push($data_armors[@actor.armor4_id]) 
    @data.push($data_armors[@actor.armor4_id]) 
    @data.push($data_armors[@actor.armor4_id]) 
    @item_max = @data.size 
    self.contents.font.color = system_color 
    y_r = 4 # 右窗口 y 坐标 
    self.contents.font.size = 20 
 #   draw_walk_actor_graphic(@actor, 108, 60) 
    self.contents.draw_text(LAST_X + y_r, LAST_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST0_X + y_r, LAST0_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST1_X + y_r, LAST1_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST2_X + y_r, LAST2_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST3_X + y_r, LAST3_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST4_X + y_r, LAST4_Y, 92, 32, "鞋") 
    self.contents.draw_text(LAST5_X + y_r, LAST5_Y, 92, 32, "鞋") 
    self.contents.font.size = 18 
    draw_item_name(@data[0], LAST_X+3, LAST_Y) 
    draw_item_name(@data[1], LAST0_X+3, LAST0_Y) 
    draw_item_name(@data[2], LAST1_X+3, LAST1_Y) 
    draw_item_name(@data[3], LAST2_X+3, LAST2_Y) 
    draw_item_name(@data[4], LAST3_X+3, LAST3_Y) 
    draw_item_name(@data[5], LAST4_X+3, LAST4_Y) 
    draw_item_name(@data[6], LAST5_X+3, LAST5_Y) 
  
    draw_actor_level(@actor, 12, 300) 
  end 
  #-------------------------------------------------------------------------- 
  # ● 刷新帮助文本 
  #-------------------------------------------------------------------------- 
  def update_help 
    @help_window.set_text(make_description(self.item)) 
  end 
  
  #-------------------------------------------------------------------------- 
  # ● 刷新画面 
  #-------------------------------------------------------------------------- 
  def update 
    super 
    # 可以移动光标的情况下 
    if self.active and @item_max > 0 and @index >= 0 
      # 方向键下被按下的情况下 
      if Input.repeat?(Input::DOWN) 
        # 列数不是 1 并且不与方向键下的按下状态重复的情况、 
        # 或光标位置在(项目数-列数)之前的情况下 
        if (@column_max == 1 and Input.trigger?(Input::DOWN)) or 
           @index < @item_max - @column_max 
          # 光标向下移动 
          $game_system.se_play($data_system.cursor_se) 
          @index = (@index + @column_max) % @item_max 
        end 
      end 
      # 方向键上被按下的情况下 
      if Input.repeat?(Input::UP) 
        # 列数不是 1 并且不与方向键下的按下状态重复的情况、 
        # 或光标位置在列之后的情况下 
        if (@column_max == 1 and Input.trigger?(Input::UP)) or 
           @index >= @column_max 
          # 光标向上移动 
          $game_system.se_play($data_system.cursor_se) 
          @index = (@index - @column_max + @item_max) % @item_max 
        end 
      end 
      # 方向键右被按下的情况下 
      if Input.repeat?(Input::RIGHT) 
        # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下 
        if @column_max >= 2 and @index < @item_max - 1 
          # 光标向右移动 
          $game_system.se_play($data_system.cursor_se) 
          @index += 1 
        end 
      end 
      # 方向键左被按下的情况下 
      if Input.repeat?(Input::LEFT) 
        # 列数为 2 以上并且、光标位置在 0 之后的情况下 
        if @column_max >= 2 and @index > 0 
          # 光标向左移动 
          $game_system.se_play($data_system.cursor_se) 
          @index -= 1 
        end 
      end 
      # R 键被按下的情况下 
      if Input.repeat?(Input::R) 
        # 显示的最后行在数据中最后行上方的情况下 
        if self.top_row + (self.page_row_max -1) < (self.row_max -1) 
          # 光标向后移动一页 
          $game_system.se_play($data_system.cursor_se) 
          @index = [@index + self.page_item_max, @item_max -1].min 
          self.top_row += self.page_row_max 
        end 
      end 
      # L 键被按下的情况下 
      if Input.repeat?(Input::L) 
        # 显示的开头行在位置 0 之后的情况下 
        if self.top_row > 0 
          # 光标向前移动一页 
          $game_system.se_play($data_system.cursor_se) 
          @index = [@index - self.page_item_max, 0].max 
          self.top_row -= self.page_row_max 
        end 
      end 
    end 
    # 刷新帮助文本 (update_help 定义了继承目标) 
    if self.active and @help_window != nil 
      update_help 
    end 
  
  end 
  #-----------------------------奇门1 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST_X, LAST_Y, LAST_W, LAST_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end 
  
  #-----------------------------开门2 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST0_X, LAST0_Y, LAST0_W, LAST0_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end  
  
  #-----------------------------杜门3 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST1_X, LAST1_Y, LAST1_W, LAST1_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end    
  
  #-----------------------------休门4 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST2_X, LAST2_Y, LAST2_W, LAST2_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end   
  
  #-----------------------------生门5 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST3_X, LAST3_Y, LAST3_W, LAST3_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end   
  
  #-----------------------------死门6 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST4_X, LAST4_Y, LAST4_W, LAST4_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end 
  
  #-----------------------------惊门7 
  # ○ 刷新光标矩形 
  #----------------------------- 
  def update_cursor_rect 
#    self.cursor_rect.set(0, @index * 28+2, 176, 28) 
    # 最后一项的情况 
    if @index == @item_max - 1 
      self.cursor_rect.set(LAST5_X, LAST5_Y, LAST5_W, LAST5_H) 
    # 其他情况 
    else 
      if @index <= -2 
        self.cursor_rect.empty 
      elsif @index == -1 
        self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80) 
      else 
        self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48) 
      end 
    end 
  end 
  
end 
 | 
 |