本帖最后由 gaofei677 于 2013-6-19 15:01 编辑
zl245479821 发表于 2013-6-19 14:31
大大..对不起阿,我复制的时候不小心少了2个end,所以就...对不起阿,谢谢了。哎,能不能把那个人物和金 ...
用此脚本替换2楼的脚本,同样插入MIAN之前
class Scene_Menu < Scene_Base def start super create_menu_background create_command_window end def terminate super dispose_menu_background @command_window.dispose end def update super update_menu_background @command_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::save s3 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3]) @command_window.x = (544 - @command_window.width) / 2 @command_window.y = (416 - @command_window.height) / 2 @command_window.index = 0 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 # 存檔 $scene = Scene_File.new(true, false, false) when 2 # 結束遊戲 $scene = Scene_End.new end end end end
class Scene_Menu < Scene_Base
def start
super
create_menu_background
create_command_window
end
def terminate
super
dispose_menu_background
@command_window.dispose
end
def update
super
update_menu_background
@command_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::save
s3 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.x = (544 - @command_window.width) / 2
@command_window.y = (416 - @command_window.height) / 2
@command_window.index = 0
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 # 存檔
$scene = Scene_File.new(true, false, false)
when 2 # 結束遊戲
$scene = Scene_End.new
end
end
end
end
|