Project1

标题: 关于手动加点脚本,如何设置加完了不返回菜单? [打印本页]

作者: 一塌糊涂    时间: 2008-4-9 07:23
提示: 作者被禁止或删除 内容自动屏蔽
作者: 雪流星    时间: 2008-4-9 14:29
你是说这个吗?
http://rpg.blue/web/htm/news933.htm

按pgup、pgdn就能换人了


顺便我也想问问小幽,你说呼唤加点场景的方法是:
$scene = Scene_Lvup.new(角色编号,返回菜单编号)。

但是我看脚本内是直接返回地图,而且返回菜单编号是设定成进入加点脚本後的位置

我修改了一下,小U看看吧{/hx}:
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================

  4. # 脚本使用设定:

  5. LEVEL_UP_POINT = 3  # 每升一级所增加的点数
  6. LEVEL_UP_VARIABLE = 100  # 储存角色点数的变量编号与角色id编号的差值
  7.                          # 默认情况 = 100,
  8.                          # 则是数据库里1号角色的加点数存于101号变量
  9.                          # 3号角色的加点数存于103号变量。
  10.                          # 你可以直接操作变量赠与角色可分配点数

  11. # 每增加一次点数,各项能力值的变化:357-410行
  12.                         
  13. # 使用方法介绍:

  14. # 本脚本不会取代原来的升级自动加点 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  15. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  16. # 1-99级全部等于一个相同数值就行了。

  17. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  18. # 默认都是0号

  19. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  20. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new

  21. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG

  22. #==============================================================================
  23. # ■ Window_Command
  24. #------------------------------------------------------------------------------
  25. #  一般的命令选择行窗口。(追加定义)
  26. #==============================================================================
  27. class Window_Command < Window_Selectable
  28.   #--------------------------------------------------------------------------
  29.   # ● 项目有效化
  30.   #     index : 项目编号
  31.   #--------------------------------------------------------------------------
  32.   def able_item(index)
  33.     draw_item(index, normal_color)
  34.   end
  35. end
  36. #==============================================================================
  37. # ■ Game_Actor
  38. #------------------------------------------------------------------------------
  39. #  处理角色的类。(再定义)
  40. #==============================================================================

  41. class Game_Actor < Game_Battler
  42.   def level_up
  43.     @level += 1
  44.     $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  45.     for learning in self.class.learnings
  46.       learn_skill(learning.skill_id) if learning.level == @level
  47.     end
  48.   end
  49. end
  50. #==============================================================================
  51. # ■ Window_Base
  52. #------------------------------------------------------------------------------
  53. #  游戏中全部窗口的超级类(追加定义)
  54. #==============================================================================
  55. class Window_Base < Window
  56.   #--------------------------------------------------------------------------
  57.   # ● 描绘 HP
  58.   #     actor : 角色
  59.   #     x     : 描画目标 X 坐标
  60.   #     y     : 描画目标 Y 坐标
  61.   #     width : 描画目标的宽
  62.   #--------------------------------------------------------------------------
  63.   def draw_actor_hp_lvup(actor, x, y)
  64.     self.contents.font.color = system_color
  65.     self.contents.draw_text(x , y, 96, 32, "最大" + Vocab::hp)
  66.     if $temp_hp == 0
  67.       self.contents.font.color = normal_color
  68.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  69.     else
  70.       maxhp = actor.maxhp + $temp_hp
  71.       self.contents.font.color = Color.new(255, 128, 128, 255)
  72.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  73.       self.contents.font.color = normal_color      
  74.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  75.       if $temp_hp >=0
  76.         self.contents.font.color = Color.new(255, 128, 128, 255)
  77.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  78.       else
  79.         self.contents.font.color = Color.new(255,255,0,255)
  80.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  81.       end
  82.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  83.       self.contents.font.color = normal_color
  84.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  85.     end
  86.   end
  87.   #--------------------------------------------------------------------------
  88.   # ● 描绘 MP
  89.   #     actor : 角色
  90.   #     x     : 描画目标 X 坐标
  91.   #     y     : 描画目标 Y 坐标
  92.   #     width : 描画目标的宽
  93.   #--------------------------------------------------------------------------
  94.   def draw_actor_mp_lvup(actor, x, y)
  95.     self.contents.font.color = system_color
  96.     self.contents.draw_text(x , y, 96, 32, "最大" + Vocab::mp)
  97.     if $temp_mp == 0
  98.       self.contents.font.color = normal_color
  99.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxmp.to_s, 2)
  100.     else
  101.       maxmp = actor.maxmp + $temp_mp
  102.       self.contents.font.color = Color.new(255, 128, 128, 255)
  103.       self.contents.draw_text(x + 120 , y, 48, 32, maxmp.to_s ,2)
  104.       self.contents.font.color = normal_color      
  105.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  106.       if $temp_mp >=0
  107.         self.contents.font.color = Color.new(255, 128, 128, 255)
  108.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  109.       else
  110.         self.contents.font.color = Color.new(255,255,0,255)
  111.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  112.       end
  113.       self.contents.draw_text(x + 200, y, 36, 32, $temp_mp.to_s, 2)
  114.       self.contents.font.color = normal_color
  115.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  116.     end
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 描绘能力值
  120.   #     actor : 角色
  121.   #     x     : 描画目标 X 坐标
  122.   #     y     : 描画目标 Y 坐标
  123.   #     type  : 能力值种类 (0~4)
  124.   #--------------------------------------------------------------------------
  125.   def draw_actor_lvup(actor, x, y, type)   
  126.     # 定义数字颜色
  127.     lvup = normal_color
  128.     upcolor = Color.new(255, 128, 128, 255)
  129.     self.contents.font.color = normal_color   
  130.     case type
  131.     when 0
  132.       parameter_name = Vocab::atk
  133.       parameter_value = actor.atk
  134.       parameter_value_temp = parameter_value + $temp_atk
  135.       if $temp_atk != 0
  136.         lvup = upcolor
  137.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  138.         if $temp_atk >= 0
  139.           self.contents.font.color = lvup
  140.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  141.         else
  142.           self.contents.font.color = Color.new(255,255,0,255)
  143.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  144.         end        
  145.         self.contents.draw_text(x + 272, y, 80, 32, $temp_atk.abs.to_s,1)
  146.         self.contents.font.color = normal_color
  147.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  148.       end
  149.     when 1
  150.       parameter_name = Vocab::def
  151.       parameter_value = actor.def
  152.       parameter_value_temp = parameter_value + $temp_def
  153.       if $temp_def != 0
  154.         lvup = upcolor
  155.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  156.         if $temp_def >= 0
  157.           self.contents.font.color = lvup
  158.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  159.         else
  160.           self.contents.font.color = Color.new(255,255,0,255)
  161.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  162.         end        
  163.         self.contents.draw_text(x + 272, y, 80, 32, $temp_def.abs.to_s,1)
  164.         self.contents.font.color = normal_color
  165.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  166.       end
  167.     when 2
  168.       parameter_name = Vocab::agi
  169.       parameter_value = actor.agi
  170.       parameter_value_temp = parameter_value + $temp_agi
  171.       if $temp_agi != 0
  172.         lvup = upcolor
  173.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  174.         if $temp_agi >= 0
  175.           self.contents.font.color = lvup
  176.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  177.         else
  178.           self.contents.font.color = Color.new(255,255,0,255)
  179.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  180.         end        
  181.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  182.         self.contents.font.color = normal_color
  183.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  184.       end
  185.     when 3
  186.       parameter_name = Vocab::spi
  187.       parameter_value = actor.spi
  188.       parameter_value_temp = parameter_value + $temp_spi
  189.       if $temp_spi != 0
  190.         lvup = upcolor
  191.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  192.         if $temp_spi >= 0
  193.           self.contents.font.color = lvup
  194.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  195.         else
  196.           self.contents.font.color = Color.new(255,255,0,255)
  197.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  198.         end        
  199.         self.contents.draw_text(x + 272, y, 80, 32, $temp_spi.abs.to_s,1)
  200.         self.contents.font.color = normal_color
  201.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  202.       end
  203.     when 4
  204.       parameter_name = "剩余点数"
  205.       parameter_value = $point
  206.       if $point != 0
  207.         lvup = upcolor
  208.       end
  209.     end   
  210.     self.contents.font.size = 16 if type == 4
  211.     self.contents.font.color = system_color
  212.     if type != 4 then
  213.       self.contents.draw_text(x, y, 120, 32, parameter_name)
  214.     else
  215.       self.contents.draw_text(x, y, 120, 24, parameter_name)
  216.     end
  217.     self.contents.font.color = normal_color
  218.     if type != 4
  219.       self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  220.     else
  221.       self.contents.draw_text(x + 68, y, 36, 24, parameter_value.to_s)   
  222.     end
  223.     if type != 4
  224.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  225.     end  
  226.     self.contents.font.color = lvup
  227.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  228.     self.contents.font.color = normal_color        
  229.   end
  230. end

  231. class Window_Lvpoint < Window_Base
  232.   def initialize
  233.     super(0,198,128,58)
  234.     refresh
  235.   end
  236.   def refresh
  237.     self.contents.clear
  238.     draw_actor_lvup(@actor, 0, 0, 4)
  239.   end
  240. end
  241. #==============================================================================
  242. # ■ Window_lvup
  243. #------------------------------------------------------------------------------
  244. #  显示升级状态窗口。
  245. #==============================================================================
  246. class Window_Lvup < Window_Base
  247.   #--------------------------------------------------------------------------
  248.   # ● 初始化对像
  249.   #     actor : 角色
  250.   #--------------------------------------------------------------------------
  251.   def initialize(actor)
  252.     super(0, 0, 416, 256)
  253.     self.contents = Bitmap.new(width - 32, height - 32)
  254.     @actor = actor
  255.     refresh
  256.   end  
  257.   #--------------------------------------------------------------------------
  258.   # ● 刷新
  259.   #--------------------------------------------------------------------------
  260.   def refresh
  261.     self.contents.clear
  262.     draw_actor_graphic(@actor, 30, 80)
  263.     draw_actor_name(@actor, 4, 0)
  264.     draw_actor_class(@actor, 96, 0)
  265.     draw_actor_level(@actor, 224, 0)
  266.     draw_actor_state(@actor, 96, 32)   
  267.     draw_actor_hp_lvup(@actor, 96, 32)
  268.     draw_actor_mp_lvup(@actor, 96, 64)
  269.     draw_actor_lvup(@actor, 4, 96, 0)
  270.     draw_actor_lvup(@actor, 4, 128, 1)
  271.     draw_actor_lvup(@actor, 4, 160, 2)
  272.     draw_actor_lvup(@actor, 4, 192, 3)
  273.   end
  274. end
  275. #==============================================================================
  276. # ■ Window_Help
  277. #------------------------------------------------------------------------------
  278. #  特技及物品的说明、角色的状态显示的窗口。
  279. #==============================================================================
  280. class Window_Lvup_Help < Window_Base
  281.   #--------------------------------------------------------------------------
  282.   # ● 初始化对像
  283.   #--------------------------------------------------------------------------
  284.   def initialize
  285.     super(0, 256, 544, 160)
  286.     self.contents = Bitmap.new(width - 32, height - 32)
  287.     @test = "" #——这个东西用来检测,节约内存专用
  288.   end  
  289.   #--------------------------------------------------------------------------
  290.   # ● 设置文本
  291.   #--------------------------------------------------------------------------
  292.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  293.     if @test != text1
  294.       @test = text1
  295.     else
  296.       return
  297.     end   
  298.     self.contents.clear
  299.     self.contents.font.color = normal_color
  300.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  301.     if text2 != nil
  302.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  303.     end
  304.     self.contents.font.size -= 4
  305.     if text3 != nil
  306.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  307.     end
  308.     if text4 != nil
  309.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  310.     end
  311.     self.contents.font.size += 4
  312.   end
  313. end
  314. #==============================================================================
  315. # ■ Scene_lvup
  316. #------------------------------------------------------------------------------
  317. #  处理升级画面的类。
  318. #==============================================================================
  319. class Scene_Lvup
  320.   #--------------------------------------------------------------------------
  321.   # ● 初始化对像
  322.   #     actor_index : 角色索引
  323.   #     menu_index : 选项起始位置
  324.   #--------------------------------------------------------------------------
  325.   def initialize(actor_index = 0 , menu_index = nil)
  326.     @actor_index = actor_index
  327.     @menu_index = menu_index
  328.   end
  329.   #--------------------------------------------------------------------------
  330.   # ● 主处理
  331.   #--------------------------------------------------------------------------
  332.   def main
  333.     s1 = "增加体力"
  334.     s2 = "增加"+Vocab::atk
  335.     s3 = "增加"+Vocab::def
  336.     s4 = "增加"+Vocab::agi
  337.     s5 = "增加"+Vocab::spi
  338.     s6 = "确认加点"
  339.     s7 = "点数重置"
  340.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  341.     #@command_window.index = @menu_index
  342.     # 获取角色
  343.     @actor = $game_party.members[@actor_index]
  344.     # 将角色的剩余点数带入
  345.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  346.     # 初始化临时量
  347.     $temp_atk = 0
  348.     $temp_def = 0
  349.     $temp_agi = 0
  350.     $temp_spi = 0
  351.     $temp_hp = 0
  352.     $temp_mp = 0
  353.     #=========================================================================
  354.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  355.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  356.     #=========================================================================
  357.     # 每提升一次力量,提升多少附加能力
  358.     #=========================================================================
  359.     @atk_hp = 2     # 每提升一次力量附加提升多少HP
  360.     @atk_mp = 2     # 每提升一次力量附加提升多少MP
  361.     @atk_def = 1    # 每提升一次力量附加提升多少灵巧
  362.     @atk_agi = 1    # 每提升一次力量附加提升多少速度
  363.     @atk_spi = 0    # 每提升一次力量附加提升多少魔力
  364.     @atk_atk = 5    # 每提升一次力量附加提升多少力量
  365.     #=========================================================================
  366.     # 每提升一次灵巧,提升多少附加能力
  367.     #=========================================================================
  368.     @def_hp = 3     # 每提升一次灵巧附加提升多少HP
  369.     @def_mp = 2     # 每提升一次灵巧附加提升多少MP
  370.     @def_atk = 1    # 每提升一次灵巧附加提升多少力量
  371.     @def_agi = 1    # 每提升一次灵巧附加提升多少速度
  372.     @def_spi = 0    # 每提升一次灵巧附加提升多少魔力
  373.     @def_def = 5    # 每提升一次灵巧附加提升多少灵巧
  374.     #=========================================================================
  375.     # 每提升一次速度,提升多少附加能力
  376.     #=========================================================================
  377.     @agi_hp = 3     # 每提升一次速度附加提升多少HP
  378.     @agi_mp = 2     # 每提升一次速度附加提升多少MP
  379.     @agi_atk = 1    # 每提升一次速度附加提升多少力量
  380.     @agi_def = 1    # 每提升一次速度附加提升多少灵巧
  381.     @agi_spi = 0    # 每提升一次速度附加提升多少魔力
  382.     @agi_agi = 5    # 每提升一次速度附加提升多少速度
  383.     #=========================================================================
  384.     # 每提升一次魔力,提升多少附加能力
  385.     #=========================================================================
  386.     @spi_hp = 1     # 每提升一次魔力附加提升多少HP
  387.     @spi_mp = 10    # 每提升一次魔力附加提升多少MP
  388.     @spi_atk = -1   # 每提升一次魔力附加提升多少力量
  389.     @spi_def = -1   # 每提升一次魔力附加提升多少灵巧
  390.     @spi_agi = -1   # 每提升一次魔力附加提升多少速度
  391.     @spi_spi = 10   # 每提升一次魔力附加提升多少魔力
  392.     #=========================================================================
  393.     # 每提升一次体力,提升多少附加能力
  394.     #=========================================================================
  395.     @hp = 15       # 每提升一次体力提升多少HP
  396.     @mp = 10       # 每提升一次体力提升多少MP
  397.     @hp_atk = -1   # 每提升一次体力提升多少力量
  398.     @hp_def = -1   # 每提升一次体力提升多少速度
  399.     @hp_agi = -1   # 每提升一次体力提升多少灵巧
  400.     @hp_spi = -1   # 每提升一次体力提升多少魔力   
  401.     # 定义说明文字
  402.     @text_hp_sc = "体力可以增加生存的能力,可以延长生存的时间!"
  403.     @text_atk_sc = Vocab::atk + "可以增加物理攻击和物理技能的威力!"
  404.     @text_def_sc = Vocab::def + "可以提高攻击的命中率和必杀!"
  405.     @text_agi_sc = Vocab::agi + "可以提高回避、命中、逃跑成功率!"
  406.     @text_spi_sc = Vocab::spi + "可以提高魔法的效果,可以增加1点魔法!"
  407.     @text_save = "保存分配情况并返回游戏"
  408.     @text_reset= "重新分配能力点数"
  409.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  410.     @text_hp = "最大" + Vocab::hp + "值"
  411.     @text_mp = "最大" + Vocab::mp + "值"
  412.     @text_atk = "最大" + Vocab::atk + "值"
  413.     @text_def = "最大" + Vocab::def + "值"
  414.     @text_agi = "最大" + Vocab::agi + "值"
  415.     @text_spi = "最大" + Vocab::spi + "值"
  416.     s_disable
  417.     # 生成状态窗口
  418.     @lvup_window = Window_Lvup.new(@actor)
  419.     @lvup_window.x = 128
  420.     @lvup_window.y = 0   
  421.     @lvpoint_window = Window_Lvpoint.new
  422.     # 生成帮助窗口并初始化帮助文本
  423.     @help_window = Window_Lvup_Help.new   
  424.     # 执行过渡
  425.     Graphics.transition
  426.     # 主循环
  427.     loop do
  428.       # 刷新游戏画面
  429.       Graphics.update
  430.       # 刷新输入信息
  431.       Input.update
  432.       # 刷新画面
  433.       update
  434.       # 如果切换画面就中断循环
  435.       if $scene != self
  436.         break
  437.       end
  438.     end
  439.     # 准备过渡
  440.     Graphics.freeze
  441.     # 释放窗口
  442.     @lvpoint_window.dispose
  443.     @command_window.dispose
  444.     @lvup_window.dispose
  445.     @help_window.dispose
  446.   end
  447.   
  448.   def return_scene
  449.     if @menu_index
  450.       $scene = Scene_Menu.new(@menu_index)
  451.     else
  452.       $scene = Scene_Map.new
  453.     end
  454.   end
  455.   
  456.   #--------------------------------------------------------------------------
  457.   # ● 刷新画面
  458.   #--------------------------------------------------------------------------
  459.   def update
  460.     # 刷新窗口
  461.     @command_window.update
  462.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  463.     s_disable
  464.     @lvup_window.update
  465.     #=============================================================
  466.     # 按下 B 键的情况下
  467.     #=============================================================
  468.     if Input.trigger?(Input::B)
  469.       # 演奏取消 SE
  470.       Sound.play_cancel
  471.       # 切换到地图画面
  472.       #$scene = Scene_Map.new
  473.       return_scene
  474.       return
  475.     end
  476.     #=============================================================
  477.     # 按下 C 键的情况下
  478.     #=============================================================
  479.     if Input.trigger?(Input::C)      
  480.       if @command_window.index == 5
  481.           # 演奏确定 SE
  482.         Sound.play_decision
  483.         # 将角色的剩余点数带回
  484.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  485.         # 将角色点数实际加上
  486.         @actor.atk += $temp_atk
  487.         @actor.def += $temp_def
  488.         @actor.agi += $temp_agi
  489.         @actor.spi += $temp_spi
  490.         @actor.maxhp += $temp_hp
  491.         @actor.maxmp += $temp_mp
  492.         # 切换到地图画面
  493.         #$scene = Scene_Map.new
  494.         return_scene
  495.         return
  496.       end
  497.       if @command_window.index == 6
  498.           # 演奏确定 SE
  499.         Sound.play_decision
  500.           # 将角色的剩余点数带入
  501.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  502.           # 初始化临时量
  503.         $temp_atk = 0
  504.         $temp_def = 0
  505.         $temp_agi = 0
  506.         $temp_spi = 0
  507.         $temp_hp = 0
  508.         $temp_mp = 0
  509.         @lvup_window.refresh
  510.         @lvpoint_window.refresh
  511.         return
  512.       end
  513.       if $point == 0
  514.         # 演奏冻结 SE
  515.         Sound.play_buzzer
  516.         return
  517.       end
  518.       case @command_window.index
  519.       when 0
  520.         # 演奏确定 SE
  521.         Sound.play_decision
  522.         $temp_hp += @hp
  523.         $temp_mp += @mp
  524.         $temp_atk += @hp_atk
  525.         $temp_def += @hp_def
  526.         $temp_agi += @hp_agi
  527.         $temp_spi += @hp_spi
  528.         $point -= 1
  529.         @lvup_window.refresh
  530.         @lvpoint_window.refresh
  531.         s_disable
  532.         return
  533.       when 1
  534.         # 演奏确定 SE
  535.         Sound.play_decision
  536.         $temp_atk += @atk_atk
  537.         $temp_hp += @atk_hp
  538.         $temp_mp += @atk_mp
  539.         $temp_def += @atk_def
  540.         $temp_agi += @atk_agi
  541.         $temp_spi += @atk_spi
  542.         $point -= 1
  543.         @lvup_window.refresh
  544.         @lvpoint_window.refresh
  545.         s_disable
  546.         return
  547.       when 2
  548.         # 演奏确定 SE
  549.         Sound.play_decision
  550.         $temp_def += @def_def
  551.         $temp_hp += @def_hp
  552.         $temp_mp += @def_mp
  553.         $temp_atk += @def_atk
  554.         $temp_agi += @def_agi
  555.         $temp_spi += @def_spi
  556.         $point -= 1
  557.         @lvup_window.refresh
  558.         @lvpoint_window.refresh
  559.         s_disable
  560.         return
  561.       when 3
  562.         # 演奏确定 SE
  563.         Sound.play_decision
  564.         $temp_agi += @agi_agi
  565.         $temp_hp += @agi_hp
  566.         $temp_mp += @agi_mp
  567.         $temp_atk += @agi_atk
  568.         $temp_def += @agi_def
  569.         $temp_spi += @agi_spi
  570.         $point -= 1
  571.         @lvup_window.refresh
  572.         @lvpoint_window.refresh
  573.         s_disable
  574.         return
  575.       when 4
  576.         # 演奏确定 SE
  577.         Sound.play_decision
  578.         $temp_spi += @spi_spi
  579.         $temp_hp += @spi_hp
  580.         $temp_mp += @spi_mp
  581.         $temp_atk += @spi_atk
  582.         $temp_def += @spi_def
  583.         $temp_agi += @spi_agi
  584.         $point -= 1
  585.         @lvup_window.refresh
  586.         @lvpoint_window.refresh
  587.         s_disable
  588.         return
  589.       end
  590.     end
  591.     #=============================================================
  592.     # 什么都没有按下的情况
  593.     #=============================================================
  594.     case @command_window.index   
  595.     when 0  # 增加体力
  596.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_atk + @hp_atk.to_s + "点   " + @text_def + @hp_def.to_s + "点"
  597.       temptext2 = @text_mp + @mp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_spi + @hp_spi.to_s + "点"
  598.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  599.     when 1  # 增加力量
  600.       temptext1 = @text_hp + @atk_hp.to_s + "点   " + @text_atk + @atk_atk.to_s + "点   " + @text_def + @atk_def.to_s + "点"
  601.       temptext2 = @text_mp + @atk_mp.to_s + "点   " + @text_agi + @atk_agi.to_s + "点   " + @text_spi + @atk_spi.to_s + "点"
  602.       @help_window.lvup_text(@text_atk_sc , @text_2 , temptext1 , temptext2)
  603.     when 2  # 增加灵巧
  604.       temptext1 = @text_hp + @def_hp.to_s + "点   " + @text_atk + @def_agi.to_s + "点   " + @text_def + @def_def.to_s + "点"
  605.       temptext2 = @text_mp + @def_mp.to_s + "点   " + @text_agi + @def_agi.to_s + "点   " + @text_spi + @def_spi.to_s + "点"
  606.       @help_window.lvup_text(@text_def_sc , @text_2 , temptext1 , temptext2)
  607.     when 3  # 增加速度
  608.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_atk + @agi_atk.to_s + "点   " + @text_def + @agi_def.to_s + "点"
  609.       temptext2 = @text_mp + @agi_mp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_spi + @agi_spi.to_s + "点"
  610.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  611.     when 4  # 增加魔力
  612.       temptext1 = @text_hp + @spi_hp.to_s + "点   " + @text_atk + @spi_atk.to_s + "点   " + @text_def + @spi_def.to_s + "点"
  613.       temptext2 = @text_mp + @spi_mp.to_s + "点   " + @text_agi + @spi_agi.to_s + "点   " + @text_spi + @spi_spi.to_s + "点"
  614.       @help_window.lvup_text(@text_spi_sc , @text_2 , temptext1 , temptext2)
  615.     when 5 # 保存设定
  616.       @help_window.lvup_text(@text_save)
  617.     when 6 # 点数重置
  618.       @help_window.lvup_text(@text_reset)     
  619.     end
  620.     #=============================================================
  621.     # 按下R与L换人的情况
  622.     #=============================================================      
  623.     if Input.trigger?(Input::R)
  624.       # 演奏光标 SE
  625.       Sound.play_cursor
  626.       # 移至下一位角色
  627.       @actor_index += 1
  628.       @actor_index %= $game_party.members.size
  629.       # 切换到别的状态画面
  630.       #$scene = Scene_Lvup.new(@actor_index , @command_window.index)
  631.       $scene = Scene_Lvup.new(@actor_index , @meun_index)
  632.       return
  633.     end
  634.     # 按下 L 键的情况下
  635.     if Input.trigger?(Input::L)
  636.       # 演奏光标 SE
  637.       Sound.play_cursor
  638.       # 移至上一位角色
  639.       @actor_index += $game_party.members.size - 1
  640.       @actor_index %= $game_party.members.size
  641.       # 切换到别的状态画面
  642.       #$scene = Scene_Lvup.new(@actor_index , @command_window.index)
  643.       $scene = Scene_Lvup.new(@actor_index , @menu_index)
  644.       return
  645.     end
  646.   end  
  647.   #--------------------------------------------------------------------------
  648.   # ● 选项明暗判断
  649.   #--------------------------------------------------------------------------
  650.   def s_disable
  651.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  652.     if $point == 0
  653.       enabled = false
  654.     else
  655.       enabled = true
  656.     end
  657.       @command_window.draw_item(0,enabled)
  658.       @command_window.draw_item(1,enabled)
  659.       @command_window.draw_item(2,enabled)
  660.       @command_window.draw_item(3,enabled)
  661.       @command_window.draw_item(4,enabled)
  662.   end
  663. end

复制代码

作者: 一塌糊涂    时间: 2008-4-10 03:34
提示: 作者被禁止或删除 内容自动屏蔽
作者: 雪流星    时间: 2008-4-10 06:36
那就更简单了,
先用我上面改过的脚本覆盖你原先用的(因为我修改过一些地方,改起来比较容易)
然後把第504和505行
也就是这两行:
         return_scene
         return
前面加上 # 就行了 [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: 一塌糊涂    时间: 2008-4-10 20:16
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1