赞 | 0 |
VIP | 0 |
好人卡 | 3 |
积分 | 2 |
经验 | 37164 |
最后登录 | 2014-6-30 |
在线时间 | 566 小时 |
Lv1.梦旅人 彭格列I世
- 梦石
- 0
- 星屑
- 168
- 在线时间
- 566 小时
- 注册时间
- 2012-8-17
- 帖子
- 1614
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 小小刀886 于 2013-3-29 09:03 编辑
请帮忙把这个脚本在左面加入时间和步数的信息框:
#============================================================================ # ○ VX·新简易菜单 # -By.冰舞蝶恋 #---------------------------------------------------------------------------- # 用法神马的…不解释…… #============================================================================ class Scene_Menu def start super create_menu_background create_command_window @gold_window = Window_Gold.new(0, 360) @mapwindow = Window_Draw_Mapname.new @status_window = Window_MenuStatus.new(160, 0) end def terminate super dispose_menu_background @command_window.dispose @gold_window.dispose @mapwindow.dispose @status_window.dispose end def update super update_menu_background @command_window.update @gold_window.update @mapwindow.update @status_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = "任务" s6 = Vocab::game_end @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6], 6) @command_window.index = @menu_index if $game_party.members.size == 0 # 如果队伍为空 @command_window.draw_item(0, false) # 无效化物品选项 @command_window.draw_item(1, false) # 无效化技能选项 @command_window.draw_item(2, false) # 无效化装备选项 @command_window.draw_item(3, false) # 无效化状态选项 end if $game_system.save_disabled # 如果禁止存档 @command_window.draw_item(4, false) # 无效化存档选项 end end def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # 物品 $scene = Scene_Item.new when 1,2,3 # 技能、装备、状态 start_actor_selection when 4 # 任务 $scene = Scene_Task.new when 5 # 结束游戏 $scene = Scene_End.new end end end end class Window_MenuStatus < Window_Selectable def initialize(x, y) super(x, y+56, 384, 416-56) refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members draw_actor_shortface(actor, 2, actor.index * 82 + 2, 92) x = 104 y = actor.index * 82 + 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) end end def update_cursor if @index < 0 self.cursor_rect.empty elsif @index < @item_max self.cursor_rect.set(0, @index * 82, contents.width, 82) elsif @index >= 100 self.cursor_rect.set(0, (@index - 100) * 82, contents.width, 82) else self.cursor_rect.set(0, 0, contents.width, @item_max * 82) end end end class Window_Base def draw_shortface(face_name, face_index, x, y, size = 96) bitmap = Cache.face(face_name) rect = Rect.new(0, 0, 0, 0) rect.x = face_index % 4 * 96 + (96 - size) / 2 rect.y = face_index / 4 * 96 + (96 - size) / 2 + 16 rect.width = size rect.height = size - 32 self.contents.blt(x, y+8, bitmap, rect) bitmap.dispose end def draw_actor_shortface(actor, x, y, size = 96) draw_shortface(actor.face_name, actor.face_index, x, y, size) end end class Game_Map attr_reader :map_id def mapname $mapname = load_data("Data/MapInfos.rvdata") $mapname[@map_id].name end end class Window_Draw_Mapname < Window_Base def initialize super(0, 56, 160, 304) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 4, 160, WLH, "位置:") self.contents.font.color = normal_color self.contents.draw_text(4+8, WLH + 12, 160, WLH, $game_map.mapname.to_s) end end
#============================================================================
# ○ VX·新简易菜单
# -By.冰舞蝶恋
#----------------------------------------------------------------------------
# 用法神马的…不解释……
#============================================================================
class Scene_Menu
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@mapwindow = Window_Draw_Mapname.new
@status_window = Window_MenuStatus.new(160, 0)
end
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@mapwindow.dispose
@status_window.dispose
end
def update
super
update_menu_background
@command_window.update
@gold_window.update
@mapwindow.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = "任务"
s6 = Vocab::game_end
@command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6], 6)
@command_window.index = @menu_index
if $game_party.members.size == 0 # 如果队伍为空
@command_window.draw_item(0, false) # 无效化物品选项
@command_window.draw_item(1, false) # 无效化技能选项
@command_window.draw_item(2, false) # 无效化装备选项
@command_window.draw_item(3, false) # 无效化状态选项
end
if $game_system.save_disabled # 如果禁止存档
@command_window.draw_item(4, false) # 无效化存档选项
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # 物品
$scene = Scene_Item.new
when 1,2,3 # 技能、装备、状态
start_actor_selection
when 4 # 任务
$scene = Scene_Task.new
when 5 # 结束游戏
$scene = Scene_End.new
end
end
end
end
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(x, y+56, 384, 416-56)
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_shortface(actor, 2, actor.index * 82 + 2, 92)
x = 104
y = actor.index * 82 + 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)
end
end
def update_cursor
if @index < 0
self.cursor_rect.empty
elsif @index < @item_max
self.cursor_rect.set(0, @index * 82, contents.width, 82)
elsif @index >= 100
self.cursor_rect.set(0, (@index - 100) * 82, contents.width, 82)
else
self.cursor_rect.set(0, 0, contents.width, @item_max * 82)
end
end
end
class Window_Base
def draw_shortface(face_name, face_index, x, y, size = 96)
bitmap = Cache.face(face_name)
rect = Rect.new(0, 0, 0, 0)
rect.x = face_index % 4 * 96 + (96 - size) / 2
rect.y = face_index / 4 * 96 + (96 - size) / 2 + 16
rect.width = size
rect.height = size - 32
self.contents.blt(x, y+8, bitmap, rect)
bitmap.dispose
end
def draw_actor_shortface(actor, x, y, size = 96)
draw_shortface(actor.face_name, actor.face_index, x, y, size)
end
end
class Game_Map
attr_reader :map_id
def mapname
$mapname = load_data("Data/MapInfos.rvdata")
$mapname[@map_id].name
end
end
class Window_Draw_Mapname < Window_Base
def initialize
super(0, 56, 160, 304)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 4, 160, WLH, "位置:")
self.contents.font.color = normal_color
self.contents.draw_text(4+8, WLH + 12, 160, WLH, $game_map.mapname.to_s)
end
end
已经解决...求版主大大删帖... |
|