在网上找到这么个8人状态脚本,但是用了以后每次测试游戏都会出现这个
求大神指教!
#==============================================================================
# ○ 多人队伍脚本扩展-八人状态菜单
# ——By.冰舞蝶恋
#------------------------------------------------------------------------------
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
# 显示菜单画面和同伴状态的窗口。
#==============================================================================class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 416)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
if @item_max <= 4
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1)
draw_actor_mp(actor, x + 120, y + WLH * 2)
end
else
for actor in $game_party.members
for a in 0..@item_max-1
if a < 4
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 4
y = actor.index * 96 + WLH / 2-12
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120-24, y)
draw_actor_level(actor, x+120-24, y + WLH * 1)
draw_actor_hp(actor, x + 120-24, y + WLH * 1+24, 72)
draw_actor_mp(actor, x + 120-24, y + WLH * 2+24, 72)
else
draw_actor_face(actor, 2+176, (actor.index - 4) * 96 + 2, 92)
x = 4+176
y = (actor.index - 4) * 96 + WLH / 2-12
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120-24, y)
draw_actor_level(actor, x+120-24, y + WLH * 1)
draw_actor_hp(actor, x + 120-24, y + WLH * 1+24, 72)
draw_actor_mp(actor, x + 120-24, y + WLH * 2+24, 72)
end
end
end
end
end
#--------------------------------------------------------------------------
# ● 更新光标
#--------------------------------------------------------------------------
def update_cursor
if @item_max <= 4
if
@index < 0 # 无光标
self.cursor_rect.empty
elsif
@index < @item_max # 一般
self.cursor_rect.set(0,
@index * 96, contents.width, 96)
elsif
@index >= 100 # 使用本身
self.cursor_rect.set(0, (
@index - 100) * 96, contents.width, 96)
else # 全体
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
else
if
@index < 0 # 无光标
self.cursor_rect.empty
elsif
@index < @item_max # 一般
if
@index < 4
self.cursor_rect.set(0,
@index * 96, 352 / 2, 96)
else
self.cursor_rect.set(352 / 2, (
@index - 4) * 96, 352 / 2, 96)
end
elsif
@index >= 100 # 使用本身
if
@index -100 < 4
self.cursor_rect.set(0, (
@index - 100) * 96, 352 / 2, 96)
else
self.cursor_rect.set(352 / 2, (
@index - 100 - 4) * 96, 352 / 2, 96)
end
else # 全体
self.cursor_rect.set(0, 0, contents.width, 4*96)
end
end
end
end