设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1838|回复: 2
打印 上一主题 下一主题

[已经过期] 这个脚本怎么改才能用

[复制链接]

Lv1.梦旅人

梦石
0
星屑
2210
在线时间
21 小时
注册时间
2014-9-20
帖子
4
跳转到指定楼层
1
发表于 2014-9-30 17:18:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  显示战斗画面同伴状态的窗口。
#==============================================================================

class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 416, 128)
    self.contents.font.size = 18
    refresh
    self.active = false
  end
  #--------------------------------------------------------------------------
  # ● 释放
  #--------------------------------------------------------------------------
  def dispose
    super
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for i in 0...@item_max
      draw_item(i)
    end
    draw_6Rface(@index) if @index >= 0
  end
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    draw_actor_name(actor, 124, rect.y + 2)
    begin_x = self.contents.text_size(actor.name).width + 4
    draw_actor_state(actor, begin_x, rect.y, 24)
    draw_actor_hp(actor, 230, rect.y, 65)
    draw_actor_mp(actor, 310, rect.y, 65)
  end
  #--------------------------------------------------------------------------
  # ● 描绘人物头像
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def draw_6Rface(index)
    rect = Rect.new(0, 0, 96, 96)
    self.contents.clear_rect(rect)
    actor = $game_party.members[index]
    draw_actor_face(actor, 0, 0, 96)
  end  
  #--------------------------------------------------------------------------
  # ● 设置光标的位置
  #     index : 新的光标位置
  #--------------------------------------------------------------------------
  def index=(index)
    @index = index
    update_cursor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 获取项目描画矩形
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = contents.width - 113
    rect.height = WLH
    rect.x = 113
    rect.y = index / @column_max * WLH
    return rect
  end  
  #--------------------------------------------------------------------------
  # ● 更新光标矩形
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0                   # 光标位置不满 0 的情况下
      self.cursor_rect.empty        # 光标无效
    else                            # 光标位 0 以上的情况下
      row = @index / @column_max    # 获取当前的行
      if row < top_row              # 当前行被显示开头行前面的情况下
        self.top_row = row          # 从当前行向开头行滚动
      end
      if row > bottom_row           # 当前行被显示末尾行之后的情况下
        self.bottom_row = row       # 从当前行向末尾滚动
      end
      rect = item_rect(@index)      # 获取选择项的矩形
      rect.y -= self.oy             # 矩形滚动的位置加起来
      self.cursor_rect = rect       # 更新光标矩形
    end
  end
end


WLH那里报错了

点评

↓常量不能在方法里附值...应该直接在class或module下附值...话说楼主大人确定这脚本不是VX的吗?  发表于 2014-10-2 07:27
WLH改成一个数字或在def initialize下放插入一行 WLH=100#100可以改为其它数字  发表于 2014-9-30 17:26

Lv3.寻梦者 (版主)

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

2
发表于 2014-9-30 17:39:17 | 只看该作者
你确定这个脚本是全套且完整的?

点评

这就是VX的常量,而且等于24  发表于 2014-10-2 07:29
WLH ???这个好像是VX的常量。  发表于 2014-10-1 00:23
新手大多担心别人拿走他们的脚本  发表于 2014-9-30 19:35
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
2210
在线时间
21 小时
注册时间
2014-9-20
帖子
4
3
 楼主| 发表于 2014-9-30 21:22:28 | 只看该作者
不行啊。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-26 05:12

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表