查看: 2596|回复: 1

[已经解决] 用了轩辕剑菜单后,禁止存档失去了作用

[复制链接]

素材区好人

梦石
5
星屑
12569
在线时间
4347 小时
注册时间
2011-7-21
回帖
2264

超评测参与极短28参与极短27参与极短26参与极短25参与极短24参与极短23参与极短22参与极短21参与

发表于 2015-6-7 17:31:49 | 显示全部楼层 |阅读模式

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

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

×
加了一个名为商店的选项后,即使进入禁止存档的状态,仍然能随时随地存档,应该如何解决?
工程:
大雄的剑之物语——奇迹的纹章.zip (3.05 MB, 下载次数: 101)



评分

参与人数 1星屑 +35 收起 理由
RyanBern + 35 手动认可奖励

查看全部评分

梦石
0
星屑
9716
在线时间
2775 小时
注册时间
2008-9-5
回帖
3458

开拓者短篇八RM组冠军短篇九导演组亚军白银编剧

发表于 2015-6-7 19:35:20 | 显示全部楼层
本帖最后由 cinderelmini 于 2015-6-7 19:43 编辑

稍微在新的菜单脚本里的打开存档部分加上限制条件就好啦~
脚本里搜索“###”(两个或以上的#)检查修改过的地方。
【脚本@@@Scene_Menu New!】
  1. #==============================================================================
  2. # ■ 仿轩辕剑式的菜单 BY 亿万星辰
  3. #==============================================================================
  4. # ■ Scene_Menu
  5. #------------------------------------------------------------------------------
  6. #  处理菜单画面的类。
  7. #==============================================================================

  8. class Scene_Menu
  9.   #--------------------------------------------------------------------------
  10.   # ● 初始化对像
  11.   #     menu_index : 命令光标的初期位置
  12.   #--------------------------------------------------------------------------
  13.   def initialize(menu_index = 0)
  14.     @menu_index = menu_index
  15.     @item_update = false
  16.     @skill_update = false
  17.     @equip_update = false
  18.     @status_update = false
  19.     @sys_update = false
  20.   end
  21.   #--------------------------------------------------------------------------
  22.   # ● 主处理
  23.   #--------------------------------------------------------------------------
  24.   def main
  25.     #----------------------------- 主菜单 -----------------------------------
  26.     # 生成命令窗口
  27.     @command_window = Window_MenuCommand.new(@menu_index)
  28.     # 同伴人数为 0 的情况下
  29.     if $game_party.actors.size == 0
  30.       # 物品、特技、装备、状态无效化
  31.       @command_window.disable_item(0)
  32.       @command_window.disable_item(1)
  33.       @command_window.disable_item(2)
  34.       @command_window.disable_item(3)
  35.     end
  36.     # 禁止存档的情况下
  37.     if $game_system.save_disabled
  38.       # 存档无效
  39.       @command_window.disable_item(4)
  40.     end
  41.     # 生成金钱窗口
  42.     @gold_window = Window_Gold.new
  43.     @gold_window.x = 0
  44.     @gold_window.y = 416
  45.     # 生成状态窗口
  46.     @status_window = Window_MenuStatus.new
  47.     @status_window.x = 0
  48.     @status_window.y = 64
  49.     @status_window1 = Window_MenuEquip.new
  50.     @status_window1.x = 0
  51.     @status_window1.y = 64
  52.     @status_window1.visible = false
  53.     # 遮蔽窗口
  54.     @dummy_window = Window_Base.new(160, 64, 480, 416)
  55.     @dummy_window.back_opacity = 0
  56.     @dummy_sprite = Sprite.new(Viewport.new(160, 64, 480, 416))
  57.     @old_index = @menu_index
  58.     case @menu_index
  59.     when 0
  60.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/item")
  61.     when 1
  62.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/skill")
  63.     when 2
  64.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/equip")
  65.     when 3
  66.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/status")
  67.     when 4
  68.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/system")
  69.     when 5
  70.       @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/电话")
  71.     end
  72.     # 执行过渡
  73.     Graphics.transition
  74.     # 主循环
  75.     loop do
  76.       # 刷新游戏画面
  77.       Graphics.update
  78.       # 刷新输入信息
  79.       Input.update
  80.       # 刷新画面
  81.       update
  82.       # 如果切换画面就中断循环
  83.       if $scene != self
  84.         break
  85.       end
  86.     end
  87.     # 准备过渡
  88.     Graphics.freeze
  89.     # 释放窗口
  90.     @command_window.dispose
  91.     @gold_window.dispose
  92.     @status_window.dispose
  93.     @status_window1.dispose
  94.     @dummy_window.dispose
  95.     @dummy_sprite.dispose
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 刷新画面
  99.   #--------------------------------------------------------------------------
  100.   def update
  101.     # 刷新窗口
  102.     #----------------------------- 主菜单 -----------------------------------
  103.     @command_window.update
  104.     @gold_window.update
  105.     if @command_window.index == 2
  106.       @status_window.visible = false
  107.       @status_window1.visible = true
  108.       @status_window1.update
  109.     else
  110.       @status_window.visible = true and @status_window1.visible = false if !@status_window.visible
  111.       @status_window.update
  112.     end
  113.     if @command_window.index != @old_index
  114.       case @command_window.index
  115.       when 0
  116.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/item")
  117.       when 1
  118.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/skill")
  119.       when 2
  120.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/equip")
  121.       when 3
  122.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/status")
  123.       when 4
  124.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/system")
  125.       when 5
  126.         @dummy_sprite.bitmap = Bitmap.new("Graphics/Pictures/电话")
  127.       end
  128.       @old_index = @command_window.index
  129.     end
  130.     # 命令窗口被激活的情况下: 调用 update_command
  131.     if @command_window.active
  132.       update_command
  133.       return
  134.     end
  135.     # 状态窗口被激活的情况下: 调用 update_status
  136.     if @status_window.active
  137.       if @item_update
  138.         update_item_target
  139.         return
  140.       elsif @skill_update
  141.         update_skill_target
  142.         return
  143.       else
  144.         update_status
  145.         return
  146.       end
  147.     end
  148.     if @status_window1.active
  149.       update_status1
  150.       return
  151.     end
  152.         
  153.     #----------------------------- 物品菜单 ---------------------------------
  154.     if @item_update
  155.       @item_help_window.update
  156.       @item_window.update
  157.       # 物品窗口被激活的情况下: 调用 update_item
  158.       if @item_window.active
  159.         update_item
  160.         return
  161.       end
  162.     #----------------------------- 奇术菜单 ---------------------------------
  163.     elsif @skill_update
  164.       # 刷新窗口
  165.       @skill_help_window.update
  166.       @skill_window.update
  167.       # 特技窗口被激活的情况下: 调用 update_skill
  168.       if @skill_window.active
  169.         update_skill
  170.         return
  171.       end
  172.     #----------------------------- 装备菜单 ---------------------------------
  173.     elsif @equip_update
  174.       @equip_right_window.update
  175.       @equip_item_window.update
  176.       # 设置物品窗口的可视状态
  177.       @equip_item_window1.visible = (@equip_right_window.index == 0)
  178.       @equip_item_window2.visible = (@equip_right_window.index == 1)
  179.       @equip_item_window3.visible = (@equip_right_window.index == 2)
  180.       @equip_item_window4.visible = (@equip_right_window.index == 3)
  181.       @equip_item_window5.visible = (@equip_right_window.index == 4)
  182.       @equip_item_window6.visible = (@equip_right_window.index == 5)
  183.       @equip_item_window7.visible = (@equip_right_window.index == 6)
  184.       @equip_item_window8.visible = (@equip_right_window.index == 7)
  185.       # 获取当前装备中的物品
  186.       item1 = @equip_right_window.item
  187.       # 设置当前的物品窗口到 @item_window
  188.       case @equip_right_window.index
  189.       when 0
  190.         @equip_item_window = @equip_item_window1
  191.       when 1
  192.         @equip_item_window = @equip_item_window2
  193.       when 2
  194.         @equip_item_window = @equip_item_window3
  195.       when 3
  196.         @equip_item_window = @equip_item_window4
  197.       when 4
  198.         @equip_item_window = @equip_item_window5
  199.       when 5
  200.         @equip_item_window = @equip_item_window6
  201.       when 6
  202.         @equip_item_window = @equip_item_window7
  203.       when 7
  204.         @equip_item_window = @equip_item_window8
  205.       end
  206.       # 右窗口被激活的情况下
  207.       if @equip_right_window.active
  208.         # 删除变更装备后的能力
  209.         @status_window1.set_new_parameters(nil, nil, nil, @status_window1.index)
  210.       end
  211.       # 物品窗口被激活的情况下
  212.       if @equip_item_window.active
  213.         # 获取现在选中的物品
  214.         item2 = @equip_item_window.item
  215.         # 变更装备
  216.         last_hp = @actor.hp
  217.         last_sp = @actor.sp
  218.         @actor.equip(@equip_right_window.index, item2 == nil ? 0 : item2.id)
  219.         # 获取变更装备后的能力值
  220.         new_atk = @actor.atk
  221.         new_pdef = @actor.pdef
  222.         new_mdef = @actor.mdef
  223.         # 返回到装备
  224.         @actor.equip(@equip_right_window.index, item1 == nil ? 0 : item1.id)
  225.         @actor.hp = last_hp
  226.         @actor.sp = last_sp
  227.         # 描画左窗口
  228.         @status_window1.set_new_parameters(new_atk, new_pdef, new_mdef, @status_window1.index)
  229.       end
  230.       # 右侧窗口被激活的情况下: 调用 update_right
  231.       if @equip_right_window.active
  232.         update_right
  233.         return
  234.       end
  235.       # 物品窗口被激活的情况下: 调用 update_item
  236.       if @equip_item_window.active
  237.         update_equip_item
  238.         return
  239.       end
  240.     #----------------------------- 状态菜单 ---------------------------------
  241.     elsif @status_update
  242.       update_status_status
  243.       return
  244.     #----------------------------- 系统菜单 ---------------------------------
  245.     elsif @sys_update
  246.       if @end_window != nil and !@end_window.disposed?
  247.         update_end
  248.       elsif @bgm_window != nil and !@bgm_window.disposed? and @currentbgm_window != nil and !@currentbgm_window.disposed?
  249.         update_bgm
  250.       elsif @sfx_window != nil and !@sfx_window.disposed? and @currentsfx_window != nil and !@currentsfx_window.disposed?
  251.         update_sfx
  252.       elsif !@system_window.disposed?
  253.         update_system
  254.       end
  255.       return
  256.     end
  257.   end
  258.   
  259.   def update_command
  260.     # 按下 B 键的情况下
  261.     if Input.trigger?(Input::B)
  262.       # 演奏取消 SE
  263.       $game_system.se_play($data_system.cancel_se)
  264.       # 切换的地图画面
  265.       $scene = Scene_Map.new
  266.       return
  267.     end
  268.     # 按下 C 键的情况下
  269.     if Input.trigger?(Input::C)
  270.       # 同伴人数为 0、存档、游戏结束以外的场合
  271.       if $game_party.actors.size == 0 and @command_window.index < 4
  272.         # 演奏冻结 SE
  273.         $game_system.se_play($data_system.buzzer_se)
  274.         return
  275.       end
  276.       # 命令窗口的光标位置分支
  277.       case @command_window.index
  278.       when 0  # 物品
  279.         # 演奏确定 SE
  280.         $game_system.se_play($data_system.decision_se)
  281.         # 切换到物品画面
  282.         $scene = Scene_Item.new
  283.       when 1  # 特技
  284.         # 演奏确定 SE
  285.         $game_system.se_play($data_system.decision_se)
  286.         # 激活状态窗口
  287.         @command_window.active = false
  288.         @status_window.active = true
  289.         @status_window.index = 0
  290.       when 2  # 装备
  291.         # 演奏确定 SE
  292.         $game_system.se_play($data_system.decision_se)
  293.         # 激活状态窗口
  294.         @command_window.active = false
  295.         @status_window1.active = true
  296.         @status_window1.index = 0
  297.       when 3  # 状态
  298.         # 演奏确定 SE
  299.         $game_system.se_play($data_system.decision_se)
  300.         # 激活状态窗口
  301.         @command_window.active = false
  302.         @status_window.active = true
  303.         @status_window.index = 0
  304.       when 4
  305.      if $game_switches[1] == true  #开关1打开情况下
  306.         $game_system.se_play($data_system.decision_se)
  307.         $scene = Scene_Map.new
  308.         $game_temp.common_event_id =1 #公共事件ID
  309.         else
  310.           $game_system.se_play($data_system.buzzer_se)
  311.         end
  312.       when 5  # 系统
  313.         # 演奏确定 SE
  314.         $game_system.se_play($data_system.decision_se)
  315.         @system_window = Window_SysCommand.new
  316.         @command_window.active = false
  317.         @sys_update = true
  318.       end
  319.       return
  320.     end
  321.   end
  322.   
  323.   def update_status
  324.     # 按下 B 键的情况下
  325.     if Input.trigger?(Input::B)
  326.       # 演奏取消 SE
  327.       $game_system.se_play($data_system.cancel_se)
  328.       # 激活命令窗口
  329.       @command_window.active = true
  330.       @status_window.active = false
  331.       @status_window.index = -2
  332.       return
  333.     end
  334.     # 按下 C 键的情况下
  335.     if Input.trigger?(Input::C)
  336.       # 命令窗口的光标位置分支
  337.       case @command_window.index
  338.       when 1  # 特技
  339.         # 本角色的行动限制在 2 以上的情况下
  340.         if $game_party.actors[@status_window.index].restriction >= 2
  341.           # 演奏冻结 SE
  342.           $game_system.se_play($data_system.buzzer_se)
  343.           return
  344.         end
  345.         # 演奏确定 SE
  346.         $game_system.se_play($data_system.decision_se)
  347.         @window_index = @status_window.index
  348.         @actor = $game_party.actors[@status_window.index]
  349.         # 生成帮助窗口、状态窗口、特技窗口
  350.         @skill_help_window = Window_Help_New.new
  351.         @skill_window = Window_Skill_New.new(@actor)
  352.         # 关联帮助窗口
  353.         @skill_window.help_window = @skill_help_window
  354.         @skill_help_window.x = 160
  355.         @skill_help_window.y = 480 - 64
  356.         @status_window.active = false
  357.         @skill_update = true
  358.       when 3  # 状态
  359.         # 演奏确定 SE
  360.         $game_system.se_play($data_system.decision_se)
  361.         # 切换到状态画面
  362.         # 获取角色
  363.         @actor = $game_party.actors[@status_window.index]
  364.         # 生成状态窗口
  365.         @status_status_window = Window_Status_New.new(@actor)
  366.         @status_window.active = false
  367.         @status_update = true
  368.       end
  369.       return
  370.     end
  371.   end
  372.   #--------------------------------------------------------------------------
  373.   # ● 物品刷新
  374.   #--------------------------------------------------------------------------
  375.   def update_item
  376.     # 按下 B 键的情况下
  377.     if Input.trigger?(Input::B)
  378.       # 演奏取消 SE
  379.       $game_system.se_play($data_system.cancel_se)
  380.       # 切换到菜单画面
  381.       @item_help_window.dispose
  382.       @item_window.dispose
  383.       @item_update = false
  384.       @command_window.active = true
  385.       return
  386.     end
  387.     # 按下 C 键的情况下
  388.     if Input.trigger?(Input::C)
  389.       # 获取物品窗口当前选中的物品数据
  390.       @item = @item_window.item
  391.       # 不使用物品的情况下
  392.       unless @item.is_a?(RPG::Item)
  393.         # 演奏冻结 SE
  394.         $game_system.se_play($data_system.buzzer_se)
  395.         return
  396.       end
  397.       # 不能使用的情况下
  398.       unless $game_party.item_can_use?(@item.id)
  399.         # 演奏冻结 SE
  400.         $game_system.se_play($data_system.buzzer_se)
  401.         return
  402.       end
  403.       # 演奏确定 SE
  404.       $game_system.se_play($data_system.decision_se)
  405.       # 效果范围是我方的情况下
  406.       if @item.scope >= 3
  407.         # 激活目标窗口
  408.         @item_window.active = false
  409.         @status_window.active = true
  410.         # 设置效果范围 (单体/全体) 的对应光标位置
  411.         if @item.scope == 4 || @item.scope == 6
  412.           @status_window.index = -1
  413.         else
  414.           @status_window.index = 0
  415.         end
  416.       # 效果在我方以外的情况下
  417.       else
  418.         # 公共事件 ID 有效的情况下
  419.         if @item.common_event_id > 0
  420.           # 预约调用公共事件
  421.           $game_temp.common_event_id = @item.common_event_id
  422.           # 演奏物品使用时的 SE
  423.           $game_system.se_play(@item.menu_se)
  424.           # 消耗品的情况下
  425.           if @item.consumable
  426.             # 使用的物品数减 1
  427.             $game_party.lose_item(@item.id, 1)
  428.             # 再描绘物品窗口的项目
  429.             @item_window.draw_item(@item_window.index)
  430.           end
  431.           @item_help_window.dispose
  432.           @item_window.dispose
  433.           # 切换到地图画面
  434.           $scene = Scene_Map.new
  435.           return
  436.         end
  437.       end
  438.       return
  439.     end
  440.   end
  441.   def update_item_target
  442.     # 按下 B 键的情况下
  443.     if Input.trigger?(Input::B)
  444.       # 演奏取消 SE
  445.       $game_system.se_play($data_system.cancel_se)
  446.       # 由于物品用完而不能使用的场合
  447.       unless $game_party.item_can_use?(@item.id)
  448.         # 再次生成物品窗口的内容
  449.         @item_window.refresh
  450.       end
  451.       # 删除目标窗口
  452.       @item_window.active = true
  453.       @status_window.index = -2
  454.       @status_window.active = false
  455.       return
  456.     end
  457.     # 按下 C 键的情况下
  458.     if Input.trigger?(Input::C)
  459.       # 如果物品用完的情况下
  460.       if $game_party.item_number(@item.id) == 0
  461.         # 演奏冻结 SE
  462.         $game_system.se_play($data_system.buzzer_se)
  463.         return
  464.       end
  465.       # 目标是全体的情况下
  466.       if @status_window.index == -1
  467.         # 对同伴全体应用物品使用效果
  468.         used = false
  469.         for i in $game_party.actors
  470.           used |= i.item_effect(@item)
  471.         end
  472.       end
  473.       # 目标是单体的情况下
  474.       if @status_window.index >= 0
  475.         # 对目标角色应用物品的使用效果
  476.         target = $game_party.actors[@status_window.index]
  477.         used = target.item_effect(@item)
  478.       end
  479.       # 使用物品的情况下
  480.       if used
  481.         # 演奏物品使用时的 SE
  482.         $game_system.se_play(@item.menu_se)
  483.         # 消耗品的情况下
  484.         if @item.consumable
  485.           # 使用的物品数减 1
  486.           $game_party.lose_item(@item.id, 1)
  487.           # 再描绘物品窗口的项目
  488.           @item_window.draw_item(@item_window.index)
  489.         end
  490.         # 再生成目标窗口的内容
  491.         @status_window.refresh
  492.         # 全灭的情况下
  493.         if $game_party.all_dead?
  494.           # 切换到游戏结束画面
  495.           $scene = Scene_Gameover.new
  496.           return
  497.         end
  498.         # 公共事件 ID 有效的情况下
  499.         if @item.common_event_id > 0
  500.           # 预约调用公共事件
  501.           $game_temp.common_event_id = @item.common_event_id
  502.           @item_help_window.dispose
  503.           @item_window.dispose
  504.           # 切换到地图画面
  505.           $scene = Scene_Map.new
  506.           return
  507.         end
  508.       end
  509.       # 无法使用物品的情况下
  510.       unless used
  511.         # 演奏冻结 SE
  512.         $game_system.se_play($data_system.buzzer_se)
  513.       end
  514.       return
  515.     end
  516.   end
  517.   #--------------------------------------------------------------------------
  518.   # ● 技能刷新
  519.   #--------------------------------------------------------------------------
  520.   def update_skill
  521.     # 按下 B 键的情况下
  522.     if Input.trigger?(Input::B)
  523.       # 演奏取消 SE
  524.       $game_system.se_play($data_system.cancel_se)
  525.       # 切换到菜单画面
  526.       @skill_help_window.dispose
  527.       @skill_window.dispose
  528.       @skill_update = false
  529.       @status_window.active = true
  530.       @status_window.index = @window_index
  531.       return
  532.     end
  533.     # 按下 C 键的情况下
  534.     if Input.trigger?(Input::C)
  535.       # 获取特技窗口现在选择的特技的数据
  536.       @skill = @skill_window.skill
  537.       # 不能使用的情况下
  538.       if @skill == nil or not @actor.skill_can_use?(@skill.id)
  539.         # 演奏冻结 SE
  540.         $game_system.se_play($data_system.buzzer_se)
  541.         return
  542.       end
  543.       # 演奏确定 SE
  544.       $game_system.se_play($data_system.decision_se)
  545.       # 效果范围是我方的情况下
  546.       if @skill.scope >= 3
  547.         # 激活目标窗口
  548.         @skill_window.active = false
  549.         @status_window.active = true
  550.         # 设置效果范围 (单体/全体) 的对应光标位置
  551.         if @skill.scope == 4 || @skill.scope == 6
  552.           @status_window.index = -1
  553.         elsif @skill.scope == 7
  554.           @status_window.index = @actor_index - 10
  555.         else
  556.           @status_window.index = 0
  557.         end
  558.       # 效果在我方以外的情况下
  559.       else
  560.         # 公共事件 ID 有效的情况下
  561.         if @skill.common_event_id > 0
  562.           # 预约调用公共事件
  563.           $game_temp.common_event_id = @skill.common_event_id
  564.           # 演奏特技使用时的 SE
  565.           $game_system.se_play(@skill.menu_se)
  566.           # 消耗 SP
  567.           @actor.sp -= @skill.sp_cost
  568.           # 再生成各窗口的内容
  569.           @skill_window.refresh
  570.           @status_window.refresh
  571.           @skill_help_window.dispose
  572.           @skill_window.dispose
  573.           # 切换到地图画面
  574.           $scene = Scene_Map.new
  575.           return
  576.         end
  577.       end
  578.       return
  579.     end
  580.   end
  581.   def update_skill_target
  582.     # 按下 B 键的情况下
  583.     if Input.trigger?(Input::B)
  584.       # 演奏取消 SE
  585.       $game_system.se_play($data_system.cancel_se)
  586.       # 删除目标窗口
  587.       @skill_window.active = true
  588.       @status_window.index = -2
  589.       @status_window.active = false
  590.       return
  591.     end
  592.     # 按下 C 键的情况下
  593.     if Input.trigger?(Input::C)
  594.       # 因为 SP 不足而无法使用的情况下
  595.       unless @actor.skill_can_use?(@skill.id)
  596.         # 演奏冻结 SE
  597.         $game_system.se_play($data_system.buzzer_se)
  598.         return
  599.       end
  600.       # 目标是全体的情况下
  601.       if @status_window.index == -1
  602.         # 对同伴全体应用特技使用效果
  603.         used = false
  604.         for i in $game_party.actors
  605.           used |= i.skill_effect(@actor, @skill)
  606.         end
  607.       end
  608.       # 目标是使用者的情况下
  609.       if @status_window.index <= -2
  610.         # 对目标角色应用特技的使用效果
  611.         target = $game_party.actors[@status_window.index + 10]
  612.         used = target.skill_effect(@actor, @skill)
  613.       end
  614.       # 目标是单体的情况下
  615.       if @status_window.index >= 0
  616.         # 对目标角色应用特技的使用效果
  617.         target = $game_party.actors[@status_window.index]
  618.         used = target.skill_effect(@actor, @skill)
  619.       end
  620.       # 使用特技的情况下
  621.       if used
  622.         # 演奏特技使用时的 SE
  623.         $game_system.se_play(@skill.menu_se)
  624.         # 消耗 SP
  625.         @actor.sp -= @skill.sp_cost
  626.         # 再生成各窗口内容
  627.         @status_window.refresh
  628.         @skill_window.refresh
  629.         # 全灭的情况下
  630.         if $game_party.all_dead?
  631.           # 切换到游戏结束画面
  632.           $scene = Scene_Gameover.new
  633.           return
  634.         end
  635.         # 公共事件 ID 有效的情况下
  636.         if @skill.common_event_id > 0
  637.           # 预约调用公共事件
  638.           $game_temp.common_event_id = @skill.common_event_id
  639.           @skill_help_window.dispose
  640.           @skill_window.dispose
  641.           # 切换到地图画面
  642.           $scene = Scene_Map.new
  643.           return
  644.         end
  645.       end
  646.       # 无法使用特技的情况下
  647.       unless used
  648.         # 演奏冻结 SE
  649.         $game_system.se_play($data_system.buzzer_se)
  650.       end
  651.       return
  652.     end
  653.   end
  654.   #--------------------------------------------------------------------------
  655.   # ● 装备刷新
  656.   #--------------------------------------------------------------------------
  657.   def update_right
  658.     # 按下 B 键的情况下
  659.     if Input.trigger?(Input::B)
  660.       # 演奏取消 SE
  661.       $game_system.se_play($data_system.cancel_se)
  662.       # 切换到菜单画面
  663.       @equip_help_window.dispose
  664.       @equip_right_window.dispose
  665.       @equip_item_window1.dispose
  666.       @equip_item_window2.dispose
  667.       @equip_item_window3.dispose
  668.       @equip_item_window4.dispose
  669.       @equip_item_window5.dispose
  670.       @equip_item_window6.dispose
  671.       @equip_item_window7.dispose
  672.       @equip_item_window8.dispose
  673.       @equip_update = false
  674.       @status_window1.active = true
  675.     end
  676.     # 按下 C 键的情况下
  677.     if Input.trigger?(Input::C)
  678.       # 固定装备的情况下
  679.       if @actor.equip_fix?(@equip_right_window.index)
  680.         # 演奏冻结 SE
  681.         $game_system.se_play($data_system.buzzer_se)
  682.         return
  683.       end
  684.       # 演奏确定 SE
  685.       $game_system.se_play($data_system.decision_se)
  686.       # 激活物品窗口
  687.       @equip_right_window.active = false
  688.       @equip_item_window.active = true
  689.       @equip_item_window.index = 0
  690.       return
  691.     end
  692.   end
  693.   def update_equip_item
  694.     # 按下 B 键的情况下
  695.     if Input.trigger?(Input::B)
  696.       # 演奏取消 SE
  697.       $game_system.se_play($data_system.cancel_se)
  698.       # 激活右侧窗口
  699.       @equip_right_window.active = true
  700.       @equip_item_window.active = false
  701.       @equip_item_window.index = -1
  702.       return
  703.     end
  704.     # 按下 C 键的情况下
  705.     if Input.trigger?(Input::C)
  706.       # 演奏装备 SE
  707.       $game_system.se_play($data_system.equip_se)
  708.       # 获取物品窗口现在选择的装备数据
  709.       item = @equip_item_window.item
  710.       # 变更装备
  711.       @actor.equip(@equip_right_window.index, item == nil ? 0 : item.id)
  712.       # 激活右侧窗口
  713.       @equip_right_window.active = true
  714.       @equip_item_window.active = false
  715.       @equip_item_window.index = -1
  716.       # 再生成右侧窗口、物品窗口的内容
  717.       @equip_right_window.refresh
  718.       if @equip_right_window.index == 6 or @equip_right_window.index == 7
  719.         @equip_item_window7.refresh
  720.         @equip_item_window8.refresh
  721.       else
  722.         @equip_item_window.refresh
  723.       end
  724.       return
  725.     end
  726.   end
  727.   def update_status1
  728.     # 按下 B 键的情况下
  729.     if Input.trigger?(Input::B)
  730.       # 演奏取消 SE
  731.       $game_system.se_play($data_system.cancel_se)
  732.       # 激活命令窗口
  733.       @command_window.active = true
  734.       @status_window1.active = false
  735.       @status_window1.index = -1
  736.       return
  737.     end
  738.     # 按下 C 键的情况下
  739.     if Input.trigger?(Input::C)
  740.       # 命令窗口的光标位置分支
  741.         # 演奏确定 SE
  742.         $game_system.se_play($data_system.decision_se)
  743.         @equip_index = 0
  744.         @actor = $game_party.actors[@status_window1.index]
  745.         @equip_help_window = Window_Help_New.new
  746.         @equip_help_window.x = 160
  747.         @equip_help_window.y = 480 - 64
  748.         @equip_right_window = Window_EquipRight_New.new(@actor)
  749.         @equip_item_window1 = Window_EquipItem_New.new(@actor, 0)
  750.         @equip_item_window2 = Window_EquipItem_New.new(@actor, 1)
  751.         @equip_item_window3 = Window_EquipItem_New.new(@actor, 2)
  752.         @equip_item_window4 = Window_EquipItem_New.new(@actor, 3)
  753.         @equip_item_window5 = Window_EquipItem_New.new(@actor, 4)
  754.         @equip_item_window6 = Window_EquipItem_New.new(@actor, 5)
  755.         @equip_item_window7 = Window_EquipItem_New.new(@actor, 6)
  756.         @equip_item_window8 = Window_EquipItem_New.new(@actor, 6)
  757.         # 关联帮助窗口
  758.         @equip_right_window.help_window = @equip_help_window
  759.         @equip_item_window1.help_window = @equip_help_window
  760.         @equip_item_window2.help_window = @equip_help_window
  761.         @equip_item_window3.help_window = @equip_help_window
  762.         @equip_item_window4.help_window = @equip_help_window
  763.         @equip_item_window5.help_window = @equip_help_window
  764.         @equip_item_window6.help_window = @equip_help_window
  765.         @equip_item_window7.help_window = @equip_help_window
  766.         @equip_item_window8.help_window = @equip_help_window
  767.         # 设置光标位置
  768.         @equip_right_window.index = @equip_index
  769.         @status_window1.active = false
  770.         @equip_update = true
  771.         # 设置物品窗口的可视状态
  772.         @equip_item_window1.visible = (@equip_right_window.index == 0)
  773.         @equip_item_window2.visible = (@equip_right_window.index == 1)
  774.         @equip_item_window3.visible = (@equip_right_window.index == 2)
  775.         @equip_item_window4.visible = (@equip_right_window.index == 3)
  776.         @equip_item_window5.visible = (@equip_right_window.index == 4)
  777.         @equip_item_window6.visible = (@equip_right_window.index == 5)
  778.         @equip_item_window7.visible = (@equip_right_window.index == 6)
  779.         @equip_item_window8.visible = (@equip_right_window.index == 7)
  780.         # 获取当前装备中的物品
  781.         item1 = @equip_right_window.item
  782.         # 设置当前的物品窗口到 @item_window
  783.         case @equip_right_window.index
  784.         when 0
  785.           @equip_item_window = @equip_item_window1
  786.         when 1
  787.           @equip_item_window = @equip_item_window2
  788.         when 2
  789.           @equip_item_window = @equip_item_window3
  790.         when 3
  791.           @equip_item_window = @equip_item_window4
  792.         when 4
  793.           @equip_item_window = @equip_item_window5
  794.         when 5
  795.           @equip_item_window = @equip_item_window6
  796.         when 6
  797.           @equip_item_window = @equip_item_window7
  798.         when 7
  799.           @equip_item_window = @equip_item_window8
  800.         end
  801.         # 右窗口被激活的情况下
  802.         if @equip_right_window.active
  803.           # 删除变更装备后的能力
  804.           @status_window1.set_new_parameters(nil, nil, nil)
  805.         end
  806.         # 物品窗口被激活的情况下
  807.         if @equip_item_window.active
  808.           # 获取现在选中的物品
  809.           item2 = @equip_item_window.item
  810.           # 变更装备
  811.           last_hp = @actor.hp
  812.           last_sp = @actor.sp
  813.           @actor.equip(@equip_right_window.index, item2 == nil ? 0 : item2.id)
  814.           # 获取变更装备后的能力值
  815.           new_atk = @actor.atk
  816.           new_pdef = @actor.pdef
  817.           new_mdef = @actor.mdef
  818.           # 返回到装备
  819.           @actor.equip(@equip_right_window.index, item1 == nil ? 0 : item1.id)
  820.           @actor.hp = last_hp
  821.           @actor.sp = last_sp
  822.           # 描画左窗口
  823.           @status_window1.set_new_parameters(new_atk, new_pdef, new_mdef)
  824.         end
  825.     end
  826.   end
  827.   #--------------------------------------------------------------------------
  828.   # ● 状态刷新
  829.   #--------------------------------------------------------------------------
  830.   def update_status_status
  831.     # 按下 B 键的情况下
  832.     if Input.trigger?(Input::B)
  833.       # 演奏取消 SE
  834.       $game_system.se_play($data_system.cancel_se)
  835.       # 切换到菜单画面
  836.       @status_status_window.dispose
  837.       @status_update = false
  838.       @status_window.active = true
  839.       return
  840.     end
  841.   end
  842.   
  843.   def update_system
  844.     @system_window.update
  845.     # 按下 B 键的情况下
  846.     if Input.trigger?(Input::B)
  847.       # 演奏取消 SE
  848.       $game_system.se_play($data_system.cancel_se)
  849.       # 切换到菜单画面
  850.       @system_window.dispose
  851.       @sys_update = false
  852.       @command_window.active = true
  853.       return
  854.     end
  855.     # 按下 C 键的情况下
  856.     if Input.trigger?(Input::C)
  857.       ########## 此处演奏确定 SE限制条件 ##########
  858.       # 演奏确定 SE
  859.       $game_system.se_play($data_system.decision_se) if !(@system_window.index == 2 && $game_system.save_disabled)
  860.       case @system_window.index
  861.       when 0
  862.         @bgm_window = Window_BGM_Volume.new(80, ["0%", "17%", "34%", "50%", "67%", "84%", "100%"])
  863.         @currentbgm_window = Window_CurrentBGM_Volume.new
  864.         @system_window.active = false
  865.       when 1
  866.         @sfx_window = Window_SFX_Volume.new(80, ["0%", "17%", "34%", "50%", "67%", "84%", "100%"])
  867.         @currentsfx_window = Window_CurrentSFX_Volume.new
  868.         @system_window.active = false
  869.       when 2
  870.         ############################################
  871.         # 禁止存档的情况下
  872.         if $game_system.save_disabled
  873.           # 演奏冻结 SE
  874.           $game_system.se_play($data_system.buzzer_se)
  875.           return
  876.         end
  877.         ############################################
  878.         @system_window.dispose
  879.         $scene = Scene_Save.new
  880.       when 3
  881.         @system_window.dispose
  882.         $scene = Scene_Load.new(true)
  883.       when 4
  884.         @end_window = Window_EndCommand.new
  885.         @system_window.active = false
  886.       end
  887.       return
  888.     end
  889.   end
  890.   
  891.   def update_bgm
  892.     @bgm_window.update
  893.     if Input.trigger?(Input::B)
  894.       $game_system.se_play($data_system.cancel_se)
  895.       @system_window.active = true
  896.       @bgm_window.dispose
  897.       @currentbgm_window.dispose
  898.       return
  899.     end
  900.     if Input.trigger?(Input::C)
  901.       case @bgm_window.index
  902.   when 0
  903.         $game_system.bgm_volume = 0
  904.         $game_system.bgm_play($game_system.bgm_memorize)
  905.         @currentbgm_window.refresh
  906.       when 1
  907.         $game_system.bgm_volume = 17
  908.         $game_system.bgm_play($game_system.bgm_memorize)
  909.         @currentbgm_window.refresh
  910.       when 2
  911.         $game_system.bgm_volume = 34
  912.         $game_system.bgm_play($game_system.bgm_memorize)
  913.         @currentbgm_window.refresh
  914.       when 3
  915.         $game_system.bgm_volume = 50
  916.         $game_system.bgm_play($game_system.bgm_memorize)
  917.         @currentbgm_window.refresh
  918.       when 4
  919.         $game_system.bgm_volume = 67
  920.         $game_system.bgm_play($game_system.bgm_memorize)
  921.         @currentbgm_window.refresh
  922.       when 5
  923.         $game_system.bgm_volume = 84
  924.         $game_system.bgm_play($game_system.bgm_memorize)
  925.         @currentbgm_window.refresh
  926.       when 6
  927.         $game_system.bgm_volume = 100
  928.         $game_system.bgm_play($game_system.bgm_memorize)
  929.         @currentbgm_window.refresh
  930.       end
  931.       return
  932.     end
  933.   end
  934.   
  935.   def update_sfx
  936.     @sfx_window.update
  937.     if Input.trigger?(Input::B)
  938.       $game_system.se_play($data_system.cancel_se)
  939.       @sfx_window.dispose
  940.       @currentsfx_window.dispose
  941.       @system_window.active = true
  942.       return
  943.     end
  944.     if Input.trigger?(Input::C)
  945.       case @sfx_window.index
  946.       when 0
  947.         $game_system.se_volume = 0
  948.         $game_system.se_play($data_system.decision_se)
  949.         @currentsfx_window.refresh
  950.       when 1
  951.         $game_system.se_volume = 17
  952.         $game_system.se_play($data_system.decision_se)
  953.         @currentsfx_window.refresh
  954.       when 2
  955.         $game_system.se_volume = 34
  956.         $game_system.se_play($data_system.decision_se)
  957.         @currentsfx_window.refresh
  958.       when 3
  959.         $game_system.se_volume = 50
  960.         $game_system.se_play($data_system.decision_se)
  961.         @currentsfx_window.refresh
  962.       when 4
  963.         $game_system.se_volume = 67
  964.         $game_system.se_play($data_system.decision_se)
  965.         @currentsfx_window.refresh
  966.       when 5
  967.         $game_system.se_volume = 84
  968.         $game_system.se_play($data_system.decision_se)
  969.         @currentsfx_window.refresh
  970.       when 6
  971.         $game_system.se_volume = 100
  972.         $game_system.se_play($data_system.decision_se)
  973.         @currentsfx_window.refresh
  974.       end
  975.       $game_map.autoplay
  976.       return
  977.     end
  978.   end
  979.   
  980.   def update_end
  981.     @end_window.update
  982.     if Input.trigger?(Input::B)
  983.       $game_system.se_play($data_system.cancel_se)
  984.       @end_window.dispose
  985.       @system_window.active = true
  986.       return
  987.     end
  988.     if Input.trigger?(Input::C)
  989.       case @end_window.index
  990.       when 0
  991.         @end_window.dispose
  992.         @system_window.dispose
  993.         command_to_title
  994.       when 1
  995.         command_shutdown
  996.       end
  997.       return
  998.     end
  999.   end

  1000.   def command_to_title
  1001.     $game_system.se_play($data_system.decision_se)
  1002.     Audio.bgm_fade(800)
  1003.     Audio.bgs_fade(800)
  1004.     Audio.me_fade(800)
  1005.     $scene = Scene_Title.new
  1006.   end

  1007.   def command_shutdown
  1008.     $game_system.se_play($data_system.decision_se)
  1009.     Audio.bgm_fade(800)
  1010.     Audio.bgs_fade(800)
  1011.     Audio.me_fade(800)
  1012.     $scene = nil
  1013.   end
  1014. end
复制代码


啊啊~顺手把禁止存档时存档选项的文字灰色做好了~替换Window_SysCommand就好~
禁止存档后存档字样灰色#==============================================================================
# ■ Window_SysCommand
#------------------------------------------------------------------------------
#  天书控制里的窗口。
#==============================================================================

class Window_SysCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #--------------------------------------------------------------------------
  def initialize
    super(460, 64, 180, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity = 160
    @item_max = 5
    @column_max = 1
    @commands = ["音乐大小", "音量大小", "存档", "读档", "结束游戏"]
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    bitmap = RPG::Cache.icon("bgm")
    self.contents.blt(120, 4, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("sfx")
    self.contents.blt(120, 36, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("save")
    self.contents.blt(120, 68, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("load")
    self.contents.blt(120, 100, bitmap, Rect.new(0, 0, 24, 24))
    bitmap = RPG::Cache.icon("exit")
    self.contents.blt(120, 132, bitmap, Rect.new(0, 0, 24, 24))
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def draw_item(index)
    x = 4
    y = 32 * index
    self.contents.font.color = save_disabled?(index) ? disabled_color : normal_color
    self.contents.draw_text(x, y, 128, 32, @commands[index])
  end
  
  #--------------------------------------------------------------------------
  # ● 存档选项的位置
  #--------------------------------------------------------------------------
  def seve_index
    return 2
  end
  #--------------------------------------------------------------------------
  # ● 是否存档无效化?
  #--------------------------------------------------------------------------
  def save_disabled?(index)
    return (index == seve_index && $game_system.save_disabled)
  end
  
end

点评

PSV:然而做好了……  发表于 2015-6-7 19:43
PS:因为不知道LZ是否需要默认的不可存档时存档字样变灰色,而窝去看了相关脚本后发现要做这个还得改别的一段脚本,所以没加上去~  发表于 2015-6-7 19:36

评分

参与人数 2星屑 +45 梦石 +1 收起 理由
RyanBern + 1 认可答案
无忧谷主幻 + 45 你是一个好人

查看全部评分

回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部