查看: 2146|回复: 2

[已经解决] 使用的手动加点脚本没法点数重置

[复制链接]
梦石
0
星屑
115
在线时间
14 小时
注册时间
2022-1-10
回帖
2
发表于 2022-1-31 21:58:38 | 显示全部楼层 |阅读模式

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

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

×
升级加点都ok,但是加完点后点点数重置就重置不了,求问是怎么回事

  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. # 脚本使用设定:

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

  11. # 每增加一次点数,各项能力值的变化:357-410行

  12. # 使用方法介绍:

  13. # 本脚本不会取代原猩豆δ埽皇且桓龈郊庸δ堋?BR># 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  14. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  15. # 1-99级全部等于一个相同数值就行了。

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

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

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

  21. #==============================================================================
  22. # ■ Window_Command
  23. #------------------------------------------------------------------------------
  24. #  一般的命令选择行窗口。(追加定义)
  25. #==============================================================================
  26. class Window_Command < Window_Selectable
  27.   #--------------------------------------------------------------------------
  28.   # ● 项目有效化
  29.   #     index : 项目编号
  30.   #--------------------------------------------------------------------------
  31.   def able_item(index)
  32.     draw_item(index, normal_color)
  33.   end
  34. end
  35. #==============================================================================
  36. # ■ Game_Actor
  37. #------------------------------------------------------------------------------
  38. #  处理角色的类。(再定义)
  39. #==============================================================================
  40. class Game_Actor < Game_Battler
  41.   #--------------------------------------------------------------------------
  42.   # ● 更改 EXP
  43.   #     exp : 新的 EXP
  44.   #--------------------------------------------------------------------------
  45.   def exp=(exp)
  46.     @exp = [[exp, 9999999].min, 0].max
  47.     # 升级
  48.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  49.       @level += 1
  50.       # 增加4点可自由分配的点数
  51.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  52.       # 学会特技
  53.       for j in $data_classes[@class_id].learnings
  54.         if j.level == @level
  55.           learn_skill(j.skill_id)
  56.         end
  57.       end
  58.     end
  59.     # 降级
  60.     while @exp < @exp_list[@level]
  61.       @level -= 1
  62.     end
  63.     # 修正当前的 HP 与 SP 超过最大值
  64.     @hp = [@hp, self.maxhp].min
  65.     @sp = [@sp, self.maxsp].min
  66.   end
  67. end
  68. #==============================================================================
  69. # ■ Window_Base
  70. #------------------------------------------------------------------------------
  71. #  游戏中全部窗口的超级类(追加定义)
  72. #==============================================================================
  73. class Window_Base < Window
  74.   #--------------------------------------------------------------------------
  75.   # ● 描绘 HP
  76.   #     actor : 角色
  77.   #     x     : 描画目标 X 坐标
  78.   #     y     : 描画目标 Y 坐标
  79.   #     width : 描画目标的宽
  80.   #--------------------------------------------------------------------------
  81.   def draw_actor_hp_lvup(actor, x, y)
  82.     self.contents.font.color = system_color
  83.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  84.     if $temp_hp == 0
  85.       self.contents.font.color = normal_color
  86.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  87.     else
  88.       maxhp = actor.maxhp + $temp_hp
  89.       self.contents.font.color = Color.new(255, 128, 128, 255)
  90.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  91.       self.contents.font.color = normal_color      
  92.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  93.       if $temp_hp >=0
  94.         self.contents.font.color = Color.new(255, 128, 128, 255)
  95.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  96.       else
  97.         self.contents.font.color = Color.new(255,255,0,255)
  98.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  99.       end
  100.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  101.       self.contents.font.color = normal_color
  102.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  103.     end
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 描绘 SP
  107.   #     actor : 角色
  108.   #     x     : 描画目标 X 坐标
  109.   #     y     : 描画目标 Y 坐标
  110.   #     width : 描画目标的宽
  111.   #--------------------------------------------------------------------------
  112.   def draw_actor_sp_lvup(actor, x, y)
  113.     self.contents.font.color = system_color
  114.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  115.     if $temp_sp == 0
  116.       self.contents.font.color = normal_color
  117.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  118.     else
  119.       maxsp = actor.maxsp + $temp_sp
  120.       self.contents.font.color = Color.new(255, 128, 128, 255)
  121.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  122.       self.contents.font.color = normal_color      
  123.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  124.       if $temp_sp >=0
  125.         self.contents.font.color = Color.new(255, 128, 128, 255)
  126.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  127.       else
  128.         self.contents.font.color = Color.new(255,255,0,255)
  129.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  130.       end
  131.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  132.       self.contents.font.color = normal_color
  133.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  134.     end
  135.   end
  136.   #--------------------------------------------------------------------------
  137.   # ● 描绘能力值
  138.   #     actor : 角色
  139.   #     x     : 描画目标 X 坐标
  140.   #     y     : 描画目标 Y 坐标
  141.   #     type  : 能力值种类 (0~4)
  142.   #--------------------------------------------------------------------------
  143.   def draw_actor_lvup(actor, x, y, type)   
  144.     # 定义数字颜色
  145.     lvup = normal_color
  146.     upcolor = Color.new(255, 128, 128, 255)
  147.     self.contents.font.color = normal_color   
  148.     case type
  149.     when 0
  150.       parameter_name = $data_system.words.str
  151.       parameter_value = actor.str
  152.       parameter_value_temp = parameter_value + $temp_str
  153.       if $temp_str != 0
  154.         lvup = upcolor
  155.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  156.         if $temp_str >= 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_str.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 1
  168.       parameter_name = $data_system.words.dex
  169.       parameter_value = actor.dex
  170.       parameter_value_temp = parameter_value + $temp_dex
  171.       if $temp_dex != 0
  172.         lvup = upcolor
  173.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  174.         if $temp_dex >= 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_dex.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 2
  186.       parameter_name = $data_system.words.agi
  187.       parameter_value = actor.agi
  188.       parameter_value_temp = parameter_value + $temp_agi
  189.       if $temp_agi != 0
  190.         lvup = upcolor
  191.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  192.         if $temp_agi >= 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_agi.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 3
  204.       parameter_name = $data_system.words.int
  205.       parameter_value = actor.int
  206.       parameter_value_temp = parameter_value + $temp_int
  207.       if $temp_int != 0
  208.         lvup = upcolor
  209.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  210.         if $temp_int >= 0
  211.           self.contents.font.color = lvup
  212.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  213.         else
  214.           self.contents.font.color = Color.new(255,255,0,255)
  215.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  216.         end        
  217.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  218.         self.contents.font.color = normal_color
  219.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  220.       end
  221.     when 4
  222.       parameter_name = "剩余点数"
  223.       parameter_value = $point
  224.       if $point != 0
  225.         lvup = upcolor
  226.       end
  227.     end   
  228.     self.contents.font.color = system_color
  229.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  230.     self.contents.font.color = normal_color
  231.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  232.     if type != 4
  233.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  234.     end  
  235.     self.contents.font.color = lvup
  236.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  237.     self.contents.font.color = normal_color        
  238.   end
  239. end
  240. #==============================================================================
  241. # ■ Window_lvup
  242. #------------------------------------------------------------------------------
  243. #  显示升级状态窗口。
  244. #==============================================================================
  245. class Window_Lvup < Window_Base
  246.   #--------------------------------------------------------------------------
  247.   # ● 初始化对像
  248.   #     actor : 角色
  249.   #--------------------------------------------------------------------------
  250.   def initialize(actor)
  251.     super(0, 0, 512, 320)
  252.     self.contents = Bitmap.new(width - 32, height - 32)
  253.     @actor = actor
  254.     refresh
  255.   end  
  256.   #--------------------------------------------------------------------------
  257.   # ● 刷新
  258.   #--------------------------------------------------------------------------
  259.   def refresh
  260.     self.contents.clear
  261. #    draw_actor_graphic(@actor, 40, 112)
  262.     draw_actor_name(@actor, 4, 0)
  263.     draw_actor_class(@actor, 4 + 144, 0)
  264.     draw_actor_level(@actor, 96, 32)
  265.     draw_actor_state(@actor, 96, 64)   
  266.     draw_actor_hp_lvup(@actor, 96+128, 32)
  267.     draw_actor_sp_lvup(@actor, 96+128, 64)
  268.     draw_actor_lvup(@actor, 96, 128, 0)
  269.     draw_actor_lvup(@actor, 96, 160, 1)
  270.     draw_actor_lvup(@actor, 96, 192, 2)
  271.     draw_actor_lvup(@actor, 96, 224, 3)
  272.     draw_actor_lvup(@actor, 96, 256, 4)
  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, 320, 640, 160)
  286.     self.contents = Bitmap.new(width - 32, height - 32)
  287.    # [url=home.php?mod=space&uid=76370]@test[/url] = ""
  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 = 0)
  326.     @actor_index = actor_index
  327.     @menu_index = menu_index
  328.   end
  329.   #--------------------------------------------------------------------------
  330.   # ● 主处理
  331.   #--------------------------------------------------------------------------
  332.   def main
  333.     s1 = "增加HP SP"
  334.     s2 = "增加"+$data_system.words.str
  335.     s3 = "增加"+$data_system.words.dex
  336.     s4 = "增加"+$data_system.words.agi
  337.     s5 = "增加"+$data_system.words.int
  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.actors[@actor_index]
  344.     # 将角色的剩余点数带入
  345.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  346.     # 初始化临时量
  347.     $temp_str = 0
  348.     $temp_dex = 0
  349.     $temp_agi = 0
  350.     $temp_int = 0
  351.     $temp_hp = 0
  352.     $temp_sp = 0
  353.     #=========================================================================
  354.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  355.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  356.     #=========================================================================
  357.     # 每提升一次力量,提升多少附加能力
  358.     #=========================================================================
  359.     @str_hp = 5     # 每提升一次力量附加提升多少HP
  360.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  361.     @str_dex = 1    # 每提升一次力量附加提升多少灵巧
  362.     @str_agi = 1    # 每提升一次力量附加提升多少速度
  363.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  364.     @str_str = 5    # 每提升一次力量附加提升多少力量
  365.     #=========================================================================
  366.     # 每提升一次灵巧,提升多少附加能力
  367.     #=========================================================================
  368.     @dex_hp = 2     # 每提升一次灵巧附加提升多少HP
  369.     @dex_sp = 2     # 每提升一次灵巧附加提升多少SP
  370.     @dex_str = 1    # 每提升一次灵巧附加提升多少力量
  371.     @dex_agi = 1    # 每提升一次灵巧附加提升多少速度
  372.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  373.     @dex_dex = 4    # 每提升一次灵巧附加提升多少灵巧
  374.     #=========================================================================
  375.     # 每提升一次速度,提升多少附加能力
  376.     #=========================================================================
  377.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  378.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  379.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  380.     @agi_dex = 0    # 每提升一次速度附加提升多少灵巧
  381.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  382.     @agi_agi = 3    # 每提升一次速度附加提升多少速度
  383.     #=========================================================================
  384.     # 每提升一次魔力,提升多少附加能力
  385.     #=========================================================================
  386.     @int_hp = 2     # 每提升一次魔力附加提升多少HP
  387.     @int_sp = 15    # 每提升一次魔力附加提升多少SP
  388.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  389.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  390.     @int_agi = 1   # 每提升一次魔力附加提升多少速度
  391.     @int_int = 7   # 每提升一次魔力附加提升多少魔力
  392.     #=========================================================================
  393.     # 每提升一次体力,提升多少附加能力
  394.     #=========================================================================
  395.     @hp = 20       # 每提升一次体力提升多少HP
  396.     @sp = 10       # 每提升一次体力提升多少SP
  397.     @hp_str = 0   # 每提升一次体力提升多少力量
  398.     @hp_dex = 0   # 每提升一次体力提升多少速度
  399.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  400.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  401.     # 定义说明文字
  402.     @text_hp_sc = "体力可以增加生存的能力,增加HP与SP的最大上限!"
  403.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  404.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀。"
  405.     @text_agi_sc = $data_system.words.agi + "可以提高回避、逃跑成功率。"
  406.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果。"
  407.     @text_save = "保存分配情况并返回游戏"
  408.     @text_reset= "重新分配能力点数"
  409.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  410.     @text_hp = "最大" + $data_system.words.hp + "值"
  411.     @text_sp = "最大" + $data_system.words.sp + "值"
  412.     @text_str = "最大" + $data_system.words.str + "值"
  413.     @text_dex = "最大" + $data_system.words.dex + "值"
  414.     @text_agi = "最大" + $data_system.words.agi + "值"
  415.     @text_int = "最大" + $data_system.words.int + "值"
  416.     s_disable
  417.     # 生成状态窗口
  418.     @lvup_window = Window_Lvup.new(@actor)
  419.     @lvup_window.x = 128
  420.     @lvup_window.y = 0   
  421.     # 生成帮助窗口并初始化帮助文本
  422.     @help_window = Window_Lvup_Help.new   
  423.     # 执行过渡
  424.     Graphics.transition(20, "Graphics/Transitions/" + $data_system.battle_transition)
  425.     # 主循环
  426.     loop do
  427.       # 刷新游戏画面
  428.       Graphics.update
  429.       # 刷新输入信息
  430.       Input.update
  431.       # 刷新画面
  432.       update
  433.       # 如果切换画面就中断循环
  434.       if $scene != self
  435.         break
  436.       end
  437.     end
  438.     # 准备过渡
  439.     Graphics.freeze
  440.     # 释放窗口
  441.     @command_window.dispose
  442.     @lvup_window.dispose
  443.     @help_window.dispose
  444.   end
  445.   #--------------------------------------------------------------------------
  446.   # ● 刷新画面
  447.   #--------------------------------------------------------------------------
  448.   def update
  449.     # 刷新窗口
  450.     @command_window.update
  451.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  452.     s_disable
  453.     @lvup_window.update
  454.     #=============================================================
  455.     # 按下 B 键的情况下
  456.     #=============================================================
  457.     if Input.trigger?(Input::B)
  458.       # 演奏取消 SE
  459.       $game_system.se_play($data_system.cancel_se)
  460.       # 切换到地图画面
  461.       $scene = Scene_Menu.new(6)
  462.       return
  463.     end
  464.     #=============================================================
  465.     # 按下 C 键的情况下
  466.     #=============================================================
  467.     if Input.trigger?(Input::C)      
  468.       if @command_window.index == 5
  469.           # 演奏确定 SE
  470.         $game_system.se_play($data_system.decision_se)
  471.         # 将角色的剩余点数带回
  472.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  473.         # 将角色点数实际加上
  474.         @actor.str += $temp_str
  475.         @actor.dex += $temp_dex
  476.         @actor.agi += $temp_agi
  477.         @actor.int += $temp_int
  478.         @actor.maxhp += $temp_hp
  479.         @actor.maxsp += $temp_sp
  480.         # 切换到地图画面
  481.         $scene = Scene_Menu.new(5)
  482.       return
  483.       end
  484.       if @command_window.index == 6
  485.           # 演奏确定 SE
  486.         $game_system.se_play($data_system.cancel_se)
  487.           # 将角色的剩余点数带入
  488.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  489.           # 初始化临时量
  490.         $temp_str = 0
  491.         $temp_dex = 0
  492.         $temp_agi = 0
  493.         $temp_int = 0
  494.         $temp_hp = 0
  495.         $temp_sp = 0
  496.         @lvup_window.refresh
  497.         return
  498.       end
  499.       if $point == 0
  500.         # 演奏冻结 SE
  501.         $game_system.se_play($data_system.buzzer_se)
  502.         return
  503.       end
  504.       case @command_window.index
  505.       when 0
  506.         # 演奏确定 SE
  507.         $game_system.se_play($data_system.decision_se)
  508.         $temp_hp += @hp
  509.         $temp_sp += @sp
  510.         $temp_str += @hp_str
  511.         $temp_dex += @hp_dex
  512.         $temp_agi += @hp_agi
  513.         $temp_int += @hp_int
  514.         $point -= 1
  515.         @lvup_window.refresh
  516.         s_disable
  517.         return
  518.       when 1
  519.         # 演奏确定 SE
  520.         $game_system.se_play($data_system.decision_se)
  521.         $temp_str += @str_str
  522.         $temp_hp += @str_hp
  523.         $temp_sp += @str_sp
  524.         $temp_dex += @str_dex
  525.         $temp_agi += @str_agi
  526.         $temp_int += @str_int
  527.         $point -= 1
  528.         @lvup_window.refresh
  529.         s_disable
  530.         return
  531.       when 2
  532.         # 演奏确定 SE
  533.         $game_system.se_play($data_system.decision_se)
  534.         $temp_dex += @dex_dex
  535.         $temp_hp += @dex_hp
  536.         $temp_sp += @dex_sp
  537.         $temp_str += @dex_str
  538.         $temp_agi += @dex_agi
  539.         $temp_int += @dex_int
  540.         $point -= 1
  541.         @lvup_window.refresh
  542.         s_disable
  543.         return
  544.       when 3
  545.         # 演奏确定 SE
  546.         $game_system.se_play($data_system.decision_se)
  547.         $temp_agi += @agi_agi
  548.         $temp_hp += @agi_hp
  549.         $temp_sp += @agi_sp
  550.         $temp_str += @agi_str
  551.         $temp_dex += @agi_dex
  552.         $temp_int += @agi_int
  553.         $point -= 1
  554.         @lvup_window.refresh
  555.         s_disable
  556.         return
  557.       when 4
  558.         # 演奏确定 SE
  559.         $game_system.se_play($data_system.decision_se)
  560.         $temp_int += @int_int
  561.         $temp_hp += @int_hp
  562.         $temp_sp += @int_sp
  563.         $temp_str += @int_str
  564.         $temp_dex += @int_dex
  565.         $temp_agi += @int_agi
  566.         $point -= 1
  567.         @lvup_window.refresh
  568.         s_disable
  569.         return
  570.       end
  571.     end
  572.     #=============================================================
  573.     # 什么都没有按下的情况
  574.     #=============================================================
  575.     case @command_window.index   
  576.     when 0  # 增加体力
  577.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  578.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  579.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  580.     when 1  # 增加力量
  581.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  582.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  583.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  584.     when 2  # 增加灵巧
  585.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  586.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  587.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  588.     when 3  # 增加速度
  589.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  590.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  591.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  592.     when 4  # 增加魔力
  593.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  594.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  595.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  596.     when 5 # 保存设定
  597.       @help_window.lvup_text(@text_save)
  598.     when 6 # 点数重置
  599.       @help_window.lvup_text(@text_reset)     
  600.     end
  601.     #=============================================================
  602.     # 按下R与L换人的情况
  603.     #=============================================================      
  604.     if Input.trigger?(Input::R)
  605.       # 演奏光标 SE
  606.       $game_system.se_play($data_system.cursor_se)
  607.       # 移至下一位角色
  608.       @actor_index += 1
  609.       @actor_index %= $game_party.actors.size
  610.       # 切换到别的状态画面
  611.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  612.       return
  613.     end
  614.     # 按下 L 键的情况下
  615.     if Input.trigger?(Input::L)
  616.       # 演奏光标 SE
  617.       $game_system.se_play($data_system.cursor_se)
  618.       # 移至上一位角色
  619.       @actor_index += $game_party.actors.size - 1
  620.       @actor_index %= $game_party.actors.size
  621.       # 切换到别的状态画面
  622.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  623.       return
  624.     end
  625.   end  
  626.   #--------------------------------------------------------------------------
  627.   # ● 选项明暗判断
  628.   #--------------------------------------------------------------------------
  629.   def s_disable
  630.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  631.     if $point == 0
  632.       @command_window.disable_item(0)
  633.       @command_window.disable_item(1)
  634.       @command_window.disable_item(2)
  635.       @command_window.disable_item(3)
  636.       @command_window.disable_item(4)
  637.     else
  638.       @command_window.able_item(0)
  639.       @command_window.able_item(1)      
  640.       @command_window.able_item(2)
  641.       @command_window.able_item(3)
  642.       @command_window.able_item(4)
  643.     end
  644.   end
  645. end

  646. #==============================================================================
  647. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  648. #==============================================================================
复制代码
梦石
0
星屑
115
在线时间
14 小时
注册时间
2022-1-10
回帖
2
 楼主| 发表于 2022-1-31 23:12:36 | 显示全部楼层
问题已解决
回复

使用道具 举报

梦石
0
星屑
1332
在线时间
165 小时
注册时间
2022-2-14
回帖
80
发表于 2022-2-17 16:05:23 | 显示全部楼层
大佬能说下这个怎么用吗?
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部